x11rb_async/protocol/
xkb.rs

1// This file contains generated code. Do not edit directly.
2// To regenerate this, run 'make'.
3
4//! Bindings to the `xkb` 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::xproto;
29
30pub use x11rb_protocol::protocol::xkb::*;
31
32/// Get the major opcode of this extension
33async fn major_opcode<Conn: RequestConnection + ?Sized>(conn: &Conn) -> Result<u8, ConnectionError> {
34    let info = conn.extension_information(X11_EXTENSION_NAME).await?;
35    let info = info.ok_or(ConnectionError::UnsupportedExtension)?;
36    Ok(info.major_opcode)
37}
38
39pub async fn use_extension<Conn>(conn: &Conn, wanted_major: u16, wanted_minor: u16) -> Result<Cookie<'_, Conn, UseExtensionReply>, ConnectionError>
40where
41    Conn: RequestConnection + ?Sized,
42{
43    let request0 = UseExtensionRequest {
44        wanted_major,
45        wanted_minor,
46    };
47    let (bytes, fds) = request0.serialize(major_opcode(conn).await?);
48    let slices = [IoSlice::new(&bytes[0])];
49    assert_eq!(slices.len(), bytes.len());
50    conn.send_request_with_reply(&slices, fds).await
51}
52pub async fn select_events<'c, 'input, Conn>(conn: &'c Conn, device_spec: DeviceSpec, clear: EventType, select_all: EventType, affect_map: MapPart, map: MapPart, details: &'input SelectEventsAux) -> Result<VoidCookie<'c, Conn>, ConnectionError>
53where
54    Conn: RequestConnection + ?Sized,
55{
56    let request0 = SelectEventsRequest {
57        device_spec,
58        clear,
59        select_all,
60        affect_map,
61        map,
62        details: Cow::Borrowed(details),
63    };
64    let (bytes, fds) = request0.serialize(major_opcode(conn).await?);
65    let slices = [IoSlice::new(&bytes[0]), IoSlice::new(&bytes[1]), IoSlice::new(&bytes[2])];
66    assert_eq!(slices.len(), bytes.len());
67    conn.send_request_without_reply(&slices, fds).await
68}
69pub async fn bell<Conn>(conn: &Conn, device_spec: DeviceSpec, bell_class: BellClassSpec, bell_id: IDSpec, percent: i8, force_sound: bool, event_only: bool, pitch: i16, duration: i16, name: xproto::Atom, window: xproto::Window) -> Result<VoidCookie<'_, Conn>, ConnectionError>
70where
71    Conn: RequestConnection + ?Sized,
72{
73    let request0 = BellRequest {
74        device_spec,
75        bell_class,
76        bell_id,
77        percent,
78        force_sound,
79        event_only,
80        pitch,
81        duration,
82        name,
83        window,
84    };
85    let (bytes, fds) = request0.serialize(major_opcode(conn).await?);
86    let slices = [IoSlice::new(&bytes[0])];
87    assert_eq!(slices.len(), bytes.len());
88    conn.send_request_without_reply(&slices, fds).await
89}
90pub async fn get_state<Conn>(conn: &Conn, device_spec: DeviceSpec) -> Result<Cookie<'_, Conn, GetStateReply>, ConnectionError>
91where
92    Conn: RequestConnection + ?Sized,
93{
94    let request0 = GetStateRequest {
95        device_spec,
96    };
97    let (bytes, fds) = request0.serialize(major_opcode(conn).await?);
98    let slices = [IoSlice::new(&bytes[0])];
99    assert_eq!(slices.len(), bytes.len());
100    conn.send_request_with_reply(&slices, fds).await
101}
102pub async fn latch_lock_state<Conn>(conn: &Conn, device_spec: DeviceSpec, affect_mod_locks: xproto::ModMask, mod_locks: xproto::ModMask, lock_group: bool, group_lock: Group, affect_mod_latches: xproto::ModMask, latch_group: bool, group_latch: u16) -> Result<VoidCookie<'_, Conn>, ConnectionError>
103where
104    Conn: RequestConnection + ?Sized,
105{
106    let request0 = LatchLockStateRequest {
107        device_spec,
108        affect_mod_locks,
109        mod_locks,
110        lock_group,
111        group_lock,
112        affect_mod_latches,
113        latch_group,
114        group_latch,
115    };
116    let (bytes, fds) = request0.serialize(major_opcode(conn).await?);
117    let slices = [IoSlice::new(&bytes[0])];
118    assert_eq!(slices.len(), bytes.len());
119    conn.send_request_without_reply(&slices, fds).await
120}
121pub async fn get_controls<Conn>(conn: &Conn, device_spec: DeviceSpec) -> Result<Cookie<'_, Conn, GetControlsReply>, ConnectionError>
122where
123    Conn: RequestConnection + ?Sized,
124{
125    let request0 = GetControlsRequest {
126        device_spec,
127    };
128    let (bytes, fds) = request0.serialize(major_opcode(conn).await?);
129    let slices = [IoSlice::new(&bytes[0])];
130    assert_eq!(slices.len(), bytes.len());
131    conn.send_request_with_reply(&slices, fds).await
132}
133pub async fn set_controls<'c, 'input, Conn>(conn: &'c Conn, device_spec: DeviceSpec, affect_internal_real_mods: xproto::ModMask, internal_real_mods: xproto::ModMask, affect_ignore_lock_real_mods: xproto::ModMask, ignore_lock_real_mods: xproto::ModMask, affect_internal_virtual_mods: VMod, internal_virtual_mods: VMod, affect_ignore_lock_virtual_mods: VMod, ignore_lock_virtual_mods: VMod, mouse_keys_dflt_btn: u8, groups_wrap: u8, access_x_options: AXOption, affect_enabled_controls: BoolCtrl, enabled_controls: BoolCtrl, change_controls: Control, repeat_delay: u16, repeat_interval: u16, slow_keys_delay: u16, debounce_delay: u16, mouse_keys_delay: u16, mouse_keys_interval: u16, mouse_keys_time_to_max: u16, mouse_keys_max_speed: u16, mouse_keys_curve: i16, access_x_timeout: u16, access_x_timeout_mask: BoolCtrl, access_x_timeout_values: BoolCtrl, access_x_timeout_options_mask: AXOption, access_x_timeout_options_values: AXOption, per_key_repeat: &'input [u8; 32]) -> Result<VoidCookie<'c, Conn>, ConnectionError>
134where
135    Conn: RequestConnection + ?Sized,
136{
137    let request0 = SetControlsRequest {
138        device_spec,
139        affect_internal_real_mods,
140        internal_real_mods,
141        affect_ignore_lock_real_mods,
142        ignore_lock_real_mods,
143        affect_internal_virtual_mods,
144        internal_virtual_mods,
145        affect_ignore_lock_virtual_mods,
146        ignore_lock_virtual_mods,
147        mouse_keys_dflt_btn,
148        groups_wrap,
149        access_x_options,
150        affect_enabled_controls,
151        enabled_controls,
152        change_controls,
153        repeat_delay,
154        repeat_interval,
155        slow_keys_delay,
156        debounce_delay,
157        mouse_keys_delay,
158        mouse_keys_interval,
159        mouse_keys_time_to_max,
160        mouse_keys_max_speed,
161        mouse_keys_curve,
162        access_x_timeout,
163        access_x_timeout_mask,
164        access_x_timeout_values,
165        access_x_timeout_options_mask,
166        access_x_timeout_options_values,
167        per_key_repeat: Cow::Borrowed(per_key_repeat),
168    };
169    let (bytes, fds) = request0.serialize(major_opcode(conn).await?);
170    let slices = [IoSlice::new(&bytes[0]), IoSlice::new(&bytes[1])];
171    assert_eq!(slices.len(), bytes.len());
172    conn.send_request_without_reply(&slices, fds).await
173}
174pub async fn get_map<Conn>(conn: &Conn, device_spec: DeviceSpec, full: MapPart, partial: MapPart, first_type: u8, n_types: u8, first_key_sym: xproto::Keycode, n_key_syms: u8, first_key_action: xproto::Keycode, n_key_actions: u8, first_key_behavior: xproto::Keycode, n_key_behaviors: u8, virtual_mods: VMod, first_key_explicit: xproto::Keycode, n_key_explicit: u8, first_mod_map_key: xproto::Keycode, n_mod_map_keys: u8, first_v_mod_map_key: xproto::Keycode, n_v_mod_map_keys: u8) -> Result<Cookie<'_, Conn, GetMapReply>, ConnectionError>
175where
176    Conn: RequestConnection + ?Sized,
177{
178    let request0 = GetMapRequest {
179        device_spec,
180        full,
181        partial,
182        first_type,
183        n_types,
184        first_key_sym,
185        n_key_syms,
186        first_key_action,
187        n_key_actions,
188        first_key_behavior,
189        n_key_behaviors,
190        virtual_mods,
191        first_key_explicit,
192        n_key_explicit,
193        first_mod_map_key,
194        n_mod_map_keys,
195        first_v_mod_map_key,
196        n_v_mod_map_keys,
197    };
198    let (bytes, fds) = request0.serialize(major_opcode(conn).await?);
199    let slices = [IoSlice::new(&bytes[0])];
200    assert_eq!(slices.len(), bytes.len());
201    conn.send_request_with_reply(&slices, fds).await
202}
203pub async fn set_map<'c, 'input, Conn>(conn: &'c Conn, device_spec: DeviceSpec, flags: SetMapFlags, min_key_code: xproto::Keycode, max_key_code: xproto::Keycode, first_type: u8, n_types: u8, first_key_sym: xproto::Keycode, n_key_syms: u8, total_syms: u16, first_key_action: xproto::Keycode, n_key_actions: u8, total_actions: u16, first_key_behavior: xproto::Keycode, n_key_behaviors: u8, total_key_behaviors: u8, first_key_explicit: xproto::Keycode, n_key_explicit: u8, total_key_explicit: u8, first_mod_map_key: xproto::Keycode, n_mod_map_keys: u8, total_mod_map_keys: u8, first_v_mod_map_key: xproto::Keycode, n_v_mod_map_keys: u8, total_v_mod_map_keys: u8, virtual_mods: VMod, values: &'input SetMapAux) -> Result<VoidCookie<'c, Conn>, ConnectionError>
204where
205    Conn: RequestConnection + ?Sized,
206{
207    let request0 = SetMapRequest {
208        device_spec,
209        flags,
210        min_key_code,
211        max_key_code,
212        first_type,
213        n_types,
214        first_key_sym,
215        n_key_syms,
216        total_syms,
217        first_key_action,
218        n_key_actions,
219        total_actions,
220        first_key_behavior,
221        n_key_behaviors,
222        total_key_behaviors,
223        first_key_explicit,
224        n_key_explicit,
225        total_key_explicit,
226        first_mod_map_key,
227        n_mod_map_keys,
228        total_mod_map_keys,
229        first_v_mod_map_key,
230        n_v_mod_map_keys,
231        total_v_mod_map_keys,
232        virtual_mods,
233        values: Cow::Borrowed(values),
234    };
235    let (bytes, fds) = request0.serialize(major_opcode(conn).await?);
236    let slices = [IoSlice::new(&bytes[0]), IoSlice::new(&bytes[1]), IoSlice::new(&bytes[2])];
237    assert_eq!(slices.len(), bytes.len());
238    conn.send_request_without_reply(&slices, fds).await
239}
240pub async fn get_compat_map<Conn>(conn: &Conn, device_spec: DeviceSpec, groups: SetOfGroup, get_all_si: bool, first_si: u16, n_si: u16) -> Result<Cookie<'_, Conn, GetCompatMapReply>, ConnectionError>
241where
242    Conn: RequestConnection + ?Sized,
243{
244    let request0 = GetCompatMapRequest {
245        device_spec,
246        groups,
247        get_all_si,
248        first_si,
249        n_si,
250    };
251    let (bytes, fds) = request0.serialize(major_opcode(conn).await?);
252    let slices = [IoSlice::new(&bytes[0])];
253    assert_eq!(slices.len(), bytes.len());
254    conn.send_request_with_reply(&slices, fds).await
255}
256pub async fn set_compat_map<'c, 'input, Conn>(conn: &'c Conn, device_spec: DeviceSpec, recompute_actions: bool, truncate_si: bool, groups: SetOfGroup, first_si: u16, si: &'input [SymInterpret], group_maps: &'input [ModDef]) -> Result<VoidCookie<'c, Conn>, ConnectionError>
257where
258    Conn: RequestConnection + ?Sized,
259{
260    let request0 = SetCompatMapRequest {
261        device_spec,
262        recompute_actions,
263        truncate_si,
264        groups,
265        first_si,
266        si: Cow::Borrowed(si),
267        group_maps: Cow::Borrowed(group_maps),
268    };
269    let (bytes, fds) = request0.serialize(major_opcode(conn).await?);
270    let slices = [IoSlice::new(&bytes[0]), IoSlice::new(&bytes[1]), IoSlice::new(&bytes[2]), IoSlice::new(&bytes[3])];
271    assert_eq!(slices.len(), bytes.len());
272    conn.send_request_without_reply(&slices, fds).await
273}
274pub async fn get_indicator_state<Conn>(conn: &Conn, device_spec: DeviceSpec) -> Result<Cookie<'_, Conn, GetIndicatorStateReply>, ConnectionError>
275where
276    Conn: RequestConnection + ?Sized,
277{
278    let request0 = GetIndicatorStateRequest {
279        device_spec,
280    };
281    let (bytes, fds) = request0.serialize(major_opcode(conn).await?);
282    let slices = [IoSlice::new(&bytes[0])];
283    assert_eq!(slices.len(), bytes.len());
284    conn.send_request_with_reply(&slices, fds).await
285}
286pub async fn get_indicator_map<Conn>(conn: &Conn, device_spec: DeviceSpec, which: u32) -> Result<Cookie<'_, Conn, GetIndicatorMapReply>, ConnectionError>
287where
288    Conn: RequestConnection + ?Sized,
289{
290    let request0 = GetIndicatorMapRequest {
291        device_spec,
292        which,
293    };
294    let (bytes, fds) = request0.serialize(major_opcode(conn).await?);
295    let slices = [IoSlice::new(&bytes[0])];
296    assert_eq!(slices.len(), bytes.len());
297    conn.send_request_with_reply(&slices, fds).await
298}
299pub async fn set_indicator_map<'c, 'input, Conn>(conn: &'c Conn, device_spec: DeviceSpec, which: u32, maps: &'input [IndicatorMap]) -> Result<VoidCookie<'c, Conn>, ConnectionError>
300where
301    Conn: RequestConnection + ?Sized,
302{
303    let request0 = SetIndicatorMapRequest {
304        device_spec,
305        which,
306        maps: Cow::Borrowed(maps),
307    };
308    let (bytes, fds) = request0.serialize(major_opcode(conn).await?);
309    let slices = [IoSlice::new(&bytes[0]), IoSlice::new(&bytes[1]), IoSlice::new(&bytes[2])];
310    assert_eq!(slices.len(), bytes.len());
311    conn.send_request_without_reply(&slices, fds).await
312}
313pub async fn get_named_indicator<Conn, A>(conn: &Conn, device_spec: DeviceSpec, led_class: LedClass, led_id: A, indicator: xproto::Atom) -> Result<Cookie<'_, Conn, GetNamedIndicatorReply>, ConnectionError>
314where
315    Conn: RequestConnection + ?Sized,
316    A: Into<IDSpec> + Send,
317{
318    let led_id: IDSpec = led_id.into();
319    let request0 = GetNamedIndicatorRequest {
320        device_spec,
321        led_class,
322        led_id,
323        indicator,
324    };
325    let (bytes, fds) = request0.serialize(major_opcode(conn).await?);
326    let slices = [IoSlice::new(&bytes[0])];
327    assert_eq!(slices.len(), bytes.len());
328    conn.send_request_with_reply(&slices, fds).await
329}
330pub async fn set_named_indicator<Conn, A>(conn: &Conn, device_spec: DeviceSpec, led_class: LedClass, led_id: A, indicator: xproto::Atom, set_state: bool, on: bool, set_map: bool, create_map: bool, map_flags: IMFlag, map_which_groups: IMGroupsWhich, map_groups: SetOfGroups, map_which_mods: IMModsWhich, map_real_mods: xproto::ModMask, map_vmods: VMod, map_ctrls: BoolCtrl) -> Result<VoidCookie<'_, Conn>, ConnectionError>
331where
332    Conn: RequestConnection + ?Sized,
333    A: Into<IDSpec> + Send,
334{
335    let led_id: IDSpec = led_id.into();
336    let request0 = SetNamedIndicatorRequest {
337        device_spec,
338        led_class,
339        led_id,
340        indicator,
341        set_state,
342        on,
343        set_map,
344        create_map,
345        map_flags,
346        map_which_groups,
347        map_groups,
348        map_which_mods,
349        map_real_mods,
350        map_vmods,
351        map_ctrls,
352    };
353    let (bytes, fds) = request0.serialize(major_opcode(conn).await?);
354    let slices = [IoSlice::new(&bytes[0])];
355    assert_eq!(slices.len(), bytes.len());
356    conn.send_request_without_reply(&slices, fds).await
357}
358pub async fn get_names<Conn>(conn: &Conn, device_spec: DeviceSpec, which: NameDetail) -> Result<Cookie<'_, Conn, GetNamesReply>, ConnectionError>
359where
360    Conn: RequestConnection + ?Sized,
361{
362    let request0 = GetNamesRequest {
363        device_spec,
364        which,
365    };
366    let (bytes, fds) = request0.serialize(major_opcode(conn).await?);
367    let slices = [IoSlice::new(&bytes[0])];
368    assert_eq!(slices.len(), bytes.len());
369    conn.send_request_with_reply(&slices, fds).await
370}
371pub async fn set_names<'c, 'input, Conn>(conn: &'c Conn, device_spec: DeviceSpec, virtual_mods: VMod, first_type: u8, n_types: u8, first_kt_levelt: u8, n_kt_levels: u8, indicators: u32, group_names: SetOfGroup, n_radio_groups: u8, first_key: xproto::Keycode, n_keys: u8, n_key_aliases: u8, total_kt_level_names: u16, values: &'input SetNamesAux) -> Result<VoidCookie<'c, Conn>, ConnectionError>
372where
373    Conn: RequestConnection + ?Sized,
374{
375    let request0 = SetNamesRequest {
376        device_spec,
377        virtual_mods,
378        first_type,
379        n_types,
380        first_kt_levelt,
381        n_kt_levels,
382        indicators,
383        group_names,
384        n_radio_groups,
385        first_key,
386        n_keys,
387        n_key_aliases,
388        total_kt_level_names,
389        values: Cow::Borrowed(values),
390    };
391    let (bytes, fds) = request0.serialize(major_opcode(conn).await?);
392    let slices = [IoSlice::new(&bytes[0]), IoSlice::new(&bytes[1]), IoSlice::new(&bytes[2])];
393    assert_eq!(slices.len(), bytes.len());
394    conn.send_request_without_reply(&slices, fds).await
395}
396pub async fn per_client_flags<Conn>(conn: &Conn, device_spec: DeviceSpec, change: PerClientFlag, value: PerClientFlag, ctrls_to_change: BoolCtrl, auto_ctrls: BoolCtrl, auto_ctrls_values: BoolCtrl) -> Result<Cookie<'_, Conn, PerClientFlagsReply>, ConnectionError>
397where
398    Conn: RequestConnection + ?Sized,
399{
400    let request0 = PerClientFlagsRequest {
401        device_spec,
402        change,
403        value,
404        ctrls_to_change,
405        auto_ctrls,
406        auto_ctrls_values,
407    };
408    let (bytes, fds) = request0.serialize(major_opcode(conn).await?);
409    let slices = [IoSlice::new(&bytes[0])];
410    assert_eq!(slices.len(), bytes.len());
411    conn.send_request_with_reply(&slices, fds).await
412}
413pub async fn list_components<Conn>(conn: &Conn, device_spec: DeviceSpec, max_names: u16) -> Result<Cookie<'_, Conn, ListComponentsReply>, ConnectionError>
414where
415    Conn: RequestConnection + ?Sized,
416{
417    let request0 = ListComponentsRequest {
418        device_spec,
419        max_names,
420    };
421    let (bytes, fds) = request0.serialize(major_opcode(conn).await?);
422    let slices = [IoSlice::new(&bytes[0])];
423    assert_eq!(slices.len(), bytes.len());
424    conn.send_request_with_reply(&slices, fds).await
425}
426pub async fn get_kbd_by_name<Conn>(conn: &Conn, device_spec: DeviceSpec, need: GBNDetail, want: GBNDetail, load: bool) -> Result<Cookie<'_, Conn, GetKbdByNameReply>, ConnectionError>
427where
428    Conn: RequestConnection + ?Sized,
429{
430    let request0 = GetKbdByNameRequest {
431        device_spec,
432        need,
433        want,
434        load,
435    };
436    let (bytes, fds) = request0.serialize(major_opcode(conn).await?);
437    let slices = [IoSlice::new(&bytes[0])];
438    assert_eq!(slices.len(), bytes.len());
439    conn.send_request_with_reply(&slices, fds).await
440}
441pub async fn get_device_info<Conn, A>(conn: &Conn, device_spec: DeviceSpec, wanted: XIFeature, all_buttons: bool, first_button: u8, n_buttons: u8, led_class: LedClass, led_id: A) -> Result<Cookie<'_, Conn, GetDeviceInfoReply>, ConnectionError>
442where
443    Conn: RequestConnection + ?Sized,
444    A: Into<IDSpec> + Send,
445{
446    let led_id: IDSpec = led_id.into();
447    let request0 = GetDeviceInfoRequest {
448        device_spec,
449        wanted,
450        all_buttons,
451        first_button,
452        n_buttons,
453        led_class,
454        led_id,
455    };
456    let (bytes, fds) = request0.serialize(major_opcode(conn).await?);
457    let slices = [IoSlice::new(&bytes[0])];
458    assert_eq!(slices.len(), bytes.len());
459    conn.send_request_with_reply(&slices, fds).await
460}
461pub async fn set_device_info<'c, 'input, Conn>(conn: &'c Conn, device_spec: DeviceSpec, first_btn: u8, change: XIFeature, btn_actions: &'input [Action], leds: &'input [DeviceLedInfo]) -> Result<VoidCookie<'c, Conn>, ConnectionError>
462where
463    Conn: RequestConnection + ?Sized,
464{
465    let request0 = SetDeviceInfoRequest {
466        device_spec,
467        first_btn,
468        change,
469        btn_actions: Cow::Borrowed(btn_actions),
470        leds: Cow::Borrowed(leds),
471    };
472    let (bytes, fds) = request0.serialize(major_opcode(conn).await?);
473    let slices = [IoSlice::new(&bytes[0]), IoSlice::new(&bytes[1]), IoSlice::new(&bytes[2]), IoSlice::new(&bytes[3])];
474    assert_eq!(slices.len(), bytes.len());
475    conn.send_request_without_reply(&slices, fds).await
476}
477pub async fn set_debugging_flags<'c, 'input, Conn>(conn: &'c Conn, affect_flags: u32, flags: u32, affect_ctrls: u32, ctrls: u32, message: &'input [String8]) -> Result<Cookie<'c, Conn, SetDebuggingFlagsReply>, ConnectionError>
478where
479    Conn: RequestConnection + ?Sized,
480{
481    let request0 = SetDebuggingFlagsRequest {
482        affect_flags,
483        flags,
484        affect_ctrls,
485        ctrls,
486        message: Cow::Borrowed(message),
487    };
488    let (bytes, fds) = request0.serialize(major_opcode(conn).await?);
489    let slices = [IoSlice::new(&bytes[0]), IoSlice::new(&bytes[1]), IoSlice::new(&bytes[2])];
490    assert_eq!(slices.len(), bytes.len());
491    conn.send_request_with_reply(&slices, fds).await
492}
493/// Extension trait defining the requests of this extension.
494pub trait ConnectionExt: RequestConnection {
495    fn xkb_use_extension(&self, wanted_major: u16, wanted_minor: u16) -> Pin<Box<dyn Future<Output = Result<Cookie<'_, Self, UseExtensionReply>, ConnectionError>> + Send + '_>>
496    {
497        Box::pin(use_extension(self, wanted_major, wanted_minor))
498    }
499    fn xkb_select_events<'c, 'input, 'future>(&'c self, device_spec: DeviceSpec, clear: EventType, select_all: EventType, affect_map: MapPart, map: MapPart, details: &'input SelectEventsAux) -> Pin<Box<dyn Future<Output = Result<VoidCookie<'c, Self>, ConnectionError>> + Send + 'future>>
500    where
501        'c: 'future,
502        'input: 'future,
503    {
504        Box::pin(select_events(self, device_spec, clear, select_all, affect_map, map, details))
505    }
506    fn xkb_bell(&self, device_spec: DeviceSpec, bell_class: BellClassSpec, bell_id: IDSpec, percent: i8, force_sound: bool, event_only: bool, pitch: i16, duration: i16, name: xproto::Atom, window: xproto::Window) -> Pin<Box<dyn Future<Output = Result<VoidCookie<'_, Self>, ConnectionError>> + Send + '_>>
507    {
508        Box::pin(bell(self, device_spec, bell_class, bell_id, percent, force_sound, event_only, pitch, duration, name, window))
509    }
510    fn xkb_get_state(&self, device_spec: DeviceSpec) -> Pin<Box<dyn Future<Output = Result<Cookie<'_, Self, GetStateReply>, ConnectionError>> + Send + '_>>
511    {
512        Box::pin(get_state(self, device_spec))
513    }
514    fn xkb_latch_lock_state(&self, device_spec: DeviceSpec, affect_mod_locks: xproto::ModMask, mod_locks: xproto::ModMask, lock_group: bool, group_lock: Group, affect_mod_latches: xproto::ModMask, latch_group: bool, group_latch: u16) -> Pin<Box<dyn Future<Output = Result<VoidCookie<'_, Self>, ConnectionError>> + Send + '_>>
515    {
516        Box::pin(latch_lock_state(self, device_spec, affect_mod_locks, mod_locks, lock_group, group_lock, affect_mod_latches, latch_group, group_latch))
517    }
518    fn xkb_get_controls(&self, device_spec: DeviceSpec) -> Pin<Box<dyn Future<Output = Result<Cookie<'_, Self, GetControlsReply>, ConnectionError>> + Send + '_>>
519    {
520        Box::pin(get_controls(self, device_spec))
521    }
522    fn xkb_set_controls<'c, 'input, 'future>(&'c self, device_spec: DeviceSpec, affect_internal_real_mods: xproto::ModMask, internal_real_mods: xproto::ModMask, affect_ignore_lock_real_mods: xproto::ModMask, ignore_lock_real_mods: xproto::ModMask, affect_internal_virtual_mods: VMod, internal_virtual_mods: VMod, affect_ignore_lock_virtual_mods: VMod, ignore_lock_virtual_mods: VMod, mouse_keys_dflt_btn: u8, groups_wrap: u8, access_x_options: AXOption, affect_enabled_controls: BoolCtrl, enabled_controls: BoolCtrl, change_controls: Control, repeat_delay: u16, repeat_interval: u16, slow_keys_delay: u16, debounce_delay: u16, mouse_keys_delay: u16, mouse_keys_interval: u16, mouse_keys_time_to_max: u16, mouse_keys_max_speed: u16, mouse_keys_curve: i16, access_x_timeout: u16, access_x_timeout_mask: BoolCtrl, access_x_timeout_values: BoolCtrl, access_x_timeout_options_mask: AXOption, access_x_timeout_options_values: AXOption, per_key_repeat: &'input [u8; 32]) -> Pin<Box<dyn Future<Output = Result<VoidCookie<'c, Self>, ConnectionError>> + Send + 'future>>
523    where
524        'c: 'future,
525        'input: 'future,
526    {
527        Box::pin(set_controls(self, device_spec, affect_internal_real_mods, internal_real_mods, affect_ignore_lock_real_mods, ignore_lock_real_mods, affect_internal_virtual_mods, internal_virtual_mods, affect_ignore_lock_virtual_mods, ignore_lock_virtual_mods, mouse_keys_dflt_btn, groups_wrap, access_x_options, affect_enabled_controls, enabled_controls, change_controls, repeat_delay, repeat_interval, slow_keys_delay, debounce_delay, mouse_keys_delay, mouse_keys_interval, mouse_keys_time_to_max, mouse_keys_max_speed, mouse_keys_curve, access_x_timeout, access_x_timeout_mask, access_x_timeout_values, access_x_timeout_options_mask, access_x_timeout_options_values, per_key_repeat))
528    }
529    fn xkb_get_map(&self, device_spec: DeviceSpec, full: MapPart, partial: MapPart, first_type: u8, n_types: u8, first_key_sym: xproto::Keycode, n_key_syms: u8, first_key_action: xproto::Keycode, n_key_actions: u8, first_key_behavior: xproto::Keycode, n_key_behaviors: u8, virtual_mods: VMod, first_key_explicit: xproto::Keycode, n_key_explicit: u8, first_mod_map_key: xproto::Keycode, n_mod_map_keys: u8, first_v_mod_map_key: xproto::Keycode, n_v_mod_map_keys: u8) -> Pin<Box<dyn Future<Output = Result<Cookie<'_, Self, GetMapReply>, ConnectionError>> + Send + '_>>
530    {
531        Box::pin(get_map(self, device_spec, full, partial, first_type, n_types, first_key_sym, n_key_syms, first_key_action, n_key_actions, first_key_behavior, n_key_behaviors, virtual_mods, first_key_explicit, n_key_explicit, first_mod_map_key, n_mod_map_keys, first_v_mod_map_key, n_v_mod_map_keys))
532    }
533    fn xkb_set_map<'c, 'input, 'future>(&'c self, device_spec: DeviceSpec, flags: SetMapFlags, min_key_code: xproto::Keycode, max_key_code: xproto::Keycode, first_type: u8, n_types: u8, first_key_sym: xproto::Keycode, n_key_syms: u8, total_syms: u16, first_key_action: xproto::Keycode, n_key_actions: u8, total_actions: u16, first_key_behavior: xproto::Keycode, n_key_behaviors: u8, total_key_behaviors: u8, first_key_explicit: xproto::Keycode, n_key_explicit: u8, total_key_explicit: u8, first_mod_map_key: xproto::Keycode, n_mod_map_keys: u8, total_mod_map_keys: u8, first_v_mod_map_key: xproto::Keycode, n_v_mod_map_keys: u8, total_v_mod_map_keys: u8, virtual_mods: VMod, values: &'input SetMapAux) -> Pin<Box<dyn Future<Output = Result<VoidCookie<'c, Self>, ConnectionError>> + Send + 'future>>
534    where
535        'c: 'future,
536        'input: 'future,
537    {
538        Box::pin(set_map(self, device_spec, flags, min_key_code, max_key_code, first_type, n_types, first_key_sym, n_key_syms, total_syms, first_key_action, n_key_actions, total_actions, first_key_behavior, n_key_behaviors, total_key_behaviors, first_key_explicit, n_key_explicit, total_key_explicit, first_mod_map_key, n_mod_map_keys, total_mod_map_keys, first_v_mod_map_key, n_v_mod_map_keys, total_v_mod_map_keys, virtual_mods, values))
539    }
540    fn xkb_get_compat_map(&self, device_spec: DeviceSpec, groups: SetOfGroup, get_all_si: bool, first_si: u16, n_si: u16) -> Pin<Box<dyn Future<Output = Result<Cookie<'_, Self, GetCompatMapReply>, ConnectionError>> + Send + '_>>
541    {
542        Box::pin(get_compat_map(self, device_spec, groups, get_all_si, first_si, n_si))
543    }
544    fn xkb_set_compat_map<'c, 'input, 'future>(&'c self, device_spec: DeviceSpec, recompute_actions: bool, truncate_si: bool, groups: SetOfGroup, first_si: u16, si: &'input [SymInterpret], group_maps: &'input [ModDef]) -> Pin<Box<dyn Future<Output = Result<VoidCookie<'c, Self>, ConnectionError>> + Send + 'future>>
545    where
546        'c: 'future,
547        'input: 'future,
548    {
549        Box::pin(set_compat_map(self, device_spec, recompute_actions, truncate_si, groups, first_si, si, group_maps))
550    }
551    fn xkb_get_indicator_state(&self, device_spec: DeviceSpec) -> Pin<Box<dyn Future<Output = Result<Cookie<'_, Self, GetIndicatorStateReply>, ConnectionError>> + Send + '_>>
552    {
553        Box::pin(get_indicator_state(self, device_spec))
554    }
555    fn xkb_get_indicator_map(&self, device_spec: DeviceSpec, which: u32) -> Pin<Box<dyn Future<Output = Result<Cookie<'_, Self, GetIndicatorMapReply>, ConnectionError>> + Send + '_>>
556    {
557        Box::pin(get_indicator_map(self, device_spec, which))
558    }
559    fn xkb_set_indicator_map<'c, 'input, 'future>(&'c self, device_spec: DeviceSpec, which: u32, maps: &'input [IndicatorMap]) -> Pin<Box<dyn Future<Output = Result<VoidCookie<'c, Self>, ConnectionError>> + Send + 'future>>
560    where
561        'c: 'future,
562        'input: 'future,
563    {
564        Box::pin(set_indicator_map(self, device_spec, which, maps))
565    }
566    fn xkb_get_named_indicator<A>(&self, device_spec: DeviceSpec, led_class: LedClass, led_id: A, indicator: xproto::Atom) -> Pin<Box<dyn Future<Output = Result<Cookie<'_, Self, GetNamedIndicatorReply>, ConnectionError>> + Send + '_>>
567    where
568        A: Into<IDSpec> + Send + 'static,
569    {
570        Box::pin(get_named_indicator(self, device_spec, led_class, led_id, indicator))
571    }
572    fn xkb_set_named_indicator<A>(&self, device_spec: DeviceSpec, led_class: LedClass, led_id: A, indicator: xproto::Atom, set_state: bool, on: bool, set_map: bool, create_map: bool, map_flags: IMFlag, map_which_groups: IMGroupsWhich, map_groups: SetOfGroups, map_which_mods: IMModsWhich, map_real_mods: xproto::ModMask, map_vmods: VMod, map_ctrls: BoolCtrl) -> Pin<Box<dyn Future<Output = Result<VoidCookie<'_, Self>, ConnectionError>> + Send + '_>>
573    where
574        A: Into<IDSpec> + Send + 'static,
575    {
576        Box::pin(set_named_indicator(self, device_spec, led_class, led_id, indicator, set_state, on, set_map, create_map, map_flags, map_which_groups, map_groups, map_which_mods, map_real_mods, map_vmods, map_ctrls))
577    }
578    fn xkb_get_names(&self, device_spec: DeviceSpec, which: NameDetail) -> Pin<Box<dyn Future<Output = Result<Cookie<'_, Self, GetNamesReply>, ConnectionError>> + Send + '_>>
579    {
580        Box::pin(get_names(self, device_spec, which))
581    }
582    fn xkb_set_names<'c, 'input, 'future>(&'c self, device_spec: DeviceSpec, virtual_mods: VMod, first_type: u8, n_types: u8, first_kt_levelt: u8, n_kt_levels: u8, indicators: u32, group_names: SetOfGroup, n_radio_groups: u8, first_key: xproto::Keycode, n_keys: u8, n_key_aliases: u8, total_kt_level_names: u16, values: &'input SetNamesAux) -> Pin<Box<dyn Future<Output = Result<VoidCookie<'c, Self>, ConnectionError>> + Send + 'future>>
583    where
584        'c: 'future,
585        'input: 'future,
586    {
587        Box::pin(set_names(self, device_spec, virtual_mods, first_type, n_types, first_kt_levelt, n_kt_levels, indicators, group_names, n_radio_groups, first_key, n_keys, n_key_aliases, total_kt_level_names, values))
588    }
589    fn xkb_per_client_flags(&self, device_spec: DeviceSpec, change: PerClientFlag, value: PerClientFlag, ctrls_to_change: BoolCtrl, auto_ctrls: BoolCtrl, auto_ctrls_values: BoolCtrl) -> Pin<Box<dyn Future<Output = Result<Cookie<'_, Self, PerClientFlagsReply>, ConnectionError>> + Send + '_>>
590    {
591        Box::pin(per_client_flags(self, device_spec, change, value, ctrls_to_change, auto_ctrls, auto_ctrls_values))
592    }
593    fn xkb_list_components(&self, device_spec: DeviceSpec, max_names: u16) -> Pin<Box<dyn Future<Output = Result<Cookie<'_, Self, ListComponentsReply>, ConnectionError>> + Send + '_>>
594    {
595        Box::pin(list_components(self, device_spec, max_names))
596    }
597    fn xkb_get_kbd_by_name(&self, device_spec: DeviceSpec, need: GBNDetail, want: GBNDetail, load: bool) -> Pin<Box<dyn Future<Output = Result<Cookie<'_, Self, GetKbdByNameReply>, ConnectionError>> + Send + '_>>
598    {
599        Box::pin(get_kbd_by_name(self, device_spec, need, want, load))
600    }
601    fn xkb_get_device_info<A>(&self, device_spec: DeviceSpec, wanted: XIFeature, all_buttons: bool, first_button: u8, n_buttons: u8, led_class: LedClass, led_id: A) -> Pin<Box<dyn Future<Output = Result<Cookie<'_, Self, GetDeviceInfoReply>, ConnectionError>> + Send + '_>>
602    where
603        A: Into<IDSpec> + Send + 'static,
604    {
605        Box::pin(get_device_info(self, device_spec, wanted, all_buttons, first_button, n_buttons, led_class, led_id))
606    }
607    fn xkb_set_device_info<'c, 'input, 'future>(&'c self, device_spec: DeviceSpec, first_btn: u8, change: XIFeature, btn_actions: &'input [Action], leds: &'input [DeviceLedInfo]) -> Pin<Box<dyn Future<Output = Result<VoidCookie<'c, Self>, ConnectionError>> + Send + 'future>>
608    where
609        'c: 'future,
610        'input: 'future,
611    {
612        Box::pin(set_device_info(self, device_spec, first_btn, change, btn_actions, leds))
613    }
614    fn xkb_set_debugging_flags<'c, 'input, 'future>(&'c self, affect_flags: u32, flags: u32, affect_ctrls: u32, ctrls: u32, message: &'input [String8]) -> Pin<Box<dyn Future<Output = Result<Cookie<'c, Self, SetDebuggingFlagsReply>, ConnectionError>> + Send + 'future>>
615    where
616        'c: 'future,
617        'input: 'future,
618    {
619        Box::pin(set_debugging_flags(self, affect_flags, flags, affect_ctrls, ctrls, message))
620    }
621}
622
623impl<C: RequestConnection + ?Sized> ConnectionExt for C {}