x11rb_async/protocol/
xinput.rs

1// This file contains generated code. Do not edit directly.
2// To regenerate this, run 'make'.
3
4//! Bindings to the `Input` X11 extension.
5
6#![allow(clippy::too_many_arguments)]
7
8#[allow(unused_imports)]
9use std::borrow::Cow;
10#[allow(unused_imports)]
11use std::convert::TryInto;
12#[allow(unused_imports)]
13use crate::utils::RawFdContainer;
14#[allow(unused_imports)]
15use crate::x11_utils::{Request, RequestHeader, Serialize, TryParse, TryParseFd};
16use std::io::IoSlice;
17use crate::connection::RequestConnection;
18#[allow(unused_imports)]
19use crate::connection::Connection as X11Connection;
20#[allow(unused_imports)]
21use crate::cookie::{Cookie, CookieWithFds, VoidCookie};
22use crate::errors::ConnectionError;
23#[allow(unused_imports)]
24use crate::errors::ReplyOrIdError;
25use std::future::Future;
26use std::pin::Pin;
27#[allow(unused_imports)]
28use super::xfixes;
29#[allow(unused_imports)]
30use super::xproto;
31
32pub use x11rb_protocol::protocol::xinput::*;
33
34/// Get the major opcode of this extension
35async fn major_opcode<Conn: RequestConnection + ?Sized>(conn: &Conn) -> Result<u8, ConnectionError> {
36    let info = conn.extension_information(X11_EXTENSION_NAME).await?;
37    let info = info.ok_or(ConnectionError::UnsupportedExtension)?;
38    Ok(info.major_opcode)
39}
40
41pub async fn get_extension_version<'c, 'input, Conn>(conn: &'c Conn, name: &'input [u8]) -> Result<Cookie<'c, Conn, GetExtensionVersionReply>, ConnectionError>
42where
43    Conn: RequestConnection + ?Sized,
44{
45    let request0 = GetExtensionVersionRequest {
46        name: Cow::Borrowed(name),
47    };
48    let (bytes, fds) = request0.serialize(major_opcode(conn).await?);
49    let slices = [IoSlice::new(&bytes[0]), IoSlice::new(&bytes[1]), IoSlice::new(&bytes[2])];
50    assert_eq!(slices.len(), bytes.len());
51    conn.send_request_with_reply(&slices, fds).await
52}
53pub async fn list_input_devices<Conn>(conn: &Conn) -> Result<Cookie<'_, Conn, ListInputDevicesReply>, ConnectionError>
54where
55    Conn: RequestConnection + ?Sized,
56{
57    let request0 = ListInputDevicesRequest;
58    let (bytes, fds) = request0.serialize(major_opcode(conn).await?);
59    let slices = [IoSlice::new(&bytes[0])];
60    assert_eq!(slices.len(), bytes.len());
61    conn.send_request_with_reply(&slices, fds).await
62}
63pub async fn open_device<Conn>(conn: &Conn, device_id: u8) -> Result<Cookie<'_, Conn, OpenDeviceReply>, ConnectionError>
64where
65    Conn: RequestConnection + ?Sized,
66{
67    let request0 = OpenDeviceRequest {
68        device_id,
69    };
70    let (bytes, fds) = request0.serialize(major_opcode(conn).await?);
71    let slices = [IoSlice::new(&bytes[0])];
72    assert_eq!(slices.len(), bytes.len());
73    conn.send_request_with_reply(&slices, fds).await
74}
75pub async fn close_device<Conn>(conn: &Conn, device_id: u8) -> Result<VoidCookie<'_, Conn>, ConnectionError>
76where
77    Conn: RequestConnection + ?Sized,
78{
79    let request0 = CloseDeviceRequest {
80        device_id,
81    };
82    let (bytes, fds) = request0.serialize(major_opcode(conn).await?);
83    let slices = [IoSlice::new(&bytes[0])];
84    assert_eq!(slices.len(), bytes.len());
85    conn.send_request_without_reply(&slices, fds).await
86}
87pub async fn set_device_mode<Conn>(conn: &Conn, device_id: u8, mode: ValuatorMode) -> Result<Cookie<'_, Conn, SetDeviceModeReply>, ConnectionError>
88where
89    Conn: RequestConnection + ?Sized,
90{
91    let request0 = SetDeviceModeRequest {
92        device_id,
93        mode,
94    };
95    let (bytes, fds) = request0.serialize(major_opcode(conn).await?);
96    let slices = [IoSlice::new(&bytes[0])];
97    assert_eq!(slices.len(), bytes.len());
98    conn.send_request_with_reply(&slices, fds).await
99}
100pub async fn select_extension_event<'c, 'input, Conn>(conn: &'c Conn, window: xproto::Window, classes: &'input [EventClass]) -> Result<VoidCookie<'c, Conn>, ConnectionError>
101where
102    Conn: RequestConnection + ?Sized,
103{
104    let request0 = SelectExtensionEventRequest {
105        window,
106        classes: Cow::Borrowed(classes),
107    };
108    let (bytes, fds) = request0.serialize(major_opcode(conn).await?);
109    let slices = [IoSlice::new(&bytes[0]), IoSlice::new(&bytes[1]), IoSlice::new(&bytes[2])];
110    assert_eq!(slices.len(), bytes.len());
111    conn.send_request_without_reply(&slices, fds).await
112}
113pub async fn get_selected_extension_events<Conn>(conn: &Conn, window: xproto::Window) -> Result<Cookie<'_, Conn, GetSelectedExtensionEventsReply>, ConnectionError>
114where
115    Conn: RequestConnection + ?Sized,
116{
117    let request0 = GetSelectedExtensionEventsRequest {
118        window,
119    };
120    let (bytes, fds) = request0.serialize(major_opcode(conn).await?);
121    let slices = [IoSlice::new(&bytes[0])];
122    assert_eq!(slices.len(), bytes.len());
123    conn.send_request_with_reply(&slices, fds).await
124}
125pub async fn change_device_dont_propagate_list<'c, 'input, Conn>(conn: &'c Conn, window: xproto::Window, mode: PropagateMode, classes: &'input [EventClass]) -> Result<VoidCookie<'c, Conn>, ConnectionError>
126where
127    Conn: RequestConnection + ?Sized,
128{
129    let request0 = ChangeDeviceDontPropagateListRequest {
130        window,
131        mode,
132        classes: Cow::Borrowed(classes),
133    };
134    let (bytes, fds) = request0.serialize(major_opcode(conn).await?);
135    let slices = [IoSlice::new(&bytes[0]), IoSlice::new(&bytes[1]), IoSlice::new(&bytes[2])];
136    assert_eq!(slices.len(), bytes.len());
137    conn.send_request_without_reply(&slices, fds).await
138}
139pub async fn get_device_dont_propagate_list<Conn>(conn: &Conn, window: xproto::Window) -> Result<Cookie<'_, Conn, GetDeviceDontPropagateListReply>, ConnectionError>
140where
141    Conn: RequestConnection + ?Sized,
142{
143    let request0 = GetDeviceDontPropagateListRequest {
144        window,
145    };
146    let (bytes, fds) = request0.serialize(major_opcode(conn).await?);
147    let slices = [IoSlice::new(&bytes[0])];
148    assert_eq!(slices.len(), bytes.len());
149    conn.send_request_with_reply(&slices, fds).await
150}
151pub async fn get_device_motion_events<Conn, A>(conn: &Conn, start: xproto::Timestamp, stop: A, device_id: u8) -> Result<Cookie<'_, Conn, GetDeviceMotionEventsReply>, ConnectionError>
152where
153    Conn: RequestConnection + ?Sized,
154    A: Into<xproto::Timestamp> + Send,
155{
156    let stop: xproto::Timestamp = stop.into();
157    let request0 = GetDeviceMotionEventsRequest {
158        start,
159        stop,
160        device_id,
161    };
162    let (bytes, fds) = request0.serialize(major_opcode(conn).await?);
163    let slices = [IoSlice::new(&bytes[0])];
164    assert_eq!(slices.len(), bytes.len());
165    conn.send_request_with_reply(&slices, fds).await
166}
167pub async fn change_keyboard_device<Conn>(conn: &Conn, device_id: u8) -> Result<Cookie<'_, Conn, ChangeKeyboardDeviceReply>, ConnectionError>
168where
169    Conn: RequestConnection + ?Sized,
170{
171    let request0 = ChangeKeyboardDeviceRequest {
172        device_id,
173    };
174    let (bytes, fds) = request0.serialize(major_opcode(conn).await?);
175    let slices = [IoSlice::new(&bytes[0])];
176    assert_eq!(slices.len(), bytes.len());
177    conn.send_request_with_reply(&slices, fds).await
178}
179pub async fn change_pointer_device<Conn>(conn: &Conn, x_axis: u8, y_axis: u8, device_id: u8) -> Result<Cookie<'_, Conn, ChangePointerDeviceReply>, ConnectionError>
180where
181    Conn: RequestConnection + ?Sized,
182{
183    let request0 = ChangePointerDeviceRequest {
184        x_axis,
185        y_axis,
186        device_id,
187    };
188    let (bytes, fds) = request0.serialize(major_opcode(conn).await?);
189    let slices = [IoSlice::new(&bytes[0])];
190    assert_eq!(slices.len(), bytes.len());
191    conn.send_request_with_reply(&slices, fds).await
192}
193pub async fn grab_device<'c, 'input, Conn, A>(conn: &'c Conn, grab_window: xproto::Window, time: A, this_device_mode: xproto::GrabMode, other_device_mode: xproto::GrabMode, owner_events: bool, device_id: u8, classes: &'input [EventClass]) -> Result<Cookie<'c, Conn, GrabDeviceReply>, ConnectionError>
194where
195    Conn: RequestConnection + ?Sized,
196    A: Into<xproto::Timestamp> + Send,
197{
198    let time: xproto::Timestamp = time.into();
199    let request0 = GrabDeviceRequest {
200        grab_window,
201        time,
202        this_device_mode,
203        other_device_mode,
204        owner_events,
205        device_id,
206        classes: Cow::Borrowed(classes),
207    };
208    let (bytes, fds) = request0.serialize(major_opcode(conn).await?);
209    let slices = [IoSlice::new(&bytes[0]), IoSlice::new(&bytes[1]), IoSlice::new(&bytes[2])];
210    assert_eq!(slices.len(), bytes.len());
211    conn.send_request_with_reply(&slices, fds).await
212}
213pub async fn ungrab_device<Conn, A>(conn: &Conn, time: A, device_id: u8) -> Result<VoidCookie<'_, Conn>, ConnectionError>
214where
215    Conn: RequestConnection + ?Sized,
216    A: Into<xproto::Timestamp> + Send,
217{
218    let time: xproto::Timestamp = time.into();
219    let request0 = UngrabDeviceRequest {
220        time,
221        device_id,
222    };
223    let (bytes, fds) = request0.serialize(major_opcode(conn).await?);
224    let slices = [IoSlice::new(&bytes[0])];
225    assert_eq!(slices.len(), bytes.len());
226    conn.send_request_without_reply(&slices, fds).await
227}
228pub async fn grab_device_key<'c, 'input, Conn, A, B>(conn: &'c Conn, grab_window: xproto::Window, modifiers: xproto::ModMask, modifier_device: A, grabbed_device: u8, key: B, this_device_mode: xproto::GrabMode, other_device_mode: xproto::GrabMode, owner_events: bool, classes: &'input [EventClass]) -> Result<VoidCookie<'c, Conn>, ConnectionError>
229where
230    Conn: RequestConnection + ?Sized,
231    A: Into<u8> + Send,
232    B: Into<u8> + Send,
233{
234    let modifier_device: u8 = modifier_device.into();
235    let key: u8 = key.into();
236    let request0 = GrabDeviceKeyRequest {
237        grab_window,
238        modifiers,
239        modifier_device,
240        grabbed_device,
241        key,
242        this_device_mode,
243        other_device_mode,
244        owner_events,
245        classes: Cow::Borrowed(classes),
246    };
247    let (bytes, fds) = request0.serialize(major_opcode(conn).await?);
248    let slices = [IoSlice::new(&bytes[0]), IoSlice::new(&bytes[1]), IoSlice::new(&bytes[2])];
249    assert_eq!(slices.len(), bytes.len());
250    conn.send_request_without_reply(&slices, fds).await
251}
252pub async fn ungrab_device_key<Conn, A, B>(conn: &Conn, grab_window: xproto::Window, modifiers: xproto::ModMask, modifier_device: A, key: B, grabbed_device: u8) -> Result<VoidCookie<'_, Conn>, ConnectionError>
253where
254    Conn: RequestConnection + ?Sized,
255    A: Into<u8> + Send,
256    B: Into<u8> + Send,
257{
258    let modifier_device: u8 = modifier_device.into();
259    let key: u8 = key.into();
260    let request0 = UngrabDeviceKeyRequest {
261        grab_window,
262        modifiers,
263        modifier_device,
264        key,
265        grabbed_device,
266    };
267    let (bytes, fds) = request0.serialize(major_opcode(conn).await?);
268    let slices = [IoSlice::new(&bytes[0])];
269    assert_eq!(slices.len(), bytes.len());
270    conn.send_request_without_reply(&slices, fds).await
271}
272pub async fn grab_device_button<'c, 'input, Conn, A, B>(conn: &'c Conn, grab_window: xproto::Window, grabbed_device: u8, modifier_device: A, modifiers: xproto::ModMask, this_device_mode: xproto::GrabMode, other_device_mode: xproto::GrabMode, button: B, owner_events: bool, classes: &'input [EventClass]) -> Result<VoidCookie<'c, Conn>, ConnectionError>
273where
274    Conn: RequestConnection + ?Sized,
275    A: Into<u8> + Send,
276    B: Into<u8> + Send,
277{
278    let modifier_device: u8 = modifier_device.into();
279    let button: u8 = button.into();
280    let request0 = GrabDeviceButtonRequest {
281        grab_window,
282        grabbed_device,
283        modifier_device,
284        modifiers,
285        this_device_mode,
286        other_device_mode,
287        button,
288        owner_events,
289        classes: Cow::Borrowed(classes),
290    };
291    let (bytes, fds) = request0.serialize(major_opcode(conn).await?);
292    let slices = [IoSlice::new(&bytes[0]), IoSlice::new(&bytes[1]), IoSlice::new(&bytes[2])];
293    assert_eq!(slices.len(), bytes.len());
294    conn.send_request_without_reply(&slices, fds).await
295}
296pub async fn ungrab_device_button<Conn, A, B>(conn: &Conn, grab_window: xproto::Window, modifiers: xproto::ModMask, modifier_device: A, button: B, grabbed_device: u8) -> Result<VoidCookie<'_, Conn>, ConnectionError>
297where
298    Conn: RequestConnection + ?Sized,
299    A: Into<u8> + Send,
300    B: Into<u8> + Send,
301{
302    let modifier_device: u8 = modifier_device.into();
303    let button: u8 = button.into();
304    let request0 = UngrabDeviceButtonRequest {
305        grab_window,
306        modifiers,
307        modifier_device,
308        button,
309        grabbed_device,
310    };
311    let (bytes, fds) = request0.serialize(major_opcode(conn).await?);
312    let slices = [IoSlice::new(&bytes[0])];
313    assert_eq!(slices.len(), bytes.len());
314    conn.send_request_without_reply(&slices, fds).await
315}
316pub async fn allow_device_events<Conn, A>(conn: &Conn, time: A, mode: DeviceInputMode, device_id: u8) -> Result<VoidCookie<'_, Conn>, ConnectionError>
317where
318    Conn: RequestConnection + ?Sized,
319    A: Into<xproto::Timestamp> + Send,
320{
321    let time: xproto::Timestamp = time.into();
322    let request0 = AllowDeviceEventsRequest {
323        time,
324        mode,
325        device_id,
326    };
327    let (bytes, fds) = request0.serialize(major_opcode(conn).await?);
328    let slices = [IoSlice::new(&bytes[0])];
329    assert_eq!(slices.len(), bytes.len());
330    conn.send_request_without_reply(&slices, fds).await
331}
332pub async fn get_device_focus<Conn>(conn: &Conn, device_id: u8) -> Result<Cookie<'_, Conn, GetDeviceFocusReply>, ConnectionError>
333where
334    Conn: RequestConnection + ?Sized,
335{
336    let request0 = GetDeviceFocusRequest {
337        device_id,
338    };
339    let (bytes, fds) = request0.serialize(major_opcode(conn).await?);
340    let slices = [IoSlice::new(&bytes[0])];
341    assert_eq!(slices.len(), bytes.len());
342    conn.send_request_with_reply(&slices, fds).await
343}
344pub async fn set_device_focus<Conn, A, B>(conn: &Conn, focus: A, time: B, revert_to: xproto::InputFocus, device_id: u8) -> Result<VoidCookie<'_, Conn>, ConnectionError>
345where
346    Conn: RequestConnection + ?Sized,
347    A: Into<xproto::Window> + Send,
348    B: Into<xproto::Timestamp> + Send,
349{
350    let focus: xproto::Window = focus.into();
351    let time: xproto::Timestamp = time.into();
352    let request0 = SetDeviceFocusRequest {
353        focus,
354        time,
355        revert_to,
356        device_id,
357    };
358    let (bytes, fds) = request0.serialize(major_opcode(conn).await?);
359    let slices = [IoSlice::new(&bytes[0])];
360    assert_eq!(slices.len(), bytes.len());
361    conn.send_request_without_reply(&slices, fds).await
362}
363pub async fn get_feedback_control<Conn>(conn: &Conn, device_id: u8) -> Result<Cookie<'_, Conn, GetFeedbackControlReply>, ConnectionError>
364where
365    Conn: RequestConnection + ?Sized,
366{
367    let request0 = GetFeedbackControlRequest {
368        device_id,
369    };
370    let (bytes, fds) = request0.serialize(major_opcode(conn).await?);
371    let slices = [IoSlice::new(&bytes[0])];
372    assert_eq!(slices.len(), bytes.len());
373    conn.send_request_with_reply(&slices, fds).await
374}
375pub async fn change_feedback_control<Conn>(conn: &Conn, mask: ChangeFeedbackControlMask, device_id: u8, feedback_id: u8, feedback: FeedbackCtl) -> Result<VoidCookie<'_, Conn>, ConnectionError>
376where
377    Conn: RequestConnection + ?Sized,
378{
379    let request0 = ChangeFeedbackControlRequest {
380        mask,
381        device_id,
382        feedback_id,
383        feedback,
384    };
385    let (bytes, fds) = request0.serialize(major_opcode(conn).await?);
386    let slices = [IoSlice::new(&bytes[0]), IoSlice::new(&bytes[1]), IoSlice::new(&bytes[2])];
387    assert_eq!(slices.len(), bytes.len());
388    conn.send_request_without_reply(&slices, fds).await
389}
390pub async fn get_device_key_mapping<Conn>(conn: &Conn, device_id: u8, first_keycode: KeyCode, count: u8) -> Result<Cookie<'_, Conn, GetDeviceKeyMappingReply>, ConnectionError>
391where
392    Conn: RequestConnection + ?Sized,
393{
394    let request0 = GetDeviceKeyMappingRequest {
395        device_id,
396        first_keycode,
397        count,
398    };
399    let (bytes, fds) = request0.serialize(major_opcode(conn).await?);
400    let slices = [IoSlice::new(&bytes[0])];
401    assert_eq!(slices.len(), bytes.len());
402    conn.send_request_with_reply(&slices, fds).await
403}
404pub async fn change_device_key_mapping<'c, 'input, Conn>(conn: &'c Conn, device_id: u8, first_keycode: KeyCode, keysyms_per_keycode: u8, keycode_count: u8, keysyms: &'input [xproto::Keysym]) -> Result<VoidCookie<'c, Conn>, ConnectionError>
405where
406    Conn: RequestConnection + ?Sized,
407{
408    let request0 = ChangeDeviceKeyMappingRequest {
409        device_id,
410        first_keycode,
411        keysyms_per_keycode,
412        keycode_count,
413        keysyms: Cow::Borrowed(keysyms),
414    };
415    let (bytes, fds) = request0.serialize(major_opcode(conn).await?);
416    let slices = [IoSlice::new(&bytes[0]), IoSlice::new(&bytes[1]), IoSlice::new(&bytes[2])];
417    assert_eq!(slices.len(), bytes.len());
418    conn.send_request_without_reply(&slices, fds).await
419}
420pub async fn get_device_modifier_mapping<Conn>(conn: &Conn, device_id: u8) -> Result<Cookie<'_, Conn, GetDeviceModifierMappingReply>, ConnectionError>
421where
422    Conn: RequestConnection + ?Sized,
423{
424    let request0 = GetDeviceModifierMappingRequest {
425        device_id,
426    };
427    let (bytes, fds) = request0.serialize(major_opcode(conn).await?);
428    let slices = [IoSlice::new(&bytes[0])];
429    assert_eq!(slices.len(), bytes.len());
430    conn.send_request_with_reply(&slices, fds).await
431}
432pub async fn set_device_modifier_mapping<'c, 'input, Conn>(conn: &'c Conn, device_id: u8, keymaps: &'input [u8]) -> Result<Cookie<'c, Conn, SetDeviceModifierMappingReply>, ConnectionError>
433where
434    Conn: RequestConnection + ?Sized,
435{
436    let request0 = SetDeviceModifierMappingRequest {
437        device_id,
438        keymaps: Cow::Borrowed(keymaps),
439    };
440    let (bytes, fds) = request0.serialize(major_opcode(conn).await?);
441    let slices = [IoSlice::new(&bytes[0]), IoSlice::new(&bytes[1]), IoSlice::new(&bytes[2])];
442    assert_eq!(slices.len(), bytes.len());
443    conn.send_request_with_reply(&slices, fds).await
444}
445pub async fn get_device_button_mapping<Conn>(conn: &Conn, device_id: u8) -> Result<Cookie<'_, Conn, GetDeviceButtonMappingReply>, ConnectionError>
446where
447    Conn: RequestConnection + ?Sized,
448{
449    let request0 = GetDeviceButtonMappingRequest {
450        device_id,
451    };
452    let (bytes, fds) = request0.serialize(major_opcode(conn).await?);
453    let slices = [IoSlice::new(&bytes[0])];
454    assert_eq!(slices.len(), bytes.len());
455    conn.send_request_with_reply(&slices, fds).await
456}
457pub async fn set_device_button_mapping<'c, 'input, Conn>(conn: &'c Conn, device_id: u8, map: &'input [u8]) -> Result<Cookie<'c, Conn, SetDeviceButtonMappingReply>, ConnectionError>
458where
459    Conn: RequestConnection + ?Sized,
460{
461    let request0 = SetDeviceButtonMappingRequest {
462        device_id,
463        map: Cow::Borrowed(map),
464    };
465    let (bytes, fds) = request0.serialize(major_opcode(conn).await?);
466    let slices = [IoSlice::new(&bytes[0]), IoSlice::new(&bytes[1]), IoSlice::new(&bytes[2])];
467    assert_eq!(slices.len(), bytes.len());
468    conn.send_request_with_reply(&slices, fds).await
469}
470pub async fn query_device_state<Conn>(conn: &Conn, device_id: u8) -> Result<Cookie<'_, Conn, QueryDeviceStateReply>, ConnectionError>
471where
472    Conn: RequestConnection + ?Sized,
473{
474    let request0 = QueryDeviceStateRequest {
475        device_id,
476    };
477    let (bytes, fds) = request0.serialize(major_opcode(conn).await?);
478    let slices = [IoSlice::new(&bytes[0])];
479    assert_eq!(slices.len(), bytes.len());
480    conn.send_request_with_reply(&slices, fds).await
481}
482pub async fn device_bell<Conn>(conn: &Conn, device_id: u8, feedback_id: u8, feedback_class: u8, percent: i8) -> Result<VoidCookie<'_, Conn>, ConnectionError>
483where
484    Conn: RequestConnection + ?Sized,
485{
486    let request0 = DeviceBellRequest {
487        device_id,
488        feedback_id,
489        feedback_class,
490        percent,
491    };
492    let (bytes, fds) = request0.serialize(major_opcode(conn).await?);
493    let slices = [IoSlice::new(&bytes[0])];
494    assert_eq!(slices.len(), bytes.len());
495    conn.send_request_without_reply(&slices, fds).await
496}
497pub async fn set_device_valuators<'c, 'input, Conn>(conn: &'c Conn, device_id: u8, first_valuator: u8, valuators: &'input [i32]) -> Result<Cookie<'c, Conn, SetDeviceValuatorsReply>, ConnectionError>
498where
499    Conn: RequestConnection + ?Sized,
500{
501    let request0 = SetDeviceValuatorsRequest {
502        device_id,
503        first_valuator,
504        valuators: Cow::Borrowed(valuators),
505    };
506    let (bytes, fds) = request0.serialize(major_opcode(conn).await?);
507    let slices = [IoSlice::new(&bytes[0]), IoSlice::new(&bytes[1]), IoSlice::new(&bytes[2])];
508    assert_eq!(slices.len(), bytes.len());
509    conn.send_request_with_reply(&slices, fds).await
510}
511pub async fn get_device_control<Conn>(conn: &Conn, control_id: DeviceControl, device_id: u8) -> Result<Cookie<'_, Conn, GetDeviceControlReply>, ConnectionError>
512where
513    Conn: RequestConnection + ?Sized,
514{
515    let request0 = GetDeviceControlRequest {
516        control_id,
517        device_id,
518    };
519    let (bytes, fds) = request0.serialize(major_opcode(conn).await?);
520    let slices = [IoSlice::new(&bytes[0])];
521    assert_eq!(slices.len(), bytes.len());
522    conn.send_request_with_reply(&slices, fds).await
523}
524pub async fn change_device_control<Conn>(conn: &Conn, control_id: DeviceControl, device_id: u8, control: DeviceCtl) -> Result<Cookie<'_, Conn, ChangeDeviceControlReply>, ConnectionError>
525where
526    Conn: RequestConnection + ?Sized,
527{
528    let request0 = ChangeDeviceControlRequest {
529        control_id,
530        device_id,
531        control,
532    };
533    let (bytes, fds) = request0.serialize(major_opcode(conn).await?);
534    let slices = [IoSlice::new(&bytes[0]), IoSlice::new(&bytes[1]), IoSlice::new(&bytes[2])];
535    assert_eq!(slices.len(), bytes.len());
536    conn.send_request_with_reply(&slices, fds).await
537}
538pub async fn list_device_properties<Conn>(conn: &Conn, device_id: u8) -> Result<Cookie<'_, Conn, ListDevicePropertiesReply>, ConnectionError>
539where
540    Conn: RequestConnection + ?Sized,
541{
542    let request0 = ListDevicePropertiesRequest {
543        device_id,
544    };
545    let (bytes, fds) = request0.serialize(major_opcode(conn).await?);
546    let slices = [IoSlice::new(&bytes[0])];
547    assert_eq!(slices.len(), bytes.len());
548    conn.send_request_with_reply(&slices, fds).await
549}
550pub async fn change_device_property<'c, 'input, Conn>(conn: &'c Conn, property: xproto::Atom, type_: xproto::Atom, device_id: u8, mode: xproto::PropMode, num_items: u32, items: &'input ChangeDevicePropertyAux) -> Result<VoidCookie<'c, Conn>, ConnectionError>
551where
552    Conn: RequestConnection + ?Sized,
553{
554    let request0 = ChangeDevicePropertyRequest {
555        property,
556        type_,
557        device_id,
558        mode,
559        num_items,
560        items: Cow::Borrowed(items),
561    };
562    let (bytes, fds) = request0.serialize(major_opcode(conn).await?);
563    let slices = [IoSlice::new(&bytes[0]), IoSlice::new(&bytes[1]), IoSlice::new(&bytes[2])];
564    assert_eq!(slices.len(), bytes.len());
565    conn.send_request_without_reply(&slices, fds).await
566}
567pub async fn delete_device_property<Conn>(conn: &Conn, property: xproto::Atom, device_id: u8) -> Result<VoidCookie<'_, Conn>, ConnectionError>
568where
569    Conn: RequestConnection + ?Sized,
570{
571    let request0 = DeleteDevicePropertyRequest {
572        property,
573        device_id,
574    };
575    let (bytes, fds) = request0.serialize(major_opcode(conn).await?);
576    let slices = [IoSlice::new(&bytes[0])];
577    assert_eq!(slices.len(), bytes.len());
578    conn.send_request_without_reply(&slices, fds).await
579}
580pub async fn get_device_property<Conn>(conn: &Conn, property: xproto::Atom, type_: xproto::Atom, offset: u32, len: u32, device_id: u8, delete: bool) -> Result<Cookie<'_, Conn, GetDevicePropertyReply>, ConnectionError>
581where
582    Conn: RequestConnection + ?Sized,
583{
584    let request0 = GetDevicePropertyRequest {
585        property,
586        type_,
587        offset,
588        len,
589        device_id,
590        delete,
591    };
592    let (bytes, fds) = request0.serialize(major_opcode(conn).await?);
593    let slices = [IoSlice::new(&bytes[0])];
594    assert_eq!(slices.len(), bytes.len());
595    conn.send_request_with_reply(&slices, fds).await
596}
597pub async fn xi_query_pointer<Conn, A>(conn: &Conn, window: xproto::Window, deviceid: A) -> Result<Cookie<'_, Conn, XIQueryPointerReply>, ConnectionError>
598where
599    Conn: RequestConnection + ?Sized,
600    A: Into<DeviceId> + Send,
601{
602    let deviceid: DeviceId = deviceid.into();
603    let request0 = XIQueryPointerRequest {
604        window,
605        deviceid,
606    };
607    let (bytes, fds) = request0.serialize(major_opcode(conn).await?);
608    let slices = [IoSlice::new(&bytes[0])];
609    assert_eq!(slices.len(), bytes.len());
610    conn.send_request_with_reply(&slices, fds).await
611}
612pub async fn xi_warp_pointer<Conn, A>(conn: &Conn, src_win: xproto::Window, dst_win: xproto::Window, src_x: Fp1616, src_y: Fp1616, src_width: u16, src_height: u16, dst_x: Fp1616, dst_y: Fp1616, deviceid: A) -> Result<VoidCookie<'_, Conn>, ConnectionError>
613where
614    Conn: RequestConnection + ?Sized,
615    A: Into<DeviceId> + Send,
616{
617    let deviceid: DeviceId = deviceid.into();
618    let request0 = XIWarpPointerRequest {
619        src_win,
620        dst_win,
621        src_x,
622        src_y,
623        src_width,
624        src_height,
625        dst_x,
626        dst_y,
627        deviceid,
628    };
629    let (bytes, fds) = request0.serialize(major_opcode(conn).await?);
630    let slices = [IoSlice::new(&bytes[0])];
631    assert_eq!(slices.len(), bytes.len());
632    conn.send_request_without_reply(&slices, fds).await
633}
634pub async fn xi_change_cursor<Conn, A>(conn: &Conn, window: xproto::Window, cursor: xproto::Cursor, deviceid: A) -> Result<VoidCookie<'_, Conn>, ConnectionError>
635where
636    Conn: RequestConnection + ?Sized,
637    A: Into<DeviceId> + Send,
638{
639    let deviceid: DeviceId = deviceid.into();
640    let request0 = XIChangeCursorRequest {
641        window,
642        cursor,
643        deviceid,
644    };
645    let (bytes, fds) = request0.serialize(major_opcode(conn).await?);
646    let slices = [IoSlice::new(&bytes[0])];
647    assert_eq!(slices.len(), bytes.len());
648    conn.send_request_without_reply(&slices, fds).await
649}
650pub async fn xi_change_hierarchy<'c, 'input, Conn>(conn: &'c Conn, changes: &'input [HierarchyChange]) -> Result<VoidCookie<'c, Conn>, ConnectionError>
651where
652    Conn: RequestConnection + ?Sized,
653{
654    let request0 = XIChangeHierarchyRequest {
655        changes: Cow::Borrowed(changes),
656    };
657    let (bytes, fds) = request0.serialize(major_opcode(conn).await?);
658    let slices = [IoSlice::new(&bytes[0]), IoSlice::new(&bytes[1]), IoSlice::new(&bytes[2])];
659    assert_eq!(slices.len(), bytes.len());
660    conn.send_request_without_reply(&slices, fds).await
661}
662pub async fn xi_set_client_pointer<Conn, A>(conn: &Conn, window: xproto::Window, deviceid: A) -> Result<VoidCookie<'_, Conn>, ConnectionError>
663where
664    Conn: RequestConnection + ?Sized,
665    A: Into<DeviceId> + Send,
666{
667    let deviceid: DeviceId = deviceid.into();
668    let request0 = XISetClientPointerRequest {
669        window,
670        deviceid,
671    };
672    let (bytes, fds) = request0.serialize(major_opcode(conn).await?);
673    let slices = [IoSlice::new(&bytes[0])];
674    assert_eq!(slices.len(), bytes.len());
675    conn.send_request_without_reply(&slices, fds).await
676}
677pub async fn xi_get_client_pointer<Conn>(conn: &Conn, window: xproto::Window) -> Result<Cookie<'_, Conn, XIGetClientPointerReply>, ConnectionError>
678where
679    Conn: RequestConnection + ?Sized,
680{
681    let request0 = XIGetClientPointerRequest {
682        window,
683    };
684    let (bytes, fds) = request0.serialize(major_opcode(conn).await?);
685    let slices = [IoSlice::new(&bytes[0])];
686    assert_eq!(slices.len(), bytes.len());
687    conn.send_request_with_reply(&slices, fds).await
688}
689pub async fn xi_select_events<'c, 'input, Conn>(conn: &'c Conn, window: xproto::Window, masks: &'input [EventMask]) -> Result<VoidCookie<'c, Conn>, ConnectionError>
690where
691    Conn: RequestConnection + ?Sized,
692{
693    let request0 = XISelectEventsRequest {
694        window,
695        masks: Cow::Borrowed(masks),
696    };
697    let (bytes, fds) = request0.serialize(major_opcode(conn).await?);
698    let slices = [IoSlice::new(&bytes[0]), IoSlice::new(&bytes[1]), IoSlice::new(&bytes[2])];
699    assert_eq!(slices.len(), bytes.len());
700    conn.send_request_without_reply(&slices, fds).await
701}
702pub async fn xi_query_version<Conn>(conn: &Conn, major_version: u16, minor_version: u16) -> Result<Cookie<'_, Conn, XIQueryVersionReply>, ConnectionError>
703where
704    Conn: RequestConnection + ?Sized,
705{
706    let request0 = XIQueryVersionRequest {
707        major_version,
708        minor_version,
709    };
710    let (bytes, fds) = request0.serialize(major_opcode(conn).await?);
711    let slices = [IoSlice::new(&bytes[0])];
712    assert_eq!(slices.len(), bytes.len());
713    conn.send_request_with_reply(&slices, fds).await
714}
715pub async fn xi_query_device<Conn, A>(conn: &Conn, deviceid: A) -> Result<Cookie<'_, Conn, XIQueryDeviceReply>, ConnectionError>
716where
717    Conn: RequestConnection + ?Sized,
718    A: Into<DeviceId> + Send,
719{
720    let deviceid: DeviceId = deviceid.into();
721    let request0 = XIQueryDeviceRequest {
722        deviceid,
723    };
724    let (bytes, fds) = request0.serialize(major_opcode(conn).await?);
725    let slices = [IoSlice::new(&bytes[0])];
726    assert_eq!(slices.len(), bytes.len());
727    conn.send_request_with_reply(&slices, fds).await
728}
729pub async fn xi_set_focus<Conn, A, B>(conn: &Conn, window: xproto::Window, time: A, deviceid: B) -> Result<VoidCookie<'_, Conn>, ConnectionError>
730where
731    Conn: RequestConnection + ?Sized,
732    A: Into<xproto::Timestamp> + Send,
733    B: Into<DeviceId> + Send,
734{
735    let time: xproto::Timestamp = time.into();
736    let deviceid: DeviceId = deviceid.into();
737    let request0 = XISetFocusRequest {
738        window,
739        time,
740        deviceid,
741    };
742    let (bytes, fds) = request0.serialize(major_opcode(conn).await?);
743    let slices = [IoSlice::new(&bytes[0])];
744    assert_eq!(slices.len(), bytes.len());
745    conn.send_request_without_reply(&slices, fds).await
746}
747pub async fn xi_get_focus<Conn, A>(conn: &Conn, deviceid: A) -> Result<Cookie<'_, Conn, XIGetFocusReply>, ConnectionError>
748where
749    Conn: RequestConnection + ?Sized,
750    A: Into<DeviceId> + Send,
751{
752    let deviceid: DeviceId = deviceid.into();
753    let request0 = XIGetFocusRequest {
754        deviceid,
755    };
756    let (bytes, fds) = request0.serialize(major_opcode(conn).await?);
757    let slices = [IoSlice::new(&bytes[0])];
758    assert_eq!(slices.len(), bytes.len());
759    conn.send_request_with_reply(&slices, fds).await
760}
761pub async fn xi_grab_device<'c, 'input, Conn, A, B>(conn: &'c Conn, window: xproto::Window, time: A, cursor: xproto::Cursor, deviceid: B, mode: xproto::GrabMode, paired_device_mode: xproto::GrabMode, owner_events: GrabOwner, mask: &'input [u32]) -> Result<Cookie<'c, Conn, XIGrabDeviceReply>, ConnectionError>
762where
763    Conn: RequestConnection + ?Sized,
764    A: Into<xproto::Timestamp> + Send,
765    B: Into<DeviceId> + Send,
766{
767    let time: xproto::Timestamp = time.into();
768    let deviceid: DeviceId = deviceid.into();
769    let request0 = XIGrabDeviceRequest {
770        window,
771        time,
772        cursor,
773        deviceid,
774        mode,
775        paired_device_mode,
776        owner_events,
777        mask: Cow::Borrowed(mask),
778    };
779    let (bytes, fds) = request0.serialize(major_opcode(conn).await?);
780    let slices = [IoSlice::new(&bytes[0]), IoSlice::new(&bytes[1]), IoSlice::new(&bytes[2])];
781    assert_eq!(slices.len(), bytes.len());
782    conn.send_request_with_reply(&slices, fds).await
783}
784pub async fn xi_ungrab_device<Conn, A, B>(conn: &Conn, time: A, deviceid: B) -> Result<VoidCookie<'_, Conn>, ConnectionError>
785where
786    Conn: RequestConnection + ?Sized,
787    A: Into<xproto::Timestamp> + Send,
788    B: Into<DeviceId> + Send,
789{
790    let time: xproto::Timestamp = time.into();
791    let deviceid: DeviceId = deviceid.into();
792    let request0 = XIUngrabDeviceRequest {
793        time,
794        deviceid,
795    };
796    let (bytes, fds) = request0.serialize(major_opcode(conn).await?);
797    let slices = [IoSlice::new(&bytes[0])];
798    assert_eq!(slices.len(), bytes.len());
799    conn.send_request_without_reply(&slices, fds).await
800}
801pub async fn xi_allow_events<Conn, A, B>(conn: &Conn, time: A, deviceid: B, event_mode: EventMode, touchid: u32, grab_window: xproto::Window) -> Result<VoidCookie<'_, Conn>, ConnectionError>
802where
803    Conn: RequestConnection + ?Sized,
804    A: Into<xproto::Timestamp> + Send,
805    B: Into<DeviceId> + Send,
806{
807    let time: xproto::Timestamp = time.into();
808    let deviceid: DeviceId = deviceid.into();
809    let request0 = XIAllowEventsRequest {
810        time,
811        deviceid,
812        event_mode,
813        touchid,
814        grab_window,
815    };
816    let (bytes, fds) = request0.serialize(major_opcode(conn).await?);
817    let slices = [IoSlice::new(&bytes[0])];
818    assert_eq!(slices.len(), bytes.len());
819    conn.send_request_without_reply(&slices, fds).await
820}
821pub async fn xi_passive_grab_device<'c, 'input, Conn, A, B>(conn: &'c Conn, time: A, grab_window: xproto::Window, cursor: xproto::Cursor, detail: u32, deviceid: B, grab_type: GrabType, grab_mode: GrabMode22, paired_device_mode: xproto::GrabMode, owner_events: GrabOwner, mask: &'input [u32], modifiers: &'input [u32]) -> Result<Cookie<'c, Conn, XIPassiveGrabDeviceReply>, ConnectionError>
822where
823    Conn: RequestConnection + ?Sized,
824    A: Into<xproto::Timestamp> + Send,
825    B: Into<DeviceId> + Send,
826{
827    let time: xproto::Timestamp = time.into();
828    let deviceid: DeviceId = deviceid.into();
829    let request0 = XIPassiveGrabDeviceRequest {
830        time,
831        grab_window,
832        cursor,
833        detail,
834        deviceid,
835        grab_type,
836        grab_mode,
837        paired_device_mode,
838        owner_events,
839        mask: Cow::Borrowed(mask),
840        modifiers: Cow::Borrowed(modifiers),
841    };
842    let (bytes, fds) = request0.serialize(major_opcode(conn).await?);
843    let slices = [IoSlice::new(&bytes[0]), IoSlice::new(&bytes[1]), IoSlice::new(&bytes[2]), IoSlice::new(&bytes[3])];
844    assert_eq!(slices.len(), bytes.len());
845    conn.send_request_with_reply(&slices, fds).await
846}
847pub async fn xi_passive_ungrab_device<'c, 'input, Conn, A>(conn: &'c Conn, grab_window: xproto::Window, detail: u32, deviceid: A, grab_type: GrabType, modifiers: &'input [u32]) -> Result<VoidCookie<'c, Conn>, ConnectionError>
848where
849    Conn: RequestConnection + ?Sized,
850    A: Into<DeviceId> + Send,
851{
852    let deviceid: DeviceId = deviceid.into();
853    let request0 = XIPassiveUngrabDeviceRequest {
854        grab_window,
855        detail,
856        deviceid,
857        grab_type,
858        modifiers: Cow::Borrowed(modifiers),
859    };
860    let (bytes, fds) = request0.serialize(major_opcode(conn).await?);
861    let slices = [IoSlice::new(&bytes[0]), IoSlice::new(&bytes[1]), IoSlice::new(&bytes[2])];
862    assert_eq!(slices.len(), bytes.len());
863    conn.send_request_without_reply(&slices, fds).await
864}
865pub async fn xi_list_properties<Conn, A>(conn: &Conn, deviceid: A) -> Result<Cookie<'_, Conn, XIListPropertiesReply>, ConnectionError>
866where
867    Conn: RequestConnection + ?Sized,
868    A: Into<DeviceId> + Send,
869{
870    let deviceid: DeviceId = deviceid.into();
871    let request0 = XIListPropertiesRequest {
872        deviceid,
873    };
874    let (bytes, fds) = request0.serialize(major_opcode(conn).await?);
875    let slices = [IoSlice::new(&bytes[0])];
876    assert_eq!(slices.len(), bytes.len());
877    conn.send_request_with_reply(&slices, fds).await
878}
879pub async fn xi_change_property<'c, 'input, Conn, A>(conn: &'c Conn, deviceid: A, mode: xproto::PropMode, property: xproto::Atom, type_: xproto::Atom, num_items: u32, items: &'input XIChangePropertyAux) -> Result<VoidCookie<'c, Conn>, ConnectionError>
880where
881    Conn: RequestConnection + ?Sized,
882    A: Into<DeviceId> + Send,
883{
884    let deviceid: DeviceId = deviceid.into();
885    let request0 = XIChangePropertyRequest {
886        deviceid,
887        mode,
888        property,
889        type_,
890        num_items,
891        items: Cow::Borrowed(items),
892    };
893    let (bytes, fds) = request0.serialize(major_opcode(conn).await?);
894    let slices = [IoSlice::new(&bytes[0]), IoSlice::new(&bytes[1]), IoSlice::new(&bytes[2])];
895    assert_eq!(slices.len(), bytes.len());
896    conn.send_request_without_reply(&slices, fds).await
897}
898pub async fn xi_delete_property<Conn, A>(conn: &Conn, deviceid: A, property: xproto::Atom) -> Result<VoidCookie<'_, Conn>, ConnectionError>
899where
900    Conn: RequestConnection + ?Sized,
901    A: Into<DeviceId> + Send,
902{
903    let deviceid: DeviceId = deviceid.into();
904    let request0 = XIDeletePropertyRequest {
905        deviceid,
906        property,
907    };
908    let (bytes, fds) = request0.serialize(major_opcode(conn).await?);
909    let slices = [IoSlice::new(&bytes[0])];
910    assert_eq!(slices.len(), bytes.len());
911    conn.send_request_without_reply(&slices, fds).await
912}
913pub async fn xi_get_property<Conn, A>(conn: &Conn, deviceid: A, delete: bool, property: xproto::Atom, type_: xproto::Atom, offset: u32, len: u32) -> Result<Cookie<'_, Conn, XIGetPropertyReply>, ConnectionError>
914where
915    Conn: RequestConnection + ?Sized,
916    A: Into<DeviceId> + Send,
917{
918    let deviceid: DeviceId = deviceid.into();
919    let request0 = XIGetPropertyRequest {
920        deviceid,
921        delete,
922        property,
923        type_,
924        offset,
925        len,
926    };
927    let (bytes, fds) = request0.serialize(major_opcode(conn).await?);
928    let slices = [IoSlice::new(&bytes[0])];
929    assert_eq!(slices.len(), bytes.len());
930    conn.send_request_with_reply(&slices, fds).await
931}
932pub async fn xi_get_selected_events<Conn>(conn: &Conn, window: xproto::Window) -> Result<Cookie<'_, Conn, XIGetSelectedEventsReply>, ConnectionError>
933where
934    Conn: RequestConnection + ?Sized,
935{
936    let request0 = XIGetSelectedEventsRequest {
937        window,
938    };
939    let (bytes, fds) = request0.serialize(major_opcode(conn).await?);
940    let slices = [IoSlice::new(&bytes[0])];
941    assert_eq!(slices.len(), bytes.len());
942    conn.send_request_with_reply(&slices, fds).await
943}
944pub async fn xi_barrier_release_pointer<'c, 'input, Conn>(conn: &'c Conn, barriers: &'input [BarrierReleasePointerInfo]) -> Result<VoidCookie<'c, Conn>, ConnectionError>
945where
946    Conn: RequestConnection + ?Sized,
947{
948    let request0 = XIBarrierReleasePointerRequest {
949        barriers: Cow::Borrowed(barriers),
950    };
951    let (bytes, fds) = request0.serialize(major_opcode(conn).await?);
952    let slices = [IoSlice::new(&bytes[0]), IoSlice::new(&bytes[1]), IoSlice::new(&bytes[2])];
953    assert_eq!(slices.len(), bytes.len());
954    conn.send_request_without_reply(&slices, fds).await
955}
956pub async fn send_extension_event<'c, 'input, Conn>(conn: &'c Conn, destination: xproto::Window, device_id: u8, propagate: bool, events: &'input [EventForSend], classes: &'input [EventClass]) -> Result<VoidCookie<'c, Conn>, ConnectionError>
957where
958    Conn: RequestConnection + ?Sized,
959{
960    let request0 = SendExtensionEventRequest {
961        destination,
962        device_id,
963        propagate,
964        events: Cow::Borrowed(events),
965        classes: Cow::Borrowed(classes),
966    };
967    let (bytes, fds) = request0.serialize(major_opcode(conn).await?);
968    let slices = [IoSlice::new(&bytes[0]), IoSlice::new(&bytes[1]), IoSlice::new(&bytes[2]), IoSlice::new(&bytes[3])];
969    assert_eq!(slices.len(), bytes.len());
970    conn.send_request_without_reply(&slices, fds).await
971}
972/// Extension trait defining the requests of this extension.
973pub trait ConnectionExt: RequestConnection {
974    fn xinput_get_extension_version<'c, 'input, 'future>(&'c self, name: &'input [u8]) -> Pin<Box<dyn Future<Output = Result<Cookie<'c, Self, GetExtensionVersionReply>, ConnectionError>> + Send + 'future>>
975    where
976        'c: 'future,
977        'input: 'future,
978    {
979        Box::pin(get_extension_version(self, name))
980    }
981    fn xinput_list_input_devices(&self) -> Pin<Box<dyn Future<Output = Result<Cookie<'_, Self, ListInputDevicesReply>, ConnectionError>> + Send + '_>>
982    {
983        Box::pin(list_input_devices(self))
984    }
985    fn xinput_open_device(&self, device_id: u8) -> Pin<Box<dyn Future<Output = Result<Cookie<'_, Self, OpenDeviceReply>, ConnectionError>> + Send + '_>>
986    {
987        Box::pin(open_device(self, device_id))
988    }
989    fn xinput_close_device(&self, device_id: u8) -> Pin<Box<dyn Future<Output = Result<VoidCookie<'_, Self>, ConnectionError>> + Send + '_>>
990    {
991        Box::pin(close_device(self, device_id))
992    }
993    fn xinput_set_device_mode(&self, device_id: u8, mode: ValuatorMode) -> Pin<Box<dyn Future<Output = Result<Cookie<'_, Self, SetDeviceModeReply>, ConnectionError>> + Send + '_>>
994    {
995        Box::pin(set_device_mode(self, device_id, mode))
996    }
997    fn xinput_select_extension_event<'c, 'input, 'future>(&'c self, window: xproto::Window, classes: &'input [EventClass]) -> Pin<Box<dyn Future<Output = Result<VoidCookie<'c, Self>, ConnectionError>> + Send + 'future>>
998    where
999        'c: 'future,
1000        'input: 'future,
1001    {
1002        Box::pin(select_extension_event(self, window, classes))
1003    }
1004    fn xinput_get_selected_extension_events(&self, window: xproto::Window) -> Pin<Box<dyn Future<Output = Result<Cookie<'_, Self, GetSelectedExtensionEventsReply>, ConnectionError>> + Send + '_>>
1005    {
1006        Box::pin(get_selected_extension_events(self, window))
1007    }
1008    fn xinput_change_device_dont_propagate_list<'c, 'input, 'future>(&'c self, window: xproto::Window, mode: PropagateMode, classes: &'input [EventClass]) -> Pin<Box<dyn Future<Output = Result<VoidCookie<'c, Self>, ConnectionError>> + Send + 'future>>
1009    where
1010        'c: 'future,
1011        'input: 'future,
1012    {
1013        Box::pin(change_device_dont_propagate_list(self, window, mode, classes))
1014    }
1015    fn xinput_get_device_dont_propagate_list(&self, window: xproto::Window) -> Pin<Box<dyn Future<Output = Result<Cookie<'_, Self, GetDeviceDontPropagateListReply>, ConnectionError>> + Send + '_>>
1016    {
1017        Box::pin(get_device_dont_propagate_list(self, window))
1018    }
1019    fn xinput_get_device_motion_events<A>(&self, start: xproto::Timestamp, stop: A, device_id: u8) -> Pin<Box<dyn Future<Output = Result<Cookie<'_, Self, GetDeviceMotionEventsReply>, ConnectionError>> + Send + '_>>
1020    where
1021        A: Into<xproto::Timestamp> + Send + 'static,
1022    {
1023        Box::pin(get_device_motion_events(self, start, stop, device_id))
1024    }
1025    fn xinput_change_keyboard_device(&self, device_id: u8) -> Pin<Box<dyn Future<Output = Result<Cookie<'_, Self, ChangeKeyboardDeviceReply>, ConnectionError>> + Send + '_>>
1026    {
1027        Box::pin(change_keyboard_device(self, device_id))
1028    }
1029    fn xinput_change_pointer_device(&self, x_axis: u8, y_axis: u8, device_id: u8) -> Pin<Box<dyn Future<Output = Result<Cookie<'_, Self, ChangePointerDeviceReply>, ConnectionError>> + Send + '_>>
1030    {
1031        Box::pin(change_pointer_device(self, x_axis, y_axis, device_id))
1032    }
1033    fn xinput_grab_device<'c, 'input, 'future, A>(&'c self, grab_window: xproto::Window, time: A, this_device_mode: xproto::GrabMode, other_device_mode: xproto::GrabMode, owner_events: bool, device_id: u8, classes: &'input [EventClass]) -> Pin<Box<dyn Future<Output = Result<Cookie<'c, Self, GrabDeviceReply>, ConnectionError>> + Send + 'future>>
1034    where
1035        A: Into<xproto::Timestamp> + Send + 'static,
1036        'c: 'future,
1037        'input: 'future,
1038    {
1039        Box::pin(grab_device(self, grab_window, time, this_device_mode, other_device_mode, owner_events, device_id, classes))
1040    }
1041    fn xinput_ungrab_device<A>(&self, time: A, device_id: u8) -> Pin<Box<dyn Future<Output = Result<VoidCookie<'_, Self>, ConnectionError>> + Send + '_>>
1042    where
1043        A: Into<xproto::Timestamp> + Send + 'static,
1044    {
1045        Box::pin(ungrab_device(self, time, device_id))
1046    }
1047    fn xinput_grab_device_key<'c, 'input, 'future, A, B>(&'c self, grab_window: xproto::Window, modifiers: xproto::ModMask, modifier_device: A, grabbed_device: u8, key: B, this_device_mode: xproto::GrabMode, other_device_mode: xproto::GrabMode, owner_events: bool, classes: &'input [EventClass]) -> Pin<Box<dyn Future<Output = Result<VoidCookie<'c, Self>, ConnectionError>> + Send + 'future>>
1048    where
1049        A: Into<u8> + Send + 'static,
1050        B: Into<u8> + Send + 'static,
1051        'c: 'future,
1052        'input: 'future,
1053    {
1054        Box::pin(grab_device_key(self, grab_window, modifiers, modifier_device, grabbed_device, key, this_device_mode, other_device_mode, owner_events, classes))
1055    }
1056    fn xinput_ungrab_device_key<A, B>(&self, grab_window: xproto::Window, modifiers: xproto::ModMask, modifier_device: A, key: B, grabbed_device: u8) -> Pin<Box<dyn Future<Output = Result<VoidCookie<'_, Self>, ConnectionError>> + Send + '_>>
1057    where
1058        A: Into<u8> + Send + 'static,
1059        B: Into<u8> + Send + 'static,
1060    {
1061        Box::pin(ungrab_device_key(self, grab_window, modifiers, modifier_device, key, grabbed_device))
1062    }
1063    fn xinput_grab_device_button<'c, 'input, 'future, A, B>(&'c self, grab_window: xproto::Window, grabbed_device: u8, modifier_device: A, modifiers: xproto::ModMask, this_device_mode: xproto::GrabMode, other_device_mode: xproto::GrabMode, button: B, owner_events: bool, classes: &'input [EventClass]) -> Pin<Box<dyn Future<Output = Result<VoidCookie<'c, Self>, ConnectionError>> + Send + 'future>>
1064    where
1065        A: Into<u8> + Send + 'static,
1066        B: Into<u8> + Send + 'static,
1067        'c: 'future,
1068        'input: 'future,
1069    {
1070        Box::pin(grab_device_button(self, grab_window, grabbed_device, modifier_device, modifiers, this_device_mode, other_device_mode, button, owner_events, classes))
1071    }
1072    fn xinput_ungrab_device_button<A, B>(&self, grab_window: xproto::Window, modifiers: xproto::ModMask, modifier_device: A, button: B, grabbed_device: u8) -> Pin<Box<dyn Future<Output = Result<VoidCookie<'_, Self>, ConnectionError>> + Send + '_>>
1073    where
1074        A: Into<u8> + Send + 'static,
1075        B: Into<u8> + Send + 'static,
1076    {
1077        Box::pin(ungrab_device_button(self, grab_window, modifiers, modifier_device, button, grabbed_device))
1078    }
1079    fn xinput_allow_device_events<A>(&self, time: A, mode: DeviceInputMode, device_id: u8) -> Pin<Box<dyn Future<Output = Result<VoidCookie<'_, Self>, ConnectionError>> + Send + '_>>
1080    where
1081        A: Into<xproto::Timestamp> + Send + 'static,
1082    {
1083        Box::pin(allow_device_events(self, time, mode, device_id))
1084    }
1085    fn xinput_get_device_focus(&self, device_id: u8) -> Pin<Box<dyn Future<Output = Result<Cookie<'_, Self, GetDeviceFocusReply>, ConnectionError>> + Send + '_>>
1086    {
1087        Box::pin(get_device_focus(self, device_id))
1088    }
1089    fn xinput_set_device_focus<A, B>(&self, focus: A, time: B, revert_to: xproto::InputFocus, device_id: u8) -> Pin<Box<dyn Future<Output = Result<VoidCookie<'_, Self>, ConnectionError>> + Send + '_>>
1090    where
1091        A: Into<xproto::Window> + Send + 'static,
1092        B: Into<xproto::Timestamp> + Send + 'static,
1093    {
1094        Box::pin(set_device_focus(self, focus, time, revert_to, device_id))
1095    }
1096    fn xinput_get_feedback_control(&self, device_id: u8) -> Pin<Box<dyn Future<Output = Result<Cookie<'_, Self, GetFeedbackControlReply>, ConnectionError>> + Send + '_>>
1097    {
1098        Box::pin(get_feedback_control(self, device_id))
1099    }
1100    fn xinput_change_feedback_control(&self, mask: ChangeFeedbackControlMask, device_id: u8, feedback_id: u8, feedback: FeedbackCtl) -> Pin<Box<dyn Future<Output = Result<VoidCookie<'_, Self>, ConnectionError>> + Send + '_>>
1101    {
1102        Box::pin(change_feedback_control(self, mask, device_id, feedback_id, feedback))
1103    }
1104    fn xinput_get_device_key_mapping(&self, device_id: u8, first_keycode: KeyCode, count: u8) -> Pin<Box<dyn Future<Output = Result<Cookie<'_, Self, GetDeviceKeyMappingReply>, ConnectionError>> + Send + '_>>
1105    {
1106        Box::pin(get_device_key_mapping(self, device_id, first_keycode, count))
1107    }
1108    fn xinput_change_device_key_mapping<'c, 'input, 'future>(&'c self, device_id: u8, first_keycode: KeyCode, keysyms_per_keycode: u8, keycode_count: u8, keysyms: &'input [xproto::Keysym]) -> Pin<Box<dyn Future<Output = Result<VoidCookie<'c, Self>, ConnectionError>> + Send + 'future>>
1109    where
1110        'c: 'future,
1111        'input: 'future,
1112    {
1113        Box::pin(change_device_key_mapping(self, device_id, first_keycode, keysyms_per_keycode, keycode_count, keysyms))
1114    }
1115    fn xinput_get_device_modifier_mapping(&self, device_id: u8) -> Pin<Box<dyn Future<Output = Result<Cookie<'_, Self, GetDeviceModifierMappingReply>, ConnectionError>> + Send + '_>>
1116    {
1117        Box::pin(get_device_modifier_mapping(self, device_id))
1118    }
1119    fn xinput_set_device_modifier_mapping<'c, 'input, 'future>(&'c self, device_id: u8, keymaps: &'input [u8]) -> Pin<Box<dyn Future<Output = Result<Cookie<'c, Self, SetDeviceModifierMappingReply>, ConnectionError>> + Send + 'future>>
1120    where
1121        'c: 'future,
1122        'input: 'future,
1123    {
1124        Box::pin(set_device_modifier_mapping(self, device_id, keymaps))
1125    }
1126    fn xinput_get_device_button_mapping(&self, device_id: u8) -> Pin<Box<dyn Future<Output = Result<Cookie<'_, Self, GetDeviceButtonMappingReply>, ConnectionError>> + Send + '_>>
1127    {
1128        Box::pin(get_device_button_mapping(self, device_id))
1129    }
1130    fn xinput_set_device_button_mapping<'c, 'input, 'future>(&'c self, device_id: u8, map: &'input [u8]) -> Pin<Box<dyn Future<Output = Result<Cookie<'c, Self, SetDeviceButtonMappingReply>, ConnectionError>> + Send + 'future>>
1131    where
1132        'c: 'future,
1133        'input: 'future,
1134    {
1135        Box::pin(set_device_button_mapping(self, device_id, map))
1136    }
1137    fn xinput_query_device_state(&self, device_id: u8) -> Pin<Box<dyn Future<Output = Result<Cookie<'_, Self, QueryDeviceStateReply>, ConnectionError>> + Send + '_>>
1138    {
1139        Box::pin(query_device_state(self, device_id))
1140    }
1141    fn xinput_device_bell(&self, device_id: u8, feedback_id: u8, feedback_class: u8, percent: i8) -> Pin<Box<dyn Future<Output = Result<VoidCookie<'_, Self>, ConnectionError>> + Send + '_>>
1142    {
1143        Box::pin(device_bell(self, device_id, feedback_id, feedback_class, percent))
1144    }
1145    fn xinput_set_device_valuators<'c, 'input, 'future>(&'c self, device_id: u8, first_valuator: u8, valuators: &'input [i32]) -> Pin<Box<dyn Future<Output = Result<Cookie<'c, Self, SetDeviceValuatorsReply>, ConnectionError>> + Send + 'future>>
1146    where
1147        'c: 'future,
1148        'input: 'future,
1149    {
1150        Box::pin(set_device_valuators(self, device_id, first_valuator, valuators))
1151    }
1152    fn xinput_get_device_control(&self, control_id: DeviceControl, device_id: u8) -> Pin<Box<dyn Future<Output = Result<Cookie<'_, Self, GetDeviceControlReply>, ConnectionError>> + Send + '_>>
1153    {
1154        Box::pin(get_device_control(self, control_id, device_id))
1155    }
1156    fn xinput_change_device_control(&self, control_id: DeviceControl, device_id: u8, control: DeviceCtl) -> Pin<Box<dyn Future<Output = Result<Cookie<'_, Self, ChangeDeviceControlReply>, ConnectionError>> + Send + '_>>
1157    {
1158        Box::pin(change_device_control(self, control_id, device_id, control))
1159    }
1160    fn xinput_list_device_properties(&self, device_id: u8) -> Pin<Box<dyn Future<Output = Result<Cookie<'_, Self, ListDevicePropertiesReply>, ConnectionError>> + Send + '_>>
1161    {
1162        Box::pin(list_device_properties(self, device_id))
1163    }
1164    fn xinput_change_device_property<'c, 'input, 'future>(&'c self, property: xproto::Atom, type_: xproto::Atom, device_id: u8, mode: xproto::PropMode, num_items: u32, items: &'input ChangeDevicePropertyAux) -> Pin<Box<dyn Future<Output = Result<VoidCookie<'c, Self>, ConnectionError>> + Send + 'future>>
1165    where
1166        'c: 'future,
1167        'input: 'future,
1168    {
1169        Box::pin(change_device_property(self, property, type_, device_id, mode, num_items, items))
1170    }
1171    fn xinput_delete_device_property(&self, property: xproto::Atom, device_id: u8) -> Pin<Box<dyn Future<Output = Result<VoidCookie<'_, Self>, ConnectionError>> + Send + '_>>
1172    {
1173        Box::pin(delete_device_property(self, property, device_id))
1174    }
1175    fn xinput_get_device_property(&self, property: xproto::Atom, type_: xproto::Atom, offset: u32, len: u32, device_id: u8, delete: bool) -> Pin<Box<dyn Future<Output = Result<Cookie<'_, Self, GetDevicePropertyReply>, ConnectionError>> + Send + '_>>
1176    {
1177        Box::pin(get_device_property(self, property, type_, offset, len, device_id, delete))
1178    }
1179    fn xinput_xi_query_pointer<A>(&self, window: xproto::Window, deviceid: A) -> Pin<Box<dyn Future<Output = Result<Cookie<'_, Self, XIQueryPointerReply>, ConnectionError>> + Send + '_>>
1180    where
1181        A: Into<DeviceId> + Send + 'static,
1182    {
1183        Box::pin(xi_query_pointer(self, window, deviceid))
1184    }
1185    fn xinput_xi_warp_pointer<A>(&self, src_win: xproto::Window, dst_win: xproto::Window, src_x: Fp1616, src_y: Fp1616, src_width: u16, src_height: u16, dst_x: Fp1616, dst_y: Fp1616, deviceid: A) -> Pin<Box<dyn Future<Output = Result<VoidCookie<'_, Self>, ConnectionError>> + Send + '_>>
1186    where
1187        A: Into<DeviceId> + Send + 'static,
1188    {
1189        Box::pin(xi_warp_pointer(self, src_win, dst_win, src_x, src_y, src_width, src_height, dst_x, dst_y, deviceid))
1190    }
1191    fn xinput_xi_change_cursor<A>(&self, window: xproto::Window, cursor: xproto::Cursor, deviceid: A) -> Pin<Box<dyn Future<Output = Result<VoidCookie<'_, Self>, ConnectionError>> + Send + '_>>
1192    where
1193        A: Into<DeviceId> + Send + 'static,
1194    {
1195        Box::pin(xi_change_cursor(self, window, cursor, deviceid))
1196    }
1197    fn xinput_xi_change_hierarchy<'c, 'input, 'future>(&'c self, changes: &'input [HierarchyChange]) -> Pin<Box<dyn Future<Output = Result<VoidCookie<'c, Self>, ConnectionError>> + Send + 'future>>
1198    where
1199        'c: 'future,
1200        'input: 'future,
1201    {
1202        Box::pin(xi_change_hierarchy(self, changes))
1203    }
1204    fn xinput_xi_set_client_pointer<A>(&self, window: xproto::Window, deviceid: A) -> Pin<Box<dyn Future<Output = Result<VoidCookie<'_, Self>, ConnectionError>> + Send + '_>>
1205    where
1206        A: Into<DeviceId> + Send + 'static,
1207    {
1208        Box::pin(xi_set_client_pointer(self, window, deviceid))
1209    }
1210    fn xinput_xi_get_client_pointer(&self, window: xproto::Window) -> Pin<Box<dyn Future<Output = Result<Cookie<'_, Self, XIGetClientPointerReply>, ConnectionError>> + Send + '_>>
1211    {
1212        Box::pin(xi_get_client_pointer(self, window))
1213    }
1214    fn xinput_xi_select_events<'c, 'input, 'future>(&'c self, window: xproto::Window, masks: &'input [EventMask]) -> Pin<Box<dyn Future<Output = Result<VoidCookie<'c, Self>, ConnectionError>> + Send + 'future>>
1215    where
1216        'c: 'future,
1217        'input: 'future,
1218    {
1219        Box::pin(xi_select_events(self, window, masks))
1220    }
1221    fn xinput_xi_query_version(&self, major_version: u16, minor_version: u16) -> Pin<Box<dyn Future<Output = Result<Cookie<'_, Self, XIQueryVersionReply>, ConnectionError>> + Send + '_>>
1222    {
1223        Box::pin(xi_query_version(self, major_version, minor_version))
1224    }
1225    fn xinput_xi_query_device<A>(&self, deviceid: A) -> Pin<Box<dyn Future<Output = Result<Cookie<'_, Self, XIQueryDeviceReply>, ConnectionError>> + Send + '_>>
1226    where
1227        A: Into<DeviceId> + Send + 'static,
1228    {
1229        Box::pin(xi_query_device(self, deviceid))
1230    }
1231    fn xinput_xi_set_focus<A, B>(&self, window: xproto::Window, time: A, deviceid: B) -> Pin<Box<dyn Future<Output = Result<VoidCookie<'_, Self>, ConnectionError>> + Send + '_>>
1232    where
1233        A: Into<xproto::Timestamp> + Send + 'static,
1234        B: Into<DeviceId> + Send + 'static,
1235    {
1236        Box::pin(xi_set_focus(self, window, time, deviceid))
1237    }
1238    fn xinput_xi_get_focus<A>(&self, deviceid: A) -> Pin<Box<dyn Future<Output = Result<Cookie<'_, Self, XIGetFocusReply>, ConnectionError>> + Send + '_>>
1239    where
1240        A: Into<DeviceId> + Send + 'static,
1241    {
1242        Box::pin(xi_get_focus(self, deviceid))
1243    }
1244    fn xinput_xi_grab_device<'c, 'input, 'future, A, B>(&'c self, window: xproto::Window, time: A, cursor: xproto::Cursor, deviceid: B, mode: xproto::GrabMode, paired_device_mode: xproto::GrabMode, owner_events: GrabOwner, mask: &'input [u32]) -> Pin<Box<dyn Future<Output = Result<Cookie<'c, Self, XIGrabDeviceReply>, ConnectionError>> + Send + 'future>>
1245    where
1246        A: Into<xproto::Timestamp> + Send + 'static,
1247        B: Into<DeviceId> + Send + 'static,
1248        'c: 'future,
1249        'input: 'future,
1250    {
1251        Box::pin(xi_grab_device(self, window, time, cursor, deviceid, mode, paired_device_mode, owner_events, mask))
1252    }
1253    fn xinput_xi_ungrab_device<A, B>(&self, time: A, deviceid: B) -> Pin<Box<dyn Future<Output = Result<VoidCookie<'_, Self>, ConnectionError>> + Send + '_>>
1254    where
1255        A: Into<xproto::Timestamp> + Send + 'static,
1256        B: Into<DeviceId> + Send + 'static,
1257    {
1258        Box::pin(xi_ungrab_device(self, time, deviceid))
1259    }
1260    fn xinput_xi_allow_events<A, B>(&self, time: A, deviceid: B, event_mode: EventMode, touchid: u32, grab_window: xproto::Window) -> Pin<Box<dyn Future<Output = Result<VoidCookie<'_, Self>, ConnectionError>> + Send + '_>>
1261    where
1262        A: Into<xproto::Timestamp> + Send + 'static,
1263        B: Into<DeviceId> + Send + 'static,
1264    {
1265        Box::pin(xi_allow_events(self, time, deviceid, event_mode, touchid, grab_window))
1266    }
1267    fn xinput_xi_passive_grab_device<'c, 'input, 'future, A, B>(&'c self, time: A, grab_window: xproto::Window, cursor: xproto::Cursor, detail: u32, deviceid: B, grab_type: GrabType, grab_mode: GrabMode22, paired_device_mode: xproto::GrabMode, owner_events: GrabOwner, mask: &'input [u32], modifiers: &'input [u32]) -> Pin<Box<dyn Future<Output = Result<Cookie<'c, Self, XIPassiveGrabDeviceReply>, ConnectionError>> + Send + 'future>>
1268    where
1269        A: Into<xproto::Timestamp> + Send + 'static,
1270        B: Into<DeviceId> + Send + 'static,
1271        'c: 'future,
1272        'input: 'future,
1273    {
1274        Box::pin(xi_passive_grab_device(self, time, grab_window, cursor, detail, deviceid, grab_type, grab_mode, paired_device_mode, owner_events, mask, modifiers))
1275    }
1276    fn xinput_xi_passive_ungrab_device<'c, 'input, 'future, A>(&'c self, grab_window: xproto::Window, detail: u32, deviceid: A, grab_type: GrabType, modifiers: &'input [u32]) -> Pin<Box<dyn Future<Output = Result<VoidCookie<'c, Self>, ConnectionError>> + Send + 'future>>
1277    where
1278        A: Into<DeviceId> + Send + 'static,
1279        'c: 'future,
1280        'input: 'future,
1281    {
1282        Box::pin(xi_passive_ungrab_device(self, grab_window, detail, deviceid, grab_type, modifiers))
1283    }
1284    fn xinput_xi_list_properties<A>(&self, deviceid: A) -> Pin<Box<dyn Future<Output = Result<Cookie<'_, Self, XIListPropertiesReply>, ConnectionError>> + Send + '_>>
1285    where
1286        A: Into<DeviceId> + Send + 'static,
1287    {
1288        Box::pin(xi_list_properties(self, deviceid))
1289    }
1290    fn xinput_xi_change_property<'c, 'input, 'future, A>(&'c self, deviceid: A, mode: xproto::PropMode, property: xproto::Atom, type_: xproto::Atom, num_items: u32, items: &'input XIChangePropertyAux) -> Pin<Box<dyn Future<Output = Result<VoidCookie<'c, Self>, ConnectionError>> + Send + 'future>>
1291    where
1292        A: Into<DeviceId> + Send + 'static,
1293        'c: 'future,
1294        'input: 'future,
1295    {
1296        Box::pin(xi_change_property(self, deviceid, mode, property, type_, num_items, items))
1297    }
1298    fn xinput_xi_delete_property<A>(&self, deviceid: A, property: xproto::Atom) -> Pin<Box<dyn Future<Output = Result<VoidCookie<'_, Self>, ConnectionError>> + Send + '_>>
1299    where
1300        A: Into<DeviceId> + Send + 'static,
1301    {
1302        Box::pin(xi_delete_property(self, deviceid, property))
1303    }
1304    fn xinput_xi_get_property<A>(&self, deviceid: A, delete: bool, property: xproto::Atom, type_: xproto::Atom, offset: u32, len: u32) -> Pin<Box<dyn Future<Output = Result<Cookie<'_, Self, XIGetPropertyReply>, ConnectionError>> + Send + '_>>
1305    where
1306        A: Into<DeviceId> + Send + 'static,
1307    {
1308        Box::pin(xi_get_property(self, deviceid, delete, property, type_, offset, len))
1309    }
1310    fn xinput_xi_get_selected_events(&self, window: xproto::Window) -> Pin<Box<dyn Future<Output = Result<Cookie<'_, Self, XIGetSelectedEventsReply>, ConnectionError>> + Send + '_>>
1311    {
1312        Box::pin(xi_get_selected_events(self, window))
1313    }
1314    fn xinput_xi_barrier_release_pointer<'c, 'input, 'future>(&'c self, barriers: &'input [BarrierReleasePointerInfo]) -> Pin<Box<dyn Future<Output = Result<VoidCookie<'c, Self>, ConnectionError>> + Send + 'future>>
1315    where
1316        'c: 'future,
1317        'input: 'future,
1318    {
1319        Box::pin(xi_barrier_release_pointer(self, barriers))
1320    }
1321    fn xinput_send_extension_event<'c, 'input, 'future>(&'c self, destination: xproto::Window, device_id: u8, propagate: bool, events: &'input [EventForSend], classes: &'input [EventClass]) -> Pin<Box<dyn Future<Output = Result<VoidCookie<'c, Self>, ConnectionError>> + Send + 'future>>
1322    where
1323        'c: 'future,
1324        'input: 'future,
1325    {
1326        Box::pin(send_extension_event(self, destination, device_id, propagate, events, classes))
1327    }
1328}
1329
1330impl<C: RequestConnection + ?Sized> ConnectionExt for C {}