#![allow(clippy::too_many_arguments)]
#[allow(unused_imports)]
use std::borrow::Cow;
#[allow(unused_imports)]
use std::convert::TryInto;
#[allow(unused_imports)]
use crate::utils::RawFdContainer;
#[allow(unused_imports)]
use crate::x11_utils::{Request, RequestHeader, Serialize, TryParse, TryParseFd};
use std::io::IoSlice;
use crate::connection::RequestConnection;
#[allow(unused_imports)]
use crate::connection::Connection as X11Connection;
#[allow(unused_imports)]
use crate::cookie::{Cookie, CookieWithFds, VoidCookie};
use crate::cookie::ListFontsWithInfoCookie;
use crate::errors::ConnectionError;
#[allow(unused_imports)]
use crate::errors::ReplyOrIdError;
use std::future::Future;
use std::pin::Pin;
pub use x11rb_protocol::protocol::xproto::*;
pub async fn create_window<'c, 'input, Conn>(conn: &'c Conn, depth: u8, wid: Window, parent: Window, x: i16, y: i16, width: u16, height: u16, border_width: u16, class: WindowClass, visual: Visualid, value_list: &'input CreateWindowAux) -> Result<VoidCookie<'c, Conn>, ConnectionError>
where
Conn: RequestConnection + ?Sized,
{
let request0 = CreateWindowRequest {
depth,
wid,
parent,
x,
y,
width,
height,
border_width,
class,
visual,
value_list: Cow::Borrowed(value_list),
};
let (bytes, fds) = request0.serialize();
let slices = [IoSlice::new(&bytes[0]), IoSlice::new(&bytes[1]), IoSlice::new(&bytes[2])];
assert_eq!(slices.len(), bytes.len());
conn.send_request_without_reply(&slices, fds).await
}
pub async fn change_window_attributes<'c, 'input, Conn>(conn: &'c Conn, window: Window, value_list: &'input ChangeWindowAttributesAux) -> Result<VoidCookie<'c, Conn>, ConnectionError>
where
Conn: RequestConnection + ?Sized,
{
let request0 = ChangeWindowAttributesRequest {
window,
value_list: Cow::Borrowed(value_list),
};
let (bytes, fds) = request0.serialize();
let slices = [IoSlice::new(&bytes[0]), IoSlice::new(&bytes[1]), IoSlice::new(&bytes[2])];
assert_eq!(slices.len(), bytes.len());
conn.send_request_without_reply(&slices, fds).await
}
pub async fn get_window_attributes<Conn>(conn: &Conn, window: Window) -> Result<Cookie<'_, Conn, GetWindowAttributesReply>, ConnectionError>
where
Conn: RequestConnection + ?Sized,
{
let request0 = GetWindowAttributesRequest {
window,
};
let (bytes, fds) = request0.serialize();
let slices = [IoSlice::new(&bytes[0])];
assert_eq!(slices.len(), bytes.len());
conn.send_request_with_reply(&slices, fds).await
}
pub async fn destroy_window<Conn>(conn: &Conn, window: Window) -> Result<VoidCookie<'_, Conn>, ConnectionError>
where
Conn: RequestConnection + ?Sized,
{
let request0 = DestroyWindowRequest {
window,
};
let (bytes, fds) = request0.serialize();
let slices = [IoSlice::new(&bytes[0])];
assert_eq!(slices.len(), bytes.len());
conn.send_request_without_reply(&slices, fds).await
}
pub async fn destroy_subwindows<Conn>(conn: &Conn, window: Window) -> Result<VoidCookie<'_, Conn>, ConnectionError>
where
Conn: RequestConnection + ?Sized,
{
let request0 = DestroySubwindowsRequest {
window,
};
let (bytes, fds) = request0.serialize();
let slices = [IoSlice::new(&bytes[0])];
assert_eq!(slices.len(), bytes.len());
conn.send_request_without_reply(&slices, fds).await
}
pub async fn change_save_set<Conn>(conn: &Conn, mode: SetMode, window: Window) -> Result<VoidCookie<'_, Conn>, ConnectionError>
where
Conn: RequestConnection + ?Sized,
{
let request0 = ChangeSaveSetRequest {
mode,
window,
};
let (bytes, fds) = request0.serialize();
let slices = [IoSlice::new(&bytes[0])];
assert_eq!(slices.len(), bytes.len());
conn.send_request_without_reply(&slices, fds).await
}
pub async fn reparent_window<Conn>(conn: &Conn, window: Window, parent: Window, x: i16, y: i16) -> Result<VoidCookie<'_, Conn>, ConnectionError>
where
Conn: RequestConnection + ?Sized,
{
let request0 = ReparentWindowRequest {
window,
parent,
x,
y,
};
let (bytes, fds) = request0.serialize();
let slices = [IoSlice::new(&bytes[0])];
assert_eq!(slices.len(), bytes.len());
conn.send_request_without_reply(&slices, fds).await
}
pub async fn map_window<Conn>(conn: &Conn, window: Window) -> Result<VoidCookie<'_, Conn>, ConnectionError>
where
Conn: RequestConnection + ?Sized,
{
let request0 = MapWindowRequest {
window,
};
let (bytes, fds) = request0.serialize();
let slices = [IoSlice::new(&bytes[0])];
assert_eq!(slices.len(), bytes.len());
conn.send_request_without_reply(&slices, fds).await
}
pub async fn map_subwindows<Conn>(conn: &Conn, window: Window) -> Result<VoidCookie<'_, Conn>, ConnectionError>
where
Conn: RequestConnection + ?Sized,
{
let request0 = MapSubwindowsRequest {
window,
};
let (bytes, fds) = request0.serialize();
let slices = [IoSlice::new(&bytes[0])];
assert_eq!(slices.len(), bytes.len());
conn.send_request_without_reply(&slices, fds).await
}
pub async fn unmap_window<Conn>(conn: &Conn, window: Window) -> Result<VoidCookie<'_, Conn>, ConnectionError>
where
Conn: RequestConnection + ?Sized,
{
let request0 = UnmapWindowRequest {
window,
};
let (bytes, fds) = request0.serialize();
let slices = [IoSlice::new(&bytes[0])];
assert_eq!(slices.len(), bytes.len());
conn.send_request_without_reply(&slices, fds).await
}
pub async fn unmap_subwindows<Conn>(conn: &Conn, window: Window) -> Result<VoidCookie<'_, Conn>, ConnectionError>
where
Conn: RequestConnection + ?Sized,
{
let request0 = UnmapSubwindowsRequest {
window,
};
let (bytes, fds) = request0.serialize();
let slices = [IoSlice::new(&bytes[0])];
assert_eq!(slices.len(), bytes.len());
conn.send_request_without_reply(&slices, fds).await
}
pub async fn configure_window<'c, 'input, Conn>(conn: &'c Conn, window: Window, value_list: &'input ConfigureWindowAux) -> Result<VoidCookie<'c, Conn>, ConnectionError>
where
Conn: RequestConnection + ?Sized,
{
let request0 = ConfigureWindowRequest {
window,
value_list: Cow::Borrowed(value_list),
};
let (bytes, fds) = request0.serialize();
let slices = [IoSlice::new(&bytes[0]), IoSlice::new(&bytes[1]), IoSlice::new(&bytes[2])];
assert_eq!(slices.len(), bytes.len());
conn.send_request_without_reply(&slices, fds).await
}
pub async fn circulate_window<Conn>(conn: &Conn, direction: Circulate, window: Window) -> Result<VoidCookie<'_, Conn>, ConnectionError>
where
Conn: RequestConnection + ?Sized,
{
let request0 = CirculateWindowRequest {
direction,
window,
};
let (bytes, fds) = request0.serialize();
let slices = [IoSlice::new(&bytes[0])];
assert_eq!(slices.len(), bytes.len());
conn.send_request_without_reply(&slices, fds).await
}
pub async fn get_geometry<Conn>(conn: &Conn, drawable: Drawable) -> Result<Cookie<'_, Conn, GetGeometryReply>, ConnectionError>
where
Conn: RequestConnection + ?Sized,
{
let request0 = GetGeometryRequest {
drawable,
};
let (bytes, fds) = request0.serialize();
let slices = [IoSlice::new(&bytes[0])];
assert_eq!(slices.len(), bytes.len());
conn.send_request_with_reply(&slices, fds).await
}
pub async fn query_tree<Conn>(conn: &Conn, window: Window) -> Result<Cookie<'_, Conn, QueryTreeReply>, ConnectionError>
where
Conn: RequestConnection + ?Sized,
{
let request0 = QueryTreeRequest {
window,
};
let (bytes, fds) = request0.serialize();
let slices = [IoSlice::new(&bytes[0])];
assert_eq!(slices.len(), bytes.len());
conn.send_request_with_reply(&slices, fds).await
}
pub async fn intern_atom<'c, 'input, Conn>(conn: &'c Conn, only_if_exists: bool, name: &'input [u8]) -> Result<Cookie<'c, Conn, InternAtomReply>, ConnectionError>
where
Conn: RequestConnection + ?Sized,
{
let request0 = InternAtomRequest {
only_if_exists,
name: Cow::Borrowed(name),
};
let (bytes, fds) = request0.serialize();
let slices = [IoSlice::new(&bytes[0]), IoSlice::new(&bytes[1]), IoSlice::new(&bytes[2])];
assert_eq!(slices.len(), bytes.len());
conn.send_request_with_reply(&slices, fds).await
}
pub async fn get_atom_name<Conn>(conn: &Conn, atom: Atom) -> Result<Cookie<'_, Conn, GetAtomNameReply>, ConnectionError>
where
Conn: RequestConnection + ?Sized,
{
let request0 = GetAtomNameRequest {
atom,
};
let (bytes, fds) = request0.serialize();
let slices = [IoSlice::new(&bytes[0])];
assert_eq!(slices.len(), bytes.len());
conn.send_request_with_reply(&slices, fds).await
}
pub async fn change_property<'c, 'input, Conn, A, B>(conn: &'c Conn, mode: PropMode, window: Window, property: A, type_: B, format: u8, data_len: u32, data: &'input [u8]) -> Result<VoidCookie<'c, Conn>, ConnectionError>
where
Conn: RequestConnection + ?Sized,
A: Into<Atom> + Send,
B: Into<Atom> + Send,
{
let property: Atom = property.into();
let type_: Atom = type_.into();
let request0 = ChangePropertyRequest {
mode,
window,
property,
type_,
format,
data_len,
data: Cow::Borrowed(data),
};
let (bytes, fds) = request0.serialize();
let slices = [IoSlice::new(&bytes[0]), IoSlice::new(&bytes[1]), IoSlice::new(&bytes[2])];
assert_eq!(slices.len(), bytes.len());
conn.send_request_without_reply(&slices, fds).await
}
pub async fn delete_property<Conn>(conn: &Conn, window: Window, property: Atom) -> Result<VoidCookie<'_, Conn>, ConnectionError>
where
Conn: RequestConnection + ?Sized,
{
let request0 = DeletePropertyRequest {
window,
property,
};
let (bytes, fds) = request0.serialize();
let slices = [IoSlice::new(&bytes[0])];
assert_eq!(slices.len(), bytes.len());
conn.send_request_without_reply(&slices, fds).await
}
pub async fn get_property<Conn, A, B>(conn: &Conn, delete: bool, window: Window, property: A, type_: B, long_offset: u32, long_length: u32) -> Result<Cookie<'_, Conn, GetPropertyReply>, ConnectionError>
where
Conn: RequestConnection + ?Sized,
A: Into<Atom> + Send,
B: Into<Atom> + Send,
{
let property: Atom = property.into();
let type_: Atom = type_.into();
let request0 = GetPropertyRequest {
delete,
window,
property,
type_,
long_offset,
long_length,
};
let (bytes, fds) = request0.serialize();
let slices = [IoSlice::new(&bytes[0])];
assert_eq!(slices.len(), bytes.len());
conn.send_request_with_reply(&slices, fds).await
}
pub async fn list_properties<Conn>(conn: &Conn, window: Window) -> Result<Cookie<'_, Conn, ListPropertiesReply>, ConnectionError>
where
Conn: RequestConnection + ?Sized,
{
let request0 = ListPropertiesRequest {
window,
};
let (bytes, fds) = request0.serialize();
let slices = [IoSlice::new(&bytes[0])];
assert_eq!(slices.len(), bytes.len());
conn.send_request_with_reply(&slices, fds).await
}
pub async fn set_selection_owner<Conn, A, B>(conn: &Conn, owner: A, selection: Atom, time: B) -> Result<VoidCookie<'_, Conn>, ConnectionError>
where
Conn: RequestConnection + ?Sized,
A: Into<Window> + Send,
B: Into<Timestamp> + Send,
{
let owner: Window = owner.into();
let time: Timestamp = time.into();
let request0 = SetSelectionOwnerRequest {
owner,
selection,
time,
};
let (bytes, fds) = request0.serialize();
let slices = [IoSlice::new(&bytes[0])];
assert_eq!(slices.len(), bytes.len());
conn.send_request_without_reply(&slices, fds).await
}
pub async fn get_selection_owner<Conn>(conn: &Conn, selection: Atom) -> Result<Cookie<'_, Conn, GetSelectionOwnerReply>, ConnectionError>
where
Conn: RequestConnection + ?Sized,
{
let request0 = GetSelectionOwnerRequest {
selection,
};
let (bytes, fds) = request0.serialize();
let slices = [IoSlice::new(&bytes[0])];
assert_eq!(slices.len(), bytes.len());
conn.send_request_with_reply(&slices, fds).await
}
pub async fn convert_selection<Conn, A, B>(conn: &Conn, requestor: Window, selection: Atom, target: Atom, property: A, time: B) -> Result<VoidCookie<'_, Conn>, ConnectionError>
where
Conn: RequestConnection + ?Sized,
A: Into<Atom> + Send,
B: Into<Timestamp> + Send,
{
let property: Atom = property.into();
let time: Timestamp = time.into();
let request0 = ConvertSelectionRequest {
requestor,
selection,
target,
property,
time,
};
let (bytes, fds) = request0.serialize();
let slices = [IoSlice::new(&bytes[0])];
assert_eq!(slices.len(), bytes.len());
conn.send_request_without_reply(&slices, fds).await
}
pub async fn send_event<Conn, A, B>(conn: &Conn, propagate: bool, destination: A, event_mask: EventMask, event: B) -> Result<VoidCookie<'_, Conn>, ConnectionError>
where
Conn: RequestConnection + ?Sized,
A: Into<Window> + Send,
B: Into<[u8; 32]> + Send,
{
let destination: Window = destination.into();
let event = Cow::Owned(event.into());
let request0 = SendEventRequest {
propagate,
destination,
event_mask,
event,
};
let (bytes, fds) = request0.serialize();
let slices = [IoSlice::new(&bytes[0]), IoSlice::new(&bytes[1])];
assert_eq!(slices.len(), bytes.len());
conn.send_request_without_reply(&slices, fds).await
}
pub async fn grab_pointer<Conn, A, B, C>(conn: &Conn, owner_events: bool, grab_window: Window, event_mask: EventMask, pointer_mode: GrabMode, keyboard_mode: GrabMode, confine_to: A, cursor: B, time: C) -> Result<Cookie<'_, Conn, GrabPointerReply>, ConnectionError>
where
Conn: RequestConnection + ?Sized,
A: Into<Window> + Send,
B: Into<Cursor> + Send,
C: Into<Timestamp> + Send,
{
let confine_to: Window = confine_to.into();
let cursor: Cursor = cursor.into();
let time: Timestamp = time.into();
let request0 = GrabPointerRequest {
owner_events,
grab_window,
event_mask,
pointer_mode,
keyboard_mode,
confine_to,
cursor,
time,
};
let (bytes, fds) = request0.serialize();
let slices = [IoSlice::new(&bytes[0])];
assert_eq!(slices.len(), bytes.len());
conn.send_request_with_reply(&slices, fds).await
}
pub async fn ungrab_pointer<Conn, A>(conn: &Conn, time: A) -> Result<VoidCookie<'_, Conn>, ConnectionError>
where
Conn: RequestConnection + ?Sized,
A: Into<Timestamp> + Send,
{
let time: Timestamp = time.into();
let request0 = UngrabPointerRequest {
time,
};
let (bytes, fds) = request0.serialize();
let slices = [IoSlice::new(&bytes[0])];
assert_eq!(slices.len(), bytes.len());
conn.send_request_without_reply(&slices, fds).await
}
pub async fn grab_button<Conn, A, B>(conn: &Conn, owner_events: bool, grab_window: Window, event_mask: EventMask, pointer_mode: GrabMode, keyboard_mode: GrabMode, confine_to: A, cursor: B, button: ButtonIndex, modifiers: ModMask) -> Result<VoidCookie<'_, Conn>, ConnectionError>
where
Conn: RequestConnection + ?Sized,
A: Into<Window> + Send,
B: Into<Cursor> + Send,
{
let confine_to: Window = confine_to.into();
let cursor: Cursor = cursor.into();
let request0 = GrabButtonRequest {
owner_events,
grab_window,
event_mask,
pointer_mode,
keyboard_mode,
confine_to,
cursor,
button,
modifiers,
};
let (bytes, fds) = request0.serialize();
let slices = [IoSlice::new(&bytes[0])];
assert_eq!(slices.len(), bytes.len());
conn.send_request_without_reply(&slices, fds).await
}
pub async fn ungrab_button<Conn>(conn: &Conn, button: ButtonIndex, grab_window: Window, modifiers: ModMask) -> Result<VoidCookie<'_, Conn>, ConnectionError>
where
Conn: RequestConnection + ?Sized,
{
let request0 = UngrabButtonRequest {
button,
grab_window,
modifiers,
};
let (bytes, fds) = request0.serialize();
let slices = [IoSlice::new(&bytes[0])];
assert_eq!(slices.len(), bytes.len());
conn.send_request_without_reply(&slices, fds).await
}
pub async fn change_active_pointer_grab<Conn, A, B>(conn: &Conn, cursor: A, time: B, event_mask: EventMask) -> Result<VoidCookie<'_, Conn>, ConnectionError>
where
Conn: RequestConnection + ?Sized,
A: Into<Cursor> + Send,
B: Into<Timestamp> + Send,
{
let cursor: Cursor = cursor.into();
let time: Timestamp = time.into();
let request0 = ChangeActivePointerGrabRequest {
cursor,
time,
event_mask,
};
let (bytes, fds) = request0.serialize();
let slices = [IoSlice::new(&bytes[0])];
assert_eq!(slices.len(), bytes.len());
conn.send_request_without_reply(&slices, fds).await
}
pub async fn grab_keyboard<Conn, A>(conn: &Conn, owner_events: bool, grab_window: Window, time: A, pointer_mode: GrabMode, keyboard_mode: GrabMode) -> Result<Cookie<'_, Conn, GrabKeyboardReply>, ConnectionError>
where
Conn: RequestConnection + ?Sized,
A: Into<Timestamp> + Send,
{
let time: Timestamp = time.into();
let request0 = GrabKeyboardRequest {
owner_events,
grab_window,
time,
pointer_mode,
keyboard_mode,
};
let (bytes, fds) = request0.serialize();
let slices = [IoSlice::new(&bytes[0])];
assert_eq!(slices.len(), bytes.len());
conn.send_request_with_reply(&slices, fds).await
}
pub async fn ungrab_keyboard<Conn, A>(conn: &Conn, time: A) -> Result<VoidCookie<'_, Conn>, ConnectionError>
where
Conn: RequestConnection + ?Sized,
A: Into<Timestamp> + Send,
{
let time: Timestamp = time.into();
let request0 = UngrabKeyboardRequest {
time,
};
let (bytes, fds) = request0.serialize();
let slices = [IoSlice::new(&bytes[0])];
assert_eq!(slices.len(), bytes.len());
conn.send_request_without_reply(&slices, fds).await
}
pub async fn grab_key<Conn, A>(conn: &Conn, owner_events: bool, grab_window: Window, modifiers: ModMask, key: A, pointer_mode: GrabMode, keyboard_mode: GrabMode) -> Result<VoidCookie<'_, Conn>, ConnectionError>
where
Conn: RequestConnection + ?Sized,
A: Into<Keycode> + Send,
{
let key: Keycode = key.into();
let request0 = GrabKeyRequest {
owner_events,
grab_window,
modifiers,
key,
pointer_mode,
keyboard_mode,
};
let (bytes, fds) = request0.serialize();
let slices = [IoSlice::new(&bytes[0])];
assert_eq!(slices.len(), bytes.len());
conn.send_request_without_reply(&slices, fds).await
}
pub async fn ungrab_key<Conn, A>(conn: &Conn, key: A, grab_window: Window, modifiers: ModMask) -> Result<VoidCookie<'_, Conn>, ConnectionError>
where
Conn: RequestConnection + ?Sized,
A: Into<Keycode> + Send,
{
let key: Keycode = key.into();
let request0 = UngrabKeyRequest {
key,
grab_window,
modifiers,
};
let (bytes, fds) = request0.serialize();
let slices = [IoSlice::new(&bytes[0])];
assert_eq!(slices.len(), bytes.len());
conn.send_request_without_reply(&slices, fds).await
}
pub async fn allow_events<Conn, A>(conn: &Conn, mode: Allow, time: A) -> Result<VoidCookie<'_, Conn>, ConnectionError>
where
Conn: RequestConnection + ?Sized,
A: Into<Timestamp> + Send,
{
let time: Timestamp = time.into();
let request0 = AllowEventsRequest {
mode,
time,
};
let (bytes, fds) = request0.serialize();
let slices = [IoSlice::new(&bytes[0])];
assert_eq!(slices.len(), bytes.len());
conn.send_request_without_reply(&slices, fds).await
}
pub async fn grab_server<Conn>(conn: &Conn) -> Result<VoidCookie<'_, Conn>, ConnectionError>
where
Conn: RequestConnection + ?Sized,
{
let request0 = GrabServerRequest;
let (bytes, fds) = request0.serialize();
let slices = [IoSlice::new(&bytes[0])];
assert_eq!(slices.len(), bytes.len());
conn.send_request_without_reply(&slices, fds).await
}
pub async fn ungrab_server<Conn>(conn: &Conn) -> Result<VoidCookie<'_, Conn>, ConnectionError>
where
Conn: RequestConnection + ?Sized,
{
let request0 = UngrabServerRequest;
let (bytes, fds) = request0.serialize();
let slices = [IoSlice::new(&bytes[0])];
assert_eq!(slices.len(), bytes.len());
conn.send_request_without_reply(&slices, fds).await
}
pub async fn query_pointer<Conn>(conn: &Conn, window: Window) -> Result<Cookie<'_, Conn, QueryPointerReply>, ConnectionError>
where
Conn: RequestConnection + ?Sized,
{
let request0 = QueryPointerRequest {
window,
};
let (bytes, fds) = request0.serialize();
let slices = [IoSlice::new(&bytes[0])];
assert_eq!(slices.len(), bytes.len());
conn.send_request_with_reply(&slices, fds).await
}
pub async fn get_motion_events<Conn, A, B>(conn: &Conn, window: Window, start: A, stop: B) -> Result<Cookie<'_, Conn, GetMotionEventsReply>, ConnectionError>
where
Conn: RequestConnection + ?Sized,
A: Into<Timestamp> + Send,
B: Into<Timestamp> + Send,
{
let start: Timestamp = start.into();
let stop: Timestamp = stop.into();
let request0 = GetMotionEventsRequest {
window,
start,
stop,
};
let (bytes, fds) = request0.serialize();
let slices = [IoSlice::new(&bytes[0])];
assert_eq!(slices.len(), bytes.len());
conn.send_request_with_reply(&slices, fds).await
}
pub async fn translate_coordinates<Conn>(conn: &Conn, src_window: Window, dst_window: Window, src_x: i16, src_y: i16) -> Result<Cookie<'_, Conn, TranslateCoordinatesReply>, ConnectionError>
where
Conn: RequestConnection + ?Sized,
{
let request0 = TranslateCoordinatesRequest {
src_window,
dst_window,
src_x,
src_y,
};
let (bytes, fds) = request0.serialize();
let slices = [IoSlice::new(&bytes[0])];
assert_eq!(slices.len(), bytes.len());
conn.send_request_with_reply(&slices, fds).await
}
pub async fn warp_pointer<Conn, A, B>(conn: &Conn, src_window: A, dst_window: B, src_x: i16, src_y: i16, src_width: u16, src_height: u16, dst_x: i16, dst_y: i16) -> Result<VoidCookie<'_, Conn>, ConnectionError>
where
Conn: RequestConnection + ?Sized,
A: Into<Window> + Send,
B: Into<Window> + Send,
{
let src_window: Window = src_window.into();
let dst_window: Window = dst_window.into();
let request0 = WarpPointerRequest {
src_window,
dst_window,
src_x,
src_y,
src_width,
src_height,
dst_x,
dst_y,
};
let (bytes, fds) = request0.serialize();
let slices = [IoSlice::new(&bytes[0])];
assert_eq!(slices.len(), bytes.len());
conn.send_request_without_reply(&slices, fds).await
}
pub async fn set_input_focus<Conn, A, B>(conn: &Conn, revert_to: InputFocus, focus: A, time: B) -> Result<VoidCookie<'_, Conn>, ConnectionError>
where
Conn: RequestConnection + ?Sized,
A: Into<Window> + Send,
B: Into<Timestamp> + Send,
{
let focus: Window = focus.into();
let time: Timestamp = time.into();
let request0 = SetInputFocusRequest {
revert_to,
focus,
time,
};
let (bytes, fds) = request0.serialize();
let slices = [IoSlice::new(&bytes[0])];
assert_eq!(slices.len(), bytes.len());
conn.send_request_without_reply(&slices, fds).await
}
pub async fn get_input_focus<Conn>(conn: &Conn) -> Result<Cookie<'_, Conn, GetInputFocusReply>, ConnectionError>
where
Conn: RequestConnection + ?Sized,
{
let request0 = GetInputFocusRequest;
let (bytes, fds) = request0.serialize();
let slices = [IoSlice::new(&bytes[0])];
assert_eq!(slices.len(), bytes.len());
conn.send_request_with_reply(&slices, fds).await
}
pub async fn query_keymap<Conn>(conn: &Conn) -> Result<Cookie<'_, Conn, QueryKeymapReply>, ConnectionError>
where
Conn: RequestConnection + ?Sized,
{
let request0 = QueryKeymapRequest;
let (bytes, fds) = request0.serialize();
let slices = [IoSlice::new(&bytes[0])];
assert_eq!(slices.len(), bytes.len());
conn.send_request_with_reply(&slices, fds).await
}
pub async fn open_font<'c, 'input, Conn>(conn: &'c Conn, fid: Font, name: &'input [u8]) -> Result<VoidCookie<'c, Conn>, ConnectionError>
where
Conn: RequestConnection + ?Sized,
{
let request0 = OpenFontRequest {
fid,
name: Cow::Borrowed(name),
};
let (bytes, fds) = request0.serialize();
let slices = [IoSlice::new(&bytes[0]), IoSlice::new(&bytes[1]), IoSlice::new(&bytes[2])];
assert_eq!(slices.len(), bytes.len());
conn.send_request_without_reply(&slices, fds).await
}
pub async fn close_font<Conn>(conn: &Conn, font: Font) -> Result<VoidCookie<'_, Conn>, ConnectionError>
where
Conn: RequestConnection + ?Sized,
{
let request0 = CloseFontRequest {
font,
};
let (bytes, fds) = request0.serialize();
let slices = [IoSlice::new(&bytes[0])];
assert_eq!(slices.len(), bytes.len());
conn.send_request_without_reply(&slices, fds).await
}
pub async fn query_font<Conn>(conn: &Conn, font: Fontable) -> Result<Cookie<'_, Conn, QueryFontReply>, ConnectionError>
where
Conn: RequestConnection + ?Sized,
{
let request0 = QueryFontRequest {
font,
};
let (bytes, fds) = request0.serialize();
let slices = [IoSlice::new(&bytes[0])];
assert_eq!(slices.len(), bytes.len());
conn.send_request_with_reply(&slices, fds).await
}
pub async fn query_text_extents<'c, 'input, Conn>(conn: &'c Conn, font: Fontable, string: &'input [Char2b]) -> Result<Cookie<'c, Conn, QueryTextExtentsReply>, ConnectionError>
where
Conn: RequestConnection + ?Sized,
{
let request0 = QueryTextExtentsRequest {
font,
string: Cow::Borrowed(string),
};
let (bytes, fds) = request0.serialize();
let slices = [IoSlice::new(&bytes[0]), IoSlice::new(&bytes[1]), IoSlice::new(&bytes[2])];
assert_eq!(slices.len(), bytes.len());
conn.send_request_with_reply(&slices, fds).await
}
pub async fn list_fonts<'c, 'input, Conn>(conn: &'c Conn, max_names: u16, pattern: &'input [u8]) -> Result<Cookie<'c, Conn, ListFontsReply>, ConnectionError>
where
Conn: RequestConnection + ?Sized,
{
let request0 = ListFontsRequest {
max_names,
pattern: Cow::Borrowed(pattern),
};
let (bytes, fds) = request0.serialize();
let slices = [IoSlice::new(&bytes[0]), IoSlice::new(&bytes[1]), IoSlice::new(&bytes[2])];
assert_eq!(slices.len(), bytes.len());
conn.send_request_with_reply(&slices, fds).await
}
pub async fn list_fonts_with_info<'c, 'input, Conn>(conn: &'c Conn, max_names: u16, pattern: &'input [u8]) -> Result<ListFontsWithInfoCookie<'c, Conn>, ConnectionError>
where
Conn: RequestConnection + ?Sized,
{
let request0 = ListFontsWithInfoRequest {
max_names,
pattern: Cow::Borrowed(pattern),
};
let (bytes, fds) = request0.serialize();
let slices = [IoSlice::new(&bytes[0]), IoSlice::new(&bytes[1]), IoSlice::new(&bytes[2])];
assert_eq!(slices.len(), bytes.len());
Ok(ListFontsWithInfoCookie::new(conn.send_request_with_reply(&slices, fds).await?))
}
pub async fn set_font_path<'c, 'input, Conn>(conn: &'c Conn, font: &'input [Str]) -> Result<VoidCookie<'c, Conn>, ConnectionError>
where
Conn: RequestConnection + ?Sized,
{
let request0 = SetFontPathRequest {
font: Cow::Borrowed(font),
};
let (bytes, fds) = request0.serialize();
let slices = [IoSlice::new(&bytes[0]), IoSlice::new(&bytes[1]), IoSlice::new(&bytes[2])];
assert_eq!(slices.len(), bytes.len());
conn.send_request_without_reply(&slices, fds).await
}
pub async fn get_font_path<Conn>(conn: &Conn) -> Result<Cookie<'_, Conn, GetFontPathReply>, ConnectionError>
where
Conn: RequestConnection + ?Sized,
{
let request0 = GetFontPathRequest;
let (bytes, fds) = request0.serialize();
let slices = [IoSlice::new(&bytes[0])];
assert_eq!(slices.len(), bytes.len());
conn.send_request_with_reply(&slices, fds).await
}
pub async fn create_pixmap<Conn>(conn: &Conn, depth: u8, pid: Pixmap, drawable: Drawable, width: u16, height: u16) -> Result<VoidCookie<'_, Conn>, ConnectionError>
where
Conn: RequestConnection + ?Sized,
{
let request0 = CreatePixmapRequest {
depth,
pid,
drawable,
width,
height,
};
let (bytes, fds) = request0.serialize();
let slices = [IoSlice::new(&bytes[0])];
assert_eq!(slices.len(), bytes.len());
conn.send_request_without_reply(&slices, fds).await
}
pub async fn free_pixmap<Conn>(conn: &Conn, pixmap: Pixmap) -> Result<VoidCookie<'_, Conn>, ConnectionError>
where
Conn: RequestConnection + ?Sized,
{
let request0 = FreePixmapRequest {
pixmap,
};
let (bytes, fds) = request0.serialize();
let slices = [IoSlice::new(&bytes[0])];
assert_eq!(slices.len(), bytes.len());
conn.send_request_without_reply(&slices, fds).await
}
pub async fn create_gc<'c, 'input, Conn>(conn: &'c Conn, cid: Gcontext, drawable: Drawable, value_list: &'input CreateGCAux) -> Result<VoidCookie<'c, Conn>, ConnectionError>
where
Conn: RequestConnection + ?Sized,
{
let request0 = CreateGCRequest {
cid,
drawable,
value_list: Cow::Borrowed(value_list),
};
let (bytes, fds) = request0.serialize();
let slices = [IoSlice::new(&bytes[0]), IoSlice::new(&bytes[1]), IoSlice::new(&bytes[2])];
assert_eq!(slices.len(), bytes.len());
conn.send_request_without_reply(&slices, fds).await
}
pub async fn change_gc<'c, 'input, Conn>(conn: &'c Conn, gc: Gcontext, value_list: &'input ChangeGCAux) -> Result<VoidCookie<'c, Conn>, ConnectionError>
where
Conn: RequestConnection + ?Sized,
{
let request0 = ChangeGCRequest {
gc,
value_list: Cow::Borrowed(value_list),
};
let (bytes, fds) = request0.serialize();
let slices = [IoSlice::new(&bytes[0]), IoSlice::new(&bytes[1]), IoSlice::new(&bytes[2])];
assert_eq!(slices.len(), bytes.len());
conn.send_request_without_reply(&slices, fds).await
}
pub async fn copy_gc<Conn>(conn: &Conn, src_gc: Gcontext, dst_gc: Gcontext, value_mask: GC) -> Result<VoidCookie<'_, Conn>, ConnectionError>
where
Conn: RequestConnection + ?Sized,
{
let request0 = CopyGCRequest {
src_gc,
dst_gc,
value_mask,
};
let (bytes, fds) = request0.serialize();
let slices = [IoSlice::new(&bytes[0])];
assert_eq!(slices.len(), bytes.len());
conn.send_request_without_reply(&slices, fds).await
}
pub async fn set_dashes<'c, 'input, Conn>(conn: &'c Conn, gc: Gcontext, dash_offset: u16, dashes: &'input [u8]) -> Result<VoidCookie<'c, Conn>, ConnectionError>
where
Conn: RequestConnection + ?Sized,
{
let request0 = SetDashesRequest {
gc,
dash_offset,
dashes: Cow::Borrowed(dashes),
};
let (bytes, fds) = request0.serialize();
let slices = [IoSlice::new(&bytes[0]), IoSlice::new(&bytes[1]), IoSlice::new(&bytes[2])];
assert_eq!(slices.len(), bytes.len());
conn.send_request_without_reply(&slices, fds).await
}
pub async fn set_clip_rectangles<'c, 'input, Conn>(conn: &'c Conn, ordering: ClipOrdering, gc: Gcontext, clip_x_origin: i16, clip_y_origin: i16, rectangles: &'input [Rectangle]) -> Result<VoidCookie<'c, Conn>, ConnectionError>
where
Conn: RequestConnection + ?Sized,
{
let request0 = SetClipRectanglesRequest {
ordering,
gc,
clip_x_origin,
clip_y_origin,
rectangles: Cow::Borrowed(rectangles),
};
let (bytes, fds) = request0.serialize();
let slices = [IoSlice::new(&bytes[0]), IoSlice::new(&bytes[1]), IoSlice::new(&bytes[2])];
assert_eq!(slices.len(), bytes.len());
conn.send_request_without_reply(&slices, fds).await
}
pub async fn free_gc<Conn>(conn: &Conn, gc: Gcontext) -> Result<VoidCookie<'_, Conn>, ConnectionError>
where
Conn: RequestConnection + ?Sized,
{
let request0 = FreeGCRequest {
gc,
};
let (bytes, fds) = request0.serialize();
let slices = [IoSlice::new(&bytes[0])];
assert_eq!(slices.len(), bytes.len());
conn.send_request_without_reply(&slices, fds).await
}
pub async fn clear_area<Conn>(conn: &Conn, exposures: bool, window: Window, x: i16, y: i16, width: u16, height: u16) -> Result<VoidCookie<'_, Conn>, ConnectionError>
where
Conn: RequestConnection + ?Sized,
{
let request0 = ClearAreaRequest {
exposures,
window,
x,
y,
width,
height,
};
let (bytes, fds) = request0.serialize();
let slices = [IoSlice::new(&bytes[0])];
assert_eq!(slices.len(), bytes.len());
conn.send_request_without_reply(&slices, fds).await
}
pub async fn copy_area<Conn>(conn: &Conn, src_drawable: Drawable, dst_drawable: Drawable, gc: Gcontext, src_x: i16, src_y: i16, dst_x: i16, dst_y: i16, width: u16, height: u16) -> Result<VoidCookie<'_, Conn>, ConnectionError>
where
Conn: RequestConnection + ?Sized,
{
let request0 = CopyAreaRequest {
src_drawable,
dst_drawable,
gc,
src_x,
src_y,
dst_x,
dst_y,
width,
height,
};
let (bytes, fds) = request0.serialize();
let slices = [IoSlice::new(&bytes[0])];
assert_eq!(slices.len(), bytes.len());
conn.send_request_without_reply(&slices, fds).await
}
pub async fn copy_plane<Conn>(conn: &Conn, src_drawable: Drawable, dst_drawable: Drawable, gc: Gcontext, src_x: i16, src_y: i16, dst_x: i16, dst_y: i16, width: u16, height: u16, bit_plane: u32) -> Result<VoidCookie<'_, Conn>, ConnectionError>
where
Conn: RequestConnection + ?Sized,
{
let request0 = CopyPlaneRequest {
src_drawable,
dst_drawable,
gc,
src_x,
src_y,
dst_x,
dst_y,
width,
height,
bit_plane,
};
let (bytes, fds) = request0.serialize();
let slices = [IoSlice::new(&bytes[0])];
assert_eq!(slices.len(), bytes.len());
conn.send_request_without_reply(&slices, fds).await
}
pub async fn poly_point<'c, 'input, Conn>(conn: &'c Conn, coordinate_mode: CoordMode, drawable: Drawable, gc: Gcontext, points: &'input [Point]) -> Result<VoidCookie<'c, Conn>, ConnectionError>
where
Conn: RequestConnection + ?Sized,
{
let request0 = PolyPointRequest {
coordinate_mode,
drawable,
gc,
points: Cow::Borrowed(points),
};
let (bytes, fds) = request0.serialize();
let slices = [IoSlice::new(&bytes[0]), IoSlice::new(&bytes[1]), IoSlice::new(&bytes[2])];
assert_eq!(slices.len(), bytes.len());
conn.send_request_without_reply(&slices, fds).await
}
pub async fn poly_line<'c, 'input, Conn>(conn: &'c Conn, coordinate_mode: CoordMode, drawable: Drawable, gc: Gcontext, points: &'input [Point]) -> Result<VoidCookie<'c, Conn>, ConnectionError>
where
Conn: RequestConnection + ?Sized,
{
let request0 = PolyLineRequest {
coordinate_mode,
drawable,
gc,
points: Cow::Borrowed(points),
};
let (bytes, fds) = request0.serialize();
let slices = [IoSlice::new(&bytes[0]), IoSlice::new(&bytes[1]), IoSlice::new(&bytes[2])];
assert_eq!(slices.len(), bytes.len());
conn.send_request_without_reply(&slices, fds).await
}
pub async fn poly_segment<'c, 'input, Conn>(conn: &'c Conn, drawable: Drawable, gc: Gcontext, segments: &'input [Segment]) -> Result<VoidCookie<'c, Conn>, ConnectionError>
where
Conn: RequestConnection + ?Sized,
{
let request0 = PolySegmentRequest {
drawable,
gc,
segments: Cow::Borrowed(segments),
};
let (bytes, fds) = request0.serialize();
let slices = [IoSlice::new(&bytes[0]), IoSlice::new(&bytes[1]), IoSlice::new(&bytes[2])];
assert_eq!(slices.len(), bytes.len());
conn.send_request_without_reply(&slices, fds).await
}
pub async fn poly_rectangle<'c, 'input, Conn>(conn: &'c Conn, drawable: Drawable, gc: Gcontext, rectangles: &'input [Rectangle]) -> Result<VoidCookie<'c, Conn>, ConnectionError>
where
Conn: RequestConnection + ?Sized,
{
let request0 = PolyRectangleRequest {
drawable,
gc,
rectangles: Cow::Borrowed(rectangles),
};
let (bytes, fds) = request0.serialize();
let slices = [IoSlice::new(&bytes[0]), IoSlice::new(&bytes[1]), IoSlice::new(&bytes[2])];
assert_eq!(slices.len(), bytes.len());
conn.send_request_without_reply(&slices, fds).await
}
pub async fn poly_arc<'c, 'input, Conn>(conn: &'c Conn, drawable: Drawable, gc: Gcontext, arcs: &'input [Arc]) -> Result<VoidCookie<'c, Conn>, ConnectionError>
where
Conn: RequestConnection + ?Sized,
{
let request0 = PolyArcRequest {
drawable,
gc,
arcs: Cow::Borrowed(arcs),
};
let (bytes, fds) = request0.serialize();
let slices = [IoSlice::new(&bytes[0]), IoSlice::new(&bytes[1]), IoSlice::new(&bytes[2])];
assert_eq!(slices.len(), bytes.len());
conn.send_request_without_reply(&slices, fds).await
}
pub async fn fill_poly<'c, 'input, Conn>(conn: &'c Conn, drawable: Drawable, gc: Gcontext, shape: PolyShape, coordinate_mode: CoordMode, points: &'input [Point]) -> Result<VoidCookie<'c, Conn>, ConnectionError>
where
Conn: RequestConnection + ?Sized,
{
let request0 = FillPolyRequest {
drawable,
gc,
shape,
coordinate_mode,
points: Cow::Borrowed(points),
};
let (bytes, fds) = request0.serialize();
let slices = [IoSlice::new(&bytes[0]), IoSlice::new(&bytes[1]), IoSlice::new(&bytes[2])];
assert_eq!(slices.len(), bytes.len());
conn.send_request_without_reply(&slices, fds).await
}
pub async fn poly_fill_rectangle<'c, 'input, Conn>(conn: &'c Conn, drawable: Drawable, gc: Gcontext, rectangles: &'input [Rectangle]) -> Result<VoidCookie<'c, Conn>, ConnectionError>
where
Conn: RequestConnection + ?Sized,
{
let request0 = PolyFillRectangleRequest {
drawable,
gc,
rectangles: Cow::Borrowed(rectangles),
};
let (bytes, fds) = request0.serialize();
let slices = [IoSlice::new(&bytes[0]), IoSlice::new(&bytes[1]), IoSlice::new(&bytes[2])];
assert_eq!(slices.len(), bytes.len());
conn.send_request_without_reply(&slices, fds).await
}
pub async fn poly_fill_arc<'c, 'input, Conn>(conn: &'c Conn, drawable: Drawable, gc: Gcontext, arcs: &'input [Arc]) -> Result<VoidCookie<'c, Conn>, ConnectionError>
where
Conn: RequestConnection + ?Sized,
{
let request0 = PolyFillArcRequest {
drawable,
gc,
arcs: Cow::Borrowed(arcs),
};
let (bytes, fds) = request0.serialize();
let slices = [IoSlice::new(&bytes[0]), IoSlice::new(&bytes[1]), IoSlice::new(&bytes[2])];
assert_eq!(slices.len(), bytes.len());
conn.send_request_without_reply(&slices, fds).await
}
pub async fn put_image<'c, 'input, Conn>(conn: &'c Conn, format: ImageFormat, drawable: Drawable, gc: Gcontext, width: u16, height: u16, dst_x: i16, dst_y: i16, left_pad: u8, depth: u8, data: &'input [u8]) -> Result<VoidCookie<'c, Conn>, ConnectionError>
where
Conn: RequestConnection + ?Sized,
{
let request0 = PutImageRequest {
format,
drawable,
gc,
width,
height,
dst_x,
dst_y,
left_pad,
depth,
data: Cow::Borrowed(data),
};
let (bytes, fds) = request0.serialize();
let slices = [IoSlice::new(&bytes[0]), IoSlice::new(&bytes[1]), IoSlice::new(&bytes[2])];
assert_eq!(slices.len(), bytes.len());
conn.send_request_without_reply(&slices, fds).await
}
pub async fn get_image<Conn>(conn: &Conn, format: ImageFormat, drawable: Drawable, x: i16, y: i16, width: u16, height: u16, plane_mask: u32) -> Result<Cookie<'_, Conn, GetImageReply>, ConnectionError>
where
Conn: RequestConnection + ?Sized,
{
let request0 = GetImageRequest {
format,
drawable,
x,
y,
width,
height,
plane_mask,
};
let (bytes, fds) = request0.serialize();
let slices = [IoSlice::new(&bytes[0])];
assert_eq!(slices.len(), bytes.len());
conn.send_request_with_reply(&slices, fds).await
}
pub async fn poly_text8<'c, 'input, Conn>(conn: &'c Conn, drawable: Drawable, gc: Gcontext, x: i16, y: i16, items: &'input [u8]) -> Result<VoidCookie<'c, Conn>, ConnectionError>
where
Conn: RequestConnection + ?Sized,
{
let request0 = PolyText8Request {
drawable,
gc,
x,
y,
items: Cow::Borrowed(items),
};
let (bytes, fds) = request0.serialize();
let slices = [IoSlice::new(&bytes[0]), IoSlice::new(&bytes[1]), IoSlice::new(&bytes[2])];
assert_eq!(slices.len(), bytes.len());
conn.send_request_without_reply(&slices, fds).await
}
pub async fn poly_text16<'c, 'input, Conn>(conn: &'c Conn, drawable: Drawable, gc: Gcontext, x: i16, y: i16, items: &'input [u8]) -> Result<VoidCookie<'c, Conn>, ConnectionError>
where
Conn: RequestConnection + ?Sized,
{
let request0 = PolyText16Request {
drawable,
gc,
x,
y,
items: Cow::Borrowed(items),
};
let (bytes, fds) = request0.serialize();
let slices = [IoSlice::new(&bytes[0]), IoSlice::new(&bytes[1]), IoSlice::new(&bytes[2])];
assert_eq!(slices.len(), bytes.len());
conn.send_request_without_reply(&slices, fds).await
}
pub async fn image_text8<'c, 'input, Conn>(conn: &'c Conn, drawable: Drawable, gc: Gcontext, x: i16, y: i16, string: &'input [u8]) -> Result<VoidCookie<'c, Conn>, ConnectionError>
where
Conn: RequestConnection + ?Sized,
{
let request0 = ImageText8Request {
drawable,
gc,
x,
y,
string: Cow::Borrowed(string),
};
let (bytes, fds) = request0.serialize();
let slices = [IoSlice::new(&bytes[0]), IoSlice::new(&bytes[1]), IoSlice::new(&bytes[2])];
assert_eq!(slices.len(), bytes.len());
conn.send_request_without_reply(&slices, fds).await
}
pub async fn image_text16<'c, 'input, Conn>(conn: &'c Conn, drawable: Drawable, gc: Gcontext, x: i16, y: i16, string: &'input [Char2b]) -> Result<VoidCookie<'c, Conn>, ConnectionError>
where
Conn: RequestConnection + ?Sized,
{
let request0 = ImageText16Request {
drawable,
gc,
x,
y,
string: Cow::Borrowed(string),
};
let (bytes, fds) = request0.serialize();
let slices = [IoSlice::new(&bytes[0]), IoSlice::new(&bytes[1]), IoSlice::new(&bytes[2])];
assert_eq!(slices.len(), bytes.len());
conn.send_request_without_reply(&slices, fds).await
}
pub async fn create_colormap<Conn>(conn: &Conn, alloc: ColormapAlloc, mid: Colormap, window: Window, visual: Visualid) -> Result<VoidCookie<'_, Conn>, ConnectionError>
where
Conn: RequestConnection + ?Sized,
{
let request0 = CreateColormapRequest {
alloc,
mid,
window,
visual,
};
let (bytes, fds) = request0.serialize();
let slices = [IoSlice::new(&bytes[0])];
assert_eq!(slices.len(), bytes.len());
conn.send_request_without_reply(&slices, fds).await
}
pub async fn free_colormap<Conn>(conn: &Conn, cmap: Colormap) -> Result<VoidCookie<'_, Conn>, ConnectionError>
where
Conn: RequestConnection + ?Sized,
{
let request0 = FreeColormapRequest {
cmap,
};
let (bytes, fds) = request0.serialize();
let slices = [IoSlice::new(&bytes[0])];
assert_eq!(slices.len(), bytes.len());
conn.send_request_without_reply(&slices, fds).await
}
pub async fn copy_colormap_and_free<Conn>(conn: &Conn, mid: Colormap, src_cmap: Colormap) -> Result<VoidCookie<'_, Conn>, ConnectionError>
where
Conn: RequestConnection + ?Sized,
{
let request0 = CopyColormapAndFreeRequest {
mid,
src_cmap,
};
let (bytes, fds) = request0.serialize();
let slices = [IoSlice::new(&bytes[0])];
assert_eq!(slices.len(), bytes.len());
conn.send_request_without_reply(&slices, fds).await
}
pub async fn install_colormap<Conn>(conn: &Conn, cmap: Colormap) -> Result<VoidCookie<'_, Conn>, ConnectionError>
where
Conn: RequestConnection + ?Sized,
{
let request0 = InstallColormapRequest {
cmap,
};
let (bytes, fds) = request0.serialize();
let slices = [IoSlice::new(&bytes[0])];
assert_eq!(slices.len(), bytes.len());
conn.send_request_without_reply(&slices, fds).await
}
pub async fn uninstall_colormap<Conn>(conn: &Conn, cmap: Colormap) -> Result<VoidCookie<'_, Conn>, ConnectionError>
where
Conn: RequestConnection + ?Sized,
{
let request0 = UninstallColormapRequest {
cmap,
};
let (bytes, fds) = request0.serialize();
let slices = [IoSlice::new(&bytes[0])];
assert_eq!(slices.len(), bytes.len());
conn.send_request_without_reply(&slices, fds).await
}
pub async fn list_installed_colormaps<Conn>(conn: &Conn, window: Window) -> Result<Cookie<'_, Conn, ListInstalledColormapsReply>, ConnectionError>
where
Conn: RequestConnection + ?Sized,
{
let request0 = ListInstalledColormapsRequest {
window,
};
let (bytes, fds) = request0.serialize();
let slices = [IoSlice::new(&bytes[0])];
assert_eq!(slices.len(), bytes.len());
conn.send_request_with_reply(&slices, fds).await
}
pub async fn alloc_color<Conn>(conn: &Conn, cmap: Colormap, red: u16, green: u16, blue: u16) -> Result<Cookie<'_, Conn, AllocColorReply>, ConnectionError>
where
Conn: RequestConnection + ?Sized,
{
let request0 = AllocColorRequest {
cmap,
red,
green,
blue,
};
let (bytes, fds) = request0.serialize();
let slices = [IoSlice::new(&bytes[0])];
assert_eq!(slices.len(), bytes.len());
conn.send_request_with_reply(&slices, fds).await
}
pub async fn alloc_named_color<'c, 'input, Conn>(conn: &'c Conn, cmap: Colormap, name: &'input [u8]) -> Result<Cookie<'c, Conn, AllocNamedColorReply>, ConnectionError>
where
Conn: RequestConnection + ?Sized,
{
let request0 = AllocNamedColorRequest {
cmap,
name: Cow::Borrowed(name),
};
let (bytes, fds) = request0.serialize();
let slices = [IoSlice::new(&bytes[0]), IoSlice::new(&bytes[1]), IoSlice::new(&bytes[2])];
assert_eq!(slices.len(), bytes.len());
conn.send_request_with_reply(&slices, fds).await
}
pub async fn alloc_color_cells<Conn>(conn: &Conn, contiguous: bool, cmap: Colormap, colors: u16, planes: u16) -> Result<Cookie<'_, Conn, AllocColorCellsReply>, ConnectionError>
where
Conn: RequestConnection + ?Sized,
{
let request0 = AllocColorCellsRequest {
contiguous,
cmap,
colors,
planes,
};
let (bytes, fds) = request0.serialize();
let slices = [IoSlice::new(&bytes[0])];
assert_eq!(slices.len(), bytes.len());
conn.send_request_with_reply(&slices, fds).await
}
pub async fn alloc_color_planes<Conn>(conn: &Conn, contiguous: bool, cmap: Colormap, colors: u16, reds: u16, greens: u16, blues: u16) -> Result<Cookie<'_, Conn, AllocColorPlanesReply>, ConnectionError>
where
Conn: RequestConnection + ?Sized,
{
let request0 = AllocColorPlanesRequest {
contiguous,
cmap,
colors,
reds,
greens,
blues,
};
let (bytes, fds) = request0.serialize();
let slices = [IoSlice::new(&bytes[0])];
assert_eq!(slices.len(), bytes.len());
conn.send_request_with_reply(&slices, fds).await
}
pub async fn free_colors<'c, 'input, Conn>(conn: &'c Conn, cmap: Colormap, plane_mask: u32, pixels: &'input [u32]) -> Result<VoidCookie<'c, Conn>, ConnectionError>
where
Conn: RequestConnection + ?Sized,
{
let request0 = FreeColorsRequest {
cmap,
plane_mask,
pixels: Cow::Borrowed(pixels),
};
let (bytes, fds) = request0.serialize();
let slices = [IoSlice::new(&bytes[0]), IoSlice::new(&bytes[1]), IoSlice::new(&bytes[2])];
assert_eq!(slices.len(), bytes.len());
conn.send_request_without_reply(&slices, fds).await
}
pub async fn store_colors<'c, 'input, Conn>(conn: &'c Conn, cmap: Colormap, items: &'input [Coloritem]) -> Result<VoidCookie<'c, Conn>, ConnectionError>
where
Conn: RequestConnection + ?Sized,
{
let request0 = StoreColorsRequest {
cmap,
items: Cow::Borrowed(items),
};
let (bytes, fds) = request0.serialize();
let slices = [IoSlice::new(&bytes[0]), IoSlice::new(&bytes[1]), IoSlice::new(&bytes[2])];
assert_eq!(slices.len(), bytes.len());
conn.send_request_without_reply(&slices, fds).await
}
pub async fn store_named_color<'c, 'input, Conn>(conn: &'c Conn, flags: ColorFlag, cmap: Colormap, pixel: u32, name: &'input [u8]) -> Result<VoidCookie<'c, Conn>, ConnectionError>
where
Conn: RequestConnection + ?Sized,
{
let request0 = StoreNamedColorRequest {
flags,
cmap,
pixel,
name: Cow::Borrowed(name),
};
let (bytes, fds) = request0.serialize();
let slices = [IoSlice::new(&bytes[0]), IoSlice::new(&bytes[1]), IoSlice::new(&bytes[2])];
assert_eq!(slices.len(), bytes.len());
conn.send_request_without_reply(&slices, fds).await
}
pub async fn query_colors<'c, 'input, Conn>(conn: &'c Conn, cmap: Colormap, pixels: &'input [u32]) -> Result<Cookie<'c, Conn, QueryColorsReply>, ConnectionError>
where
Conn: RequestConnection + ?Sized,
{
let request0 = QueryColorsRequest {
cmap,
pixels: Cow::Borrowed(pixels),
};
let (bytes, fds) = request0.serialize();
let slices = [IoSlice::new(&bytes[0]), IoSlice::new(&bytes[1]), IoSlice::new(&bytes[2])];
assert_eq!(slices.len(), bytes.len());
conn.send_request_with_reply(&slices, fds).await
}
pub async fn lookup_color<'c, 'input, Conn>(conn: &'c Conn, cmap: Colormap, name: &'input [u8]) -> Result<Cookie<'c, Conn, LookupColorReply>, ConnectionError>
where
Conn: RequestConnection + ?Sized,
{
let request0 = LookupColorRequest {
cmap,
name: Cow::Borrowed(name),
};
let (bytes, fds) = request0.serialize();
let slices = [IoSlice::new(&bytes[0]), IoSlice::new(&bytes[1]), IoSlice::new(&bytes[2])];
assert_eq!(slices.len(), bytes.len());
conn.send_request_with_reply(&slices, fds).await
}
pub async fn create_cursor<Conn, A>(conn: &Conn, cid: Cursor, source: Pixmap, mask: A, fore_red: u16, fore_green: u16, fore_blue: u16, back_red: u16, back_green: u16, back_blue: u16, x: u16, y: u16) -> Result<VoidCookie<'_, Conn>, ConnectionError>
where
Conn: RequestConnection + ?Sized,
A: Into<Pixmap> + Send,
{
let mask: Pixmap = mask.into();
let request0 = CreateCursorRequest {
cid,
source,
mask,
fore_red,
fore_green,
fore_blue,
back_red,
back_green,
back_blue,
x,
y,
};
let (bytes, fds) = request0.serialize();
let slices = [IoSlice::new(&bytes[0])];
assert_eq!(slices.len(), bytes.len());
conn.send_request_without_reply(&slices, fds).await
}
pub async fn create_glyph_cursor<Conn, A>(conn: &Conn, cid: Cursor, source_font: Font, mask_font: A, source_char: u16, mask_char: u16, fore_red: u16, fore_green: u16, fore_blue: u16, back_red: u16, back_green: u16, back_blue: u16) -> Result<VoidCookie<'_, Conn>, ConnectionError>
where
Conn: RequestConnection + ?Sized,
A: Into<Font> + Send,
{
let mask_font: Font = mask_font.into();
let request0 = CreateGlyphCursorRequest {
cid,
source_font,
mask_font,
source_char,
mask_char,
fore_red,
fore_green,
fore_blue,
back_red,
back_green,
back_blue,
};
let (bytes, fds) = request0.serialize();
let slices = [IoSlice::new(&bytes[0])];
assert_eq!(slices.len(), bytes.len());
conn.send_request_without_reply(&slices, fds).await
}
pub async fn free_cursor<Conn>(conn: &Conn, cursor: Cursor) -> Result<VoidCookie<'_, Conn>, ConnectionError>
where
Conn: RequestConnection + ?Sized,
{
let request0 = FreeCursorRequest {
cursor,
};
let (bytes, fds) = request0.serialize();
let slices = [IoSlice::new(&bytes[0])];
assert_eq!(slices.len(), bytes.len());
conn.send_request_without_reply(&slices, fds).await
}
pub async fn recolor_cursor<Conn>(conn: &Conn, cursor: Cursor, fore_red: u16, fore_green: u16, fore_blue: u16, back_red: u16, back_green: u16, back_blue: u16) -> Result<VoidCookie<'_, Conn>, ConnectionError>
where
Conn: RequestConnection + ?Sized,
{
let request0 = RecolorCursorRequest {
cursor,
fore_red,
fore_green,
fore_blue,
back_red,
back_green,
back_blue,
};
let (bytes, fds) = request0.serialize();
let slices = [IoSlice::new(&bytes[0])];
assert_eq!(slices.len(), bytes.len());
conn.send_request_without_reply(&slices, fds).await
}
pub async fn query_best_size<Conn>(conn: &Conn, class: QueryShapeOf, drawable: Drawable, width: u16, height: u16) -> Result<Cookie<'_, Conn, QueryBestSizeReply>, ConnectionError>
where
Conn: RequestConnection + ?Sized,
{
let request0 = QueryBestSizeRequest {
class,
drawable,
width,
height,
};
let (bytes, fds) = request0.serialize();
let slices = [IoSlice::new(&bytes[0])];
assert_eq!(slices.len(), bytes.len());
conn.send_request_with_reply(&slices, fds).await
}
pub async fn query_extension<'c, 'input, Conn>(conn: &'c Conn, name: &'input [u8]) -> Result<Cookie<'c, Conn, QueryExtensionReply>, ConnectionError>
where
Conn: RequestConnection + ?Sized,
{
let request0 = QueryExtensionRequest {
name: Cow::Borrowed(name),
};
let (bytes, fds) = request0.serialize();
let slices = [IoSlice::new(&bytes[0]), IoSlice::new(&bytes[1]), IoSlice::new(&bytes[2])];
assert_eq!(slices.len(), bytes.len());
conn.send_request_with_reply(&slices, fds).await
}
pub async fn list_extensions<Conn>(conn: &Conn) -> Result<Cookie<'_, Conn, ListExtensionsReply>, ConnectionError>
where
Conn: RequestConnection + ?Sized,
{
let request0 = ListExtensionsRequest;
let (bytes, fds) = request0.serialize();
let slices = [IoSlice::new(&bytes[0])];
assert_eq!(slices.len(), bytes.len());
conn.send_request_with_reply(&slices, fds).await
}
pub async fn change_keyboard_mapping<'c, 'input, Conn>(conn: &'c Conn, keycode_count: u8, first_keycode: Keycode, keysyms_per_keycode: u8, keysyms: &'input [Keysym]) -> Result<VoidCookie<'c, Conn>, ConnectionError>
where
Conn: RequestConnection + ?Sized,
{
let request0 = ChangeKeyboardMappingRequest {
keycode_count,
first_keycode,
keysyms_per_keycode,
keysyms: Cow::Borrowed(keysyms),
};
let (bytes, fds) = request0.serialize();
let slices = [IoSlice::new(&bytes[0]), IoSlice::new(&bytes[1]), IoSlice::new(&bytes[2])];
assert_eq!(slices.len(), bytes.len());
conn.send_request_without_reply(&slices, fds).await
}
pub async fn get_keyboard_mapping<Conn>(conn: &Conn, first_keycode: Keycode, count: u8) -> Result<Cookie<'_, Conn, GetKeyboardMappingReply>, ConnectionError>
where
Conn: RequestConnection + ?Sized,
{
let request0 = GetKeyboardMappingRequest {
first_keycode,
count,
};
let (bytes, fds) = request0.serialize();
let slices = [IoSlice::new(&bytes[0])];
assert_eq!(slices.len(), bytes.len());
conn.send_request_with_reply(&slices, fds).await
}
pub async fn change_keyboard_control<'c, 'input, Conn>(conn: &'c Conn, value_list: &'input ChangeKeyboardControlAux) -> Result<VoidCookie<'c, Conn>, ConnectionError>
where
Conn: RequestConnection + ?Sized,
{
let request0 = ChangeKeyboardControlRequest {
value_list: Cow::Borrowed(value_list),
};
let (bytes, fds) = request0.serialize();
let slices = [IoSlice::new(&bytes[0]), IoSlice::new(&bytes[1]), IoSlice::new(&bytes[2])];
assert_eq!(slices.len(), bytes.len());
conn.send_request_without_reply(&slices, fds).await
}
pub async fn get_keyboard_control<Conn>(conn: &Conn) -> Result<Cookie<'_, Conn, GetKeyboardControlReply>, ConnectionError>
where
Conn: RequestConnection + ?Sized,
{
let request0 = GetKeyboardControlRequest;
let (bytes, fds) = request0.serialize();
let slices = [IoSlice::new(&bytes[0])];
assert_eq!(slices.len(), bytes.len());
conn.send_request_with_reply(&slices, fds).await
}
pub async fn bell<Conn>(conn: &Conn, percent: i8) -> Result<VoidCookie<'_, Conn>, ConnectionError>
where
Conn: RequestConnection + ?Sized,
{
let request0 = BellRequest {
percent,
};
let (bytes, fds) = request0.serialize();
let slices = [IoSlice::new(&bytes[0])];
assert_eq!(slices.len(), bytes.len());
conn.send_request_without_reply(&slices, fds).await
}
pub async fn change_pointer_control<Conn>(conn: &Conn, acceleration_numerator: i16, acceleration_denominator: i16, threshold: i16, do_acceleration: bool, do_threshold: bool) -> Result<VoidCookie<'_, Conn>, ConnectionError>
where
Conn: RequestConnection + ?Sized,
{
let request0 = ChangePointerControlRequest {
acceleration_numerator,
acceleration_denominator,
threshold,
do_acceleration,
do_threshold,
};
let (bytes, fds) = request0.serialize();
let slices = [IoSlice::new(&bytes[0])];
assert_eq!(slices.len(), bytes.len());
conn.send_request_without_reply(&slices, fds).await
}
pub async fn get_pointer_control<Conn>(conn: &Conn) -> Result<Cookie<'_, Conn, GetPointerControlReply>, ConnectionError>
where
Conn: RequestConnection + ?Sized,
{
let request0 = GetPointerControlRequest;
let (bytes, fds) = request0.serialize();
let slices = [IoSlice::new(&bytes[0])];
assert_eq!(slices.len(), bytes.len());
conn.send_request_with_reply(&slices, fds).await
}
pub async fn set_screen_saver<Conn>(conn: &Conn, timeout: i16, interval: i16, prefer_blanking: Blanking, allow_exposures: Exposures) -> Result<VoidCookie<'_, Conn>, ConnectionError>
where
Conn: RequestConnection + ?Sized,
{
let request0 = SetScreenSaverRequest {
timeout,
interval,
prefer_blanking,
allow_exposures,
};
let (bytes, fds) = request0.serialize();
let slices = [IoSlice::new(&bytes[0])];
assert_eq!(slices.len(), bytes.len());
conn.send_request_without_reply(&slices, fds).await
}
pub async fn get_screen_saver<Conn>(conn: &Conn) -> Result<Cookie<'_, Conn, GetScreenSaverReply>, ConnectionError>
where
Conn: RequestConnection + ?Sized,
{
let request0 = GetScreenSaverRequest;
let (bytes, fds) = request0.serialize();
let slices = [IoSlice::new(&bytes[0])];
assert_eq!(slices.len(), bytes.len());
conn.send_request_with_reply(&slices, fds).await
}
pub async fn change_hosts<'c, 'input, Conn>(conn: &'c Conn, mode: HostMode, family: Family, address: &'input [u8]) -> Result<VoidCookie<'c, Conn>, ConnectionError>
where
Conn: RequestConnection + ?Sized,
{
let request0 = ChangeHostsRequest {
mode,
family,
address: Cow::Borrowed(address),
};
let (bytes, fds) = request0.serialize();
let slices = [IoSlice::new(&bytes[0]), IoSlice::new(&bytes[1]), IoSlice::new(&bytes[2])];
assert_eq!(slices.len(), bytes.len());
conn.send_request_without_reply(&slices, fds).await
}
pub async fn list_hosts<Conn>(conn: &Conn) -> Result<Cookie<'_, Conn, ListHostsReply>, ConnectionError>
where
Conn: RequestConnection + ?Sized,
{
let request0 = ListHostsRequest;
let (bytes, fds) = request0.serialize();
let slices = [IoSlice::new(&bytes[0])];
assert_eq!(slices.len(), bytes.len());
conn.send_request_with_reply(&slices, fds).await
}
pub async fn set_access_control<Conn>(conn: &Conn, mode: AccessControl) -> Result<VoidCookie<'_, Conn>, ConnectionError>
where
Conn: RequestConnection + ?Sized,
{
let request0 = SetAccessControlRequest {
mode,
};
let (bytes, fds) = request0.serialize();
let slices = [IoSlice::new(&bytes[0])];
assert_eq!(slices.len(), bytes.len());
conn.send_request_without_reply(&slices, fds).await
}
pub async fn set_close_down_mode<Conn>(conn: &Conn, mode: CloseDown) -> Result<VoidCookie<'_, Conn>, ConnectionError>
where
Conn: RequestConnection + ?Sized,
{
let request0 = SetCloseDownModeRequest {
mode,
};
let (bytes, fds) = request0.serialize();
let slices = [IoSlice::new(&bytes[0])];
assert_eq!(slices.len(), bytes.len());
conn.send_request_without_reply(&slices, fds).await
}
pub async fn kill_client<Conn, A>(conn: &Conn, resource: A) -> Result<VoidCookie<'_, Conn>, ConnectionError>
where
Conn: RequestConnection + ?Sized,
A: Into<u32> + Send,
{
let resource: u32 = resource.into();
let request0 = KillClientRequest {
resource,
};
let (bytes, fds) = request0.serialize();
let slices = [IoSlice::new(&bytes[0])];
assert_eq!(slices.len(), bytes.len());
conn.send_request_without_reply(&slices, fds).await
}
pub async fn rotate_properties<'c, 'input, Conn>(conn: &'c Conn, window: Window, delta: i16, atoms: &'input [Atom]) -> Result<VoidCookie<'c, Conn>, ConnectionError>
where
Conn: RequestConnection + ?Sized,
{
let request0 = RotatePropertiesRequest {
window,
delta,
atoms: Cow::Borrowed(atoms),
};
let (bytes, fds) = request0.serialize();
let slices = [IoSlice::new(&bytes[0]), IoSlice::new(&bytes[1]), IoSlice::new(&bytes[2])];
assert_eq!(slices.len(), bytes.len());
conn.send_request_without_reply(&slices, fds).await
}
pub async fn force_screen_saver<Conn>(conn: &Conn, mode: ScreenSaver) -> Result<VoidCookie<'_, Conn>, ConnectionError>
where
Conn: RequestConnection + ?Sized,
{
let request0 = ForceScreenSaverRequest {
mode,
};
let (bytes, fds) = request0.serialize();
let slices = [IoSlice::new(&bytes[0])];
assert_eq!(slices.len(), bytes.len());
conn.send_request_without_reply(&slices, fds).await
}
pub async fn set_pointer_mapping<'c, 'input, Conn>(conn: &'c Conn, map: &'input [u8]) -> Result<Cookie<'c, Conn, SetPointerMappingReply>, ConnectionError>
where
Conn: RequestConnection + ?Sized,
{
let request0 = SetPointerMappingRequest {
map: Cow::Borrowed(map),
};
let (bytes, fds) = request0.serialize();
let slices = [IoSlice::new(&bytes[0]), IoSlice::new(&bytes[1]), IoSlice::new(&bytes[2])];
assert_eq!(slices.len(), bytes.len());
conn.send_request_with_reply(&slices, fds).await
}
pub async fn get_pointer_mapping<Conn>(conn: &Conn) -> Result<Cookie<'_, Conn, GetPointerMappingReply>, ConnectionError>
where
Conn: RequestConnection + ?Sized,
{
let request0 = GetPointerMappingRequest;
let (bytes, fds) = request0.serialize();
let slices = [IoSlice::new(&bytes[0])];
assert_eq!(slices.len(), bytes.len());
conn.send_request_with_reply(&slices, fds).await
}
pub async fn set_modifier_mapping<'c, 'input, Conn>(conn: &'c Conn, keycodes: &'input [Keycode]) -> Result<Cookie<'c, Conn, SetModifierMappingReply>, ConnectionError>
where
Conn: RequestConnection + ?Sized,
{
let request0 = SetModifierMappingRequest {
keycodes: Cow::Borrowed(keycodes),
};
let (bytes, fds) = request0.serialize();
let slices = [IoSlice::new(&bytes[0]), IoSlice::new(&bytes[1]), IoSlice::new(&bytes[2])];
assert_eq!(slices.len(), bytes.len());
conn.send_request_with_reply(&slices, fds).await
}
pub async fn get_modifier_mapping<Conn>(conn: &Conn) -> Result<Cookie<'_, Conn, GetModifierMappingReply>, ConnectionError>
where
Conn: RequestConnection + ?Sized,
{
let request0 = GetModifierMappingRequest;
let (bytes, fds) = request0.serialize();
let slices = [IoSlice::new(&bytes[0])];
assert_eq!(slices.len(), bytes.len());
conn.send_request_with_reply(&slices, fds).await
}
pub async fn no_operation<Conn>(conn: &Conn) -> Result<VoidCookie<'_, Conn>, ConnectionError>
where
Conn: RequestConnection + ?Sized,
{
let request0 = NoOperationRequest;
let (bytes, fds) = request0.serialize();
let slices = [IoSlice::new(&bytes[0])];
assert_eq!(slices.len(), bytes.len());
conn.send_request_without_reply(&slices, fds).await
}
pub trait ConnectionExt: RequestConnection {
fn create_window<'c, 'input, 'future>(&'c self, depth: u8, wid: Window, parent: Window, x: i16, y: i16, width: u16, height: u16, border_width: u16, class: WindowClass, visual: Visualid, value_list: &'input CreateWindowAux) -> Pin<Box<dyn Future<Output = Result<VoidCookie<'c, Self>, ConnectionError>> + Send + 'future>>
where
'c: 'future,
'input: 'future,
{
Box::pin(create_window(self, depth, wid, parent, x, y, width, height, border_width, class, visual, value_list))
}
fn change_window_attributes<'c, 'input, 'future>(&'c self, window: Window, value_list: &'input ChangeWindowAttributesAux) -> Pin<Box<dyn Future<Output = Result<VoidCookie<'c, Self>, ConnectionError>> + Send + 'future>>
where
'c: 'future,
'input: 'future,
{
Box::pin(change_window_attributes(self, window, value_list))
}
fn get_window_attributes(&self, window: Window) -> Pin<Box<dyn Future<Output = Result<Cookie<'_, Self, GetWindowAttributesReply>, ConnectionError>> + Send + '_>>
{
Box::pin(get_window_attributes(self, window))
}
fn destroy_window(&self, window: Window) -> Pin<Box<dyn Future<Output = Result<VoidCookie<'_, Self>, ConnectionError>> + Send + '_>>
{
Box::pin(destroy_window(self, window))
}
fn destroy_subwindows(&self, window: Window) -> Pin<Box<dyn Future<Output = Result<VoidCookie<'_, Self>, ConnectionError>> + Send + '_>>
{
Box::pin(destroy_subwindows(self, window))
}
fn change_save_set(&self, mode: SetMode, window: Window) -> Pin<Box<dyn Future<Output = Result<VoidCookie<'_, Self>, ConnectionError>> + Send + '_>>
{
Box::pin(change_save_set(self, mode, window))
}
fn reparent_window(&self, window: Window, parent: Window, x: i16, y: i16) -> Pin<Box<dyn Future<Output = Result<VoidCookie<'_, Self>, ConnectionError>> + Send + '_>>
{
Box::pin(reparent_window(self, window, parent, x, y))
}
fn map_window(&self, window: Window) -> Pin<Box<dyn Future<Output = Result<VoidCookie<'_, Self>, ConnectionError>> + Send + '_>>
{
Box::pin(map_window(self, window))
}
fn map_subwindows(&self, window: Window) -> Pin<Box<dyn Future<Output = Result<VoidCookie<'_, Self>, ConnectionError>> + Send + '_>>
{
Box::pin(map_subwindows(self, window))
}
fn unmap_window(&self, window: Window) -> Pin<Box<dyn Future<Output = Result<VoidCookie<'_, Self>, ConnectionError>> + Send + '_>>
{
Box::pin(unmap_window(self, window))
}
fn unmap_subwindows(&self, window: Window) -> Pin<Box<dyn Future<Output = Result<VoidCookie<'_, Self>, ConnectionError>> + Send + '_>>
{
Box::pin(unmap_subwindows(self, window))
}
fn configure_window<'c, 'input, 'future>(&'c self, window: Window, value_list: &'input ConfigureWindowAux) -> Pin<Box<dyn Future<Output = Result<VoidCookie<'c, Self>, ConnectionError>> + Send + 'future>>
where
'c: 'future,
'input: 'future,
{
Box::pin(configure_window(self, window, value_list))
}
fn circulate_window(&self, direction: Circulate, window: Window) -> Pin<Box<dyn Future<Output = Result<VoidCookie<'_, Self>, ConnectionError>> + Send + '_>>
{
Box::pin(circulate_window(self, direction, window))
}
fn get_geometry(&self, drawable: Drawable) -> Pin<Box<dyn Future<Output = Result<Cookie<'_, Self, GetGeometryReply>, ConnectionError>> + Send + '_>>
{
Box::pin(get_geometry(self, drawable))
}
fn query_tree(&self, window: Window) -> Pin<Box<dyn Future<Output = Result<Cookie<'_, Self, QueryTreeReply>, ConnectionError>> + Send + '_>>
{
Box::pin(query_tree(self, window))
}
fn intern_atom<'c, 'input, 'future>(&'c self, only_if_exists: bool, name: &'input [u8]) -> Pin<Box<dyn Future<Output = Result<Cookie<'c, Self, InternAtomReply>, ConnectionError>> + Send + 'future>>
where
'c: 'future,
'input: 'future,
{
Box::pin(intern_atom(self, only_if_exists, name))
}
fn get_atom_name(&self, atom: Atom) -> Pin<Box<dyn Future<Output = Result<Cookie<'_, Self, GetAtomNameReply>, ConnectionError>> + Send + '_>>
{
Box::pin(get_atom_name(self, atom))
}
fn change_property<'c, 'input, 'future, A, B>(&'c self, mode: PropMode, window: Window, property: A, type_: B, format: u8, data_len: u32, data: &'input [u8]) -> Pin<Box<dyn Future<Output = Result<VoidCookie<'c, Self>, ConnectionError>> + Send + 'future>>
where
A: Into<Atom> + Send + 'static,
B: Into<Atom> + Send + 'static,
'c: 'future,
'input: 'future,
{
Box::pin(change_property(self, mode, window, property, type_, format, data_len, data))
}
fn delete_property(&self, window: Window, property: Atom) -> Pin<Box<dyn Future<Output = Result<VoidCookie<'_, Self>, ConnectionError>> + Send + '_>>
{
Box::pin(delete_property(self, window, property))
}
fn get_property<A, B>(&self, delete: bool, window: Window, property: A, type_: B, long_offset: u32, long_length: u32) -> Pin<Box<dyn Future<Output = Result<Cookie<'_, Self, GetPropertyReply>, ConnectionError>> + Send + '_>>
where
A: Into<Atom> + Send + 'static,
B: Into<Atom> + Send + 'static,
{
Box::pin(get_property(self, delete, window, property, type_, long_offset, long_length))
}
fn list_properties(&self, window: Window) -> Pin<Box<dyn Future<Output = Result<Cookie<'_, Self, ListPropertiesReply>, ConnectionError>> + Send + '_>>
{
Box::pin(list_properties(self, window))
}
fn set_selection_owner<A, B>(&self, owner: A, selection: Atom, time: B) -> Pin<Box<dyn Future<Output = Result<VoidCookie<'_, Self>, ConnectionError>> + Send + '_>>
where
A: Into<Window> + Send + 'static,
B: Into<Timestamp> + Send + 'static,
{
Box::pin(set_selection_owner(self, owner, selection, time))
}
fn get_selection_owner(&self, selection: Atom) -> Pin<Box<dyn Future<Output = Result<Cookie<'_, Self, GetSelectionOwnerReply>, ConnectionError>> + Send + '_>>
{
Box::pin(get_selection_owner(self, selection))
}
fn convert_selection<A, B>(&self, requestor: Window, selection: Atom, target: Atom, property: A, time: B) -> Pin<Box<dyn Future<Output = Result<VoidCookie<'_, Self>, ConnectionError>> + Send + '_>>
where
A: Into<Atom> + Send + 'static,
B: Into<Timestamp> + Send + 'static,
{
Box::pin(convert_selection(self, requestor, selection, target, property, time))
}
fn send_event<A, B>(&self, propagate: bool, destination: A, event_mask: EventMask, event: B) -> Pin<Box<dyn Future<Output = Result<VoidCookie<'_, Self>, ConnectionError>> + Send + '_>>
where
A: Into<Window> + Send + 'static,
B: Into<[u8; 32]> + Send + 'static,
{
Box::pin(send_event(self, propagate, destination, event_mask, event))
}
fn grab_pointer<A, B, C>(&self, owner_events: bool, grab_window: Window, event_mask: EventMask, pointer_mode: GrabMode, keyboard_mode: GrabMode, confine_to: A, cursor: B, time: C) -> Pin<Box<dyn Future<Output = Result<Cookie<'_, Self, GrabPointerReply>, ConnectionError>> + Send + '_>>
where
A: Into<Window> + Send + 'static,
B: Into<Cursor> + Send + 'static,
C: Into<Timestamp> + Send + 'static,
{
Box::pin(grab_pointer(self, owner_events, grab_window, event_mask, pointer_mode, keyboard_mode, confine_to, cursor, time))
}
fn ungrab_pointer<A>(&self, time: A) -> Pin<Box<dyn Future<Output = Result<VoidCookie<'_, Self>, ConnectionError>> + Send + '_>>
where
A: Into<Timestamp> + Send + 'static,
{
Box::pin(ungrab_pointer(self, time))
}
fn grab_button<A, B>(&self, owner_events: bool, grab_window: Window, event_mask: EventMask, pointer_mode: GrabMode, keyboard_mode: GrabMode, confine_to: A, cursor: B, button: ButtonIndex, modifiers: ModMask) -> Pin<Box<dyn Future<Output = Result<VoidCookie<'_, Self>, ConnectionError>> + Send + '_>>
where
A: Into<Window> + Send + 'static,
B: Into<Cursor> + Send + 'static,
{
Box::pin(grab_button(self, owner_events, grab_window, event_mask, pointer_mode, keyboard_mode, confine_to, cursor, button, modifiers))
}
fn ungrab_button(&self, button: ButtonIndex, grab_window: Window, modifiers: ModMask) -> Pin<Box<dyn Future<Output = Result<VoidCookie<'_, Self>, ConnectionError>> + Send + '_>>
{
Box::pin(ungrab_button(self, button, grab_window, modifiers))
}
fn change_active_pointer_grab<A, B>(&self, cursor: A, time: B, event_mask: EventMask) -> Pin<Box<dyn Future<Output = Result<VoidCookie<'_, Self>, ConnectionError>> + Send + '_>>
where
A: Into<Cursor> + Send + 'static,
B: Into<Timestamp> + Send + 'static,
{
Box::pin(change_active_pointer_grab(self, cursor, time, event_mask))
}
fn grab_keyboard<A>(&self, owner_events: bool, grab_window: Window, time: A, pointer_mode: GrabMode, keyboard_mode: GrabMode) -> Pin<Box<dyn Future<Output = Result<Cookie<'_, Self, GrabKeyboardReply>, ConnectionError>> + Send + '_>>
where
A: Into<Timestamp> + Send + 'static,
{
Box::pin(grab_keyboard(self, owner_events, grab_window, time, pointer_mode, keyboard_mode))
}
fn ungrab_keyboard<A>(&self, time: A) -> Pin<Box<dyn Future<Output = Result<VoidCookie<'_, Self>, ConnectionError>> + Send + '_>>
where
A: Into<Timestamp> + Send + 'static,
{
Box::pin(ungrab_keyboard(self, time))
}
fn grab_key<A>(&self, owner_events: bool, grab_window: Window, modifiers: ModMask, key: A, pointer_mode: GrabMode, keyboard_mode: GrabMode) -> Pin<Box<dyn Future<Output = Result<VoidCookie<'_, Self>, ConnectionError>> + Send + '_>>
where
A: Into<Keycode> + Send + 'static,
{
Box::pin(grab_key(self, owner_events, grab_window, modifiers, key, pointer_mode, keyboard_mode))
}
fn ungrab_key<A>(&self, key: A, grab_window: Window, modifiers: ModMask) -> Pin<Box<dyn Future<Output = Result<VoidCookie<'_, Self>, ConnectionError>> + Send + '_>>
where
A: Into<Keycode> + Send + 'static,
{
Box::pin(ungrab_key(self, key, grab_window, modifiers))
}
fn allow_events<A>(&self, mode: Allow, time: A) -> Pin<Box<dyn Future<Output = Result<VoidCookie<'_, Self>, ConnectionError>> + Send + '_>>
where
A: Into<Timestamp> + Send + 'static,
{
Box::pin(allow_events(self, mode, time))
}
fn grab_server(&self) -> Pin<Box<dyn Future<Output = Result<VoidCookie<'_, Self>, ConnectionError>> + Send + '_>>
{
Box::pin(grab_server(self))
}
fn ungrab_server(&self) -> Pin<Box<dyn Future<Output = Result<VoidCookie<'_, Self>, ConnectionError>> + Send + '_>>
{
Box::pin(ungrab_server(self))
}
fn query_pointer(&self, window: Window) -> Pin<Box<dyn Future<Output = Result<Cookie<'_, Self, QueryPointerReply>, ConnectionError>> + Send + '_>>
{
Box::pin(query_pointer(self, window))
}
fn get_motion_events<A, B>(&self, window: Window, start: A, stop: B) -> Pin<Box<dyn Future<Output = Result<Cookie<'_, Self, GetMotionEventsReply>, ConnectionError>> + Send + '_>>
where
A: Into<Timestamp> + Send + 'static,
B: Into<Timestamp> + Send + 'static,
{
Box::pin(get_motion_events(self, window, start, stop))
}
fn translate_coordinates(&self, src_window: Window, dst_window: Window, src_x: i16, src_y: i16) -> Pin<Box<dyn Future<Output = Result<Cookie<'_, Self, TranslateCoordinatesReply>, ConnectionError>> + Send + '_>>
{
Box::pin(translate_coordinates(self, src_window, dst_window, src_x, src_y))
}
fn warp_pointer<A, B>(&self, src_window: A, dst_window: B, src_x: i16, src_y: i16, src_width: u16, src_height: u16, dst_x: i16, dst_y: i16) -> Pin<Box<dyn Future<Output = Result<VoidCookie<'_, Self>, ConnectionError>> + Send + '_>>
where
A: Into<Window> + Send + 'static,
B: Into<Window> + Send + 'static,
{
Box::pin(warp_pointer(self, src_window, dst_window, src_x, src_y, src_width, src_height, dst_x, dst_y))
}
fn set_input_focus<A, B>(&self, revert_to: InputFocus, focus: A, time: B) -> Pin<Box<dyn Future<Output = Result<VoidCookie<'_, Self>, ConnectionError>> + Send + '_>>
where
A: Into<Window> + Send + 'static,
B: Into<Timestamp> + Send + 'static,
{
Box::pin(set_input_focus(self, revert_to, focus, time))
}
fn get_input_focus(&self) -> Pin<Box<dyn Future<Output = Result<Cookie<'_, Self, GetInputFocusReply>, ConnectionError>> + Send + '_>>
{
Box::pin(get_input_focus(self))
}
fn query_keymap(&self) -> Pin<Box<dyn Future<Output = Result<Cookie<'_, Self, QueryKeymapReply>, ConnectionError>> + Send + '_>>
{
Box::pin(query_keymap(self))
}
fn open_font<'c, 'input, 'future>(&'c self, fid: Font, name: &'input [u8]) -> Pin<Box<dyn Future<Output = Result<VoidCookie<'c, Self>, ConnectionError>> + Send + 'future>>
where
'c: 'future,
'input: 'future,
{
Box::pin(open_font(self, fid, name))
}
fn close_font(&self, font: Font) -> Pin<Box<dyn Future<Output = Result<VoidCookie<'_, Self>, ConnectionError>> + Send + '_>>
{
Box::pin(close_font(self, font))
}
fn query_font(&self, font: Fontable) -> Pin<Box<dyn Future<Output = Result<Cookie<'_, Self, QueryFontReply>, ConnectionError>> + Send + '_>>
{
Box::pin(query_font(self, font))
}
fn query_text_extents<'c, 'input, 'future>(&'c self, font: Fontable, string: &'input [Char2b]) -> Pin<Box<dyn Future<Output = Result<Cookie<'c, Self, QueryTextExtentsReply>, ConnectionError>> + Send + 'future>>
where
'c: 'future,
'input: 'future,
{
Box::pin(query_text_extents(self, font, string))
}
fn list_fonts<'c, 'input, 'future>(&'c self, max_names: u16, pattern: &'input [u8]) -> Pin<Box<dyn Future<Output = Result<Cookie<'c, Self, ListFontsReply>, ConnectionError>> + Send + 'future>>
where
'c: 'future,
'input: 'future,
{
Box::pin(list_fonts(self, max_names, pattern))
}
fn list_fonts_with_info<'c, 'input, 'future>(&'c self, max_names: u16, pattern: &'input [u8]) -> Pin<Box<dyn Future<Output = Result<ListFontsWithInfoCookie<'c, Self>, ConnectionError>> + Send + 'future>>
where
'c: 'future,
'input: 'future,
{
Box::pin(list_fonts_with_info(self, max_names, pattern))
}
fn set_font_path<'c, 'input, 'future>(&'c self, font: &'input [Str]) -> Pin<Box<dyn Future<Output = Result<VoidCookie<'c, Self>, ConnectionError>> + Send + 'future>>
where
'c: 'future,
'input: 'future,
{
Box::pin(set_font_path(self, font))
}
fn get_font_path(&self) -> Pin<Box<dyn Future<Output = Result<Cookie<'_, Self, GetFontPathReply>, ConnectionError>> + Send + '_>>
{
Box::pin(get_font_path(self))
}
fn create_pixmap(&self, depth: u8, pid: Pixmap, drawable: Drawable, width: u16, height: u16) -> Pin<Box<dyn Future<Output = Result<VoidCookie<'_, Self>, ConnectionError>> + Send + '_>>
{
Box::pin(create_pixmap(self, depth, pid, drawable, width, height))
}
fn free_pixmap(&self, pixmap: Pixmap) -> Pin<Box<dyn Future<Output = Result<VoidCookie<'_, Self>, ConnectionError>> + Send + '_>>
{
Box::pin(free_pixmap(self, pixmap))
}
fn create_gc<'c, 'input, 'future>(&'c self, cid: Gcontext, drawable: Drawable, value_list: &'input CreateGCAux) -> Pin<Box<dyn Future<Output = Result<VoidCookie<'c, Self>, ConnectionError>> + Send + 'future>>
where
'c: 'future,
'input: 'future,
{
Box::pin(create_gc(self, cid, drawable, value_list))
}
fn change_gc<'c, 'input, 'future>(&'c self, gc: Gcontext, value_list: &'input ChangeGCAux) -> Pin<Box<dyn Future<Output = Result<VoidCookie<'c, Self>, ConnectionError>> + Send + 'future>>
where
'c: 'future,
'input: 'future,
{
Box::pin(change_gc(self, gc, value_list))
}
fn copy_gc(&self, src_gc: Gcontext, dst_gc: Gcontext, value_mask: GC) -> Pin<Box<dyn Future<Output = Result<VoidCookie<'_, Self>, ConnectionError>> + Send + '_>>
{
Box::pin(copy_gc(self, src_gc, dst_gc, value_mask))
}
fn set_dashes<'c, 'input, 'future>(&'c self, gc: Gcontext, dash_offset: u16, dashes: &'input [u8]) -> Pin<Box<dyn Future<Output = Result<VoidCookie<'c, Self>, ConnectionError>> + Send + 'future>>
where
'c: 'future,
'input: 'future,
{
Box::pin(set_dashes(self, gc, dash_offset, dashes))
}
fn set_clip_rectangles<'c, 'input, 'future>(&'c self, ordering: ClipOrdering, gc: Gcontext, clip_x_origin: i16, clip_y_origin: i16, rectangles: &'input [Rectangle]) -> Pin<Box<dyn Future<Output = Result<VoidCookie<'c, Self>, ConnectionError>> + Send + 'future>>
where
'c: 'future,
'input: 'future,
{
Box::pin(set_clip_rectangles(self, ordering, gc, clip_x_origin, clip_y_origin, rectangles))
}
fn free_gc(&self, gc: Gcontext) -> Pin<Box<dyn Future<Output = Result<VoidCookie<'_, Self>, ConnectionError>> + Send + '_>>
{
Box::pin(free_gc(self, gc))
}
fn clear_area(&self, exposures: bool, window: Window, x: i16, y: i16, width: u16, height: u16) -> Pin<Box<dyn Future<Output = Result<VoidCookie<'_, Self>, ConnectionError>> + Send + '_>>
{
Box::pin(clear_area(self, exposures, window, x, y, width, height))
}
fn copy_area(&self, src_drawable: Drawable, dst_drawable: Drawable, gc: Gcontext, src_x: i16, src_y: i16, dst_x: i16, dst_y: i16, width: u16, height: u16) -> Pin<Box<dyn Future<Output = Result<VoidCookie<'_, Self>, ConnectionError>> + Send + '_>>
{
Box::pin(copy_area(self, src_drawable, dst_drawable, gc, src_x, src_y, dst_x, dst_y, width, height))
}
fn copy_plane(&self, src_drawable: Drawable, dst_drawable: Drawable, gc: Gcontext, src_x: i16, src_y: i16, dst_x: i16, dst_y: i16, width: u16, height: u16, bit_plane: u32) -> Pin<Box<dyn Future<Output = Result<VoidCookie<'_, Self>, ConnectionError>> + Send + '_>>
{
Box::pin(copy_plane(self, src_drawable, dst_drawable, gc, src_x, src_y, dst_x, dst_y, width, height, bit_plane))
}
fn poly_point<'c, 'input, 'future>(&'c self, coordinate_mode: CoordMode, drawable: Drawable, gc: Gcontext, points: &'input [Point]) -> Pin<Box<dyn Future<Output = Result<VoidCookie<'c, Self>, ConnectionError>> + Send + 'future>>
where
'c: 'future,
'input: 'future,
{
Box::pin(poly_point(self, coordinate_mode, drawable, gc, points))
}
fn poly_line<'c, 'input, 'future>(&'c self, coordinate_mode: CoordMode, drawable: Drawable, gc: Gcontext, points: &'input [Point]) -> Pin<Box<dyn Future<Output = Result<VoidCookie<'c, Self>, ConnectionError>> + Send + 'future>>
where
'c: 'future,
'input: 'future,
{
Box::pin(poly_line(self, coordinate_mode, drawable, gc, points))
}
fn poly_segment<'c, 'input, 'future>(&'c self, drawable: Drawable, gc: Gcontext, segments: &'input [Segment]) -> Pin<Box<dyn Future<Output = Result<VoidCookie<'c, Self>, ConnectionError>> + Send + 'future>>
where
'c: 'future,
'input: 'future,
{
Box::pin(poly_segment(self, drawable, gc, segments))
}
fn poly_rectangle<'c, 'input, 'future>(&'c self, drawable: Drawable, gc: Gcontext, rectangles: &'input [Rectangle]) -> Pin<Box<dyn Future<Output = Result<VoidCookie<'c, Self>, ConnectionError>> + Send + 'future>>
where
'c: 'future,
'input: 'future,
{
Box::pin(poly_rectangle(self, drawable, gc, rectangles))
}
fn poly_arc<'c, 'input, 'future>(&'c self, drawable: Drawable, gc: Gcontext, arcs: &'input [Arc]) -> Pin<Box<dyn Future<Output = Result<VoidCookie<'c, Self>, ConnectionError>> + Send + 'future>>
where
'c: 'future,
'input: 'future,
{
Box::pin(poly_arc(self, drawable, gc, arcs))
}
fn fill_poly<'c, 'input, 'future>(&'c self, drawable: Drawable, gc: Gcontext, shape: PolyShape, coordinate_mode: CoordMode, points: &'input [Point]) -> Pin<Box<dyn Future<Output = Result<VoidCookie<'c, Self>, ConnectionError>> + Send + 'future>>
where
'c: 'future,
'input: 'future,
{
Box::pin(fill_poly(self, drawable, gc, shape, coordinate_mode, points))
}
fn poly_fill_rectangle<'c, 'input, 'future>(&'c self, drawable: Drawable, gc: Gcontext, rectangles: &'input [Rectangle]) -> Pin<Box<dyn Future<Output = Result<VoidCookie<'c, Self>, ConnectionError>> + Send + 'future>>
where
'c: 'future,
'input: 'future,
{
Box::pin(poly_fill_rectangle(self, drawable, gc, rectangles))
}
fn poly_fill_arc<'c, 'input, 'future>(&'c self, drawable: Drawable, gc: Gcontext, arcs: &'input [Arc]) -> Pin<Box<dyn Future<Output = Result<VoidCookie<'c, Self>, ConnectionError>> + Send + 'future>>
where
'c: 'future,
'input: 'future,
{
Box::pin(poly_fill_arc(self, drawable, gc, arcs))
}
fn put_image<'c, 'input, 'future>(&'c self, format: ImageFormat, drawable: Drawable, gc: Gcontext, width: u16, height: u16, dst_x: i16, dst_y: i16, left_pad: u8, depth: u8, data: &'input [u8]) -> Pin<Box<dyn Future<Output = Result<VoidCookie<'c, Self>, ConnectionError>> + Send + 'future>>
where
'c: 'future,
'input: 'future,
{
Box::pin(put_image(self, format, drawable, gc, width, height, dst_x, dst_y, left_pad, depth, data))
}
fn get_image(&self, format: ImageFormat, drawable: Drawable, x: i16, y: i16, width: u16, height: u16, plane_mask: u32) -> Pin<Box<dyn Future<Output = Result<Cookie<'_, Self, GetImageReply>, ConnectionError>> + Send + '_>>
{
Box::pin(get_image(self, format, drawable, x, y, width, height, plane_mask))
}
fn poly_text8<'c, 'input, 'future>(&'c self, drawable: Drawable, gc: Gcontext, x: i16, y: i16, items: &'input [u8]) -> Pin<Box<dyn Future<Output = Result<VoidCookie<'c, Self>, ConnectionError>> + Send + 'future>>
where
'c: 'future,
'input: 'future,
{
Box::pin(poly_text8(self, drawable, gc, x, y, items))
}
fn poly_text16<'c, 'input, 'future>(&'c self, drawable: Drawable, gc: Gcontext, x: i16, y: i16, items: &'input [u8]) -> Pin<Box<dyn Future<Output = Result<VoidCookie<'c, Self>, ConnectionError>> + Send + 'future>>
where
'c: 'future,
'input: 'future,
{
Box::pin(poly_text16(self, drawable, gc, x, y, items))
}
fn image_text8<'c, 'input, 'future>(&'c self, drawable: Drawable, gc: Gcontext, x: i16, y: i16, string: &'input [u8]) -> Pin<Box<dyn Future<Output = Result<VoidCookie<'c, Self>, ConnectionError>> + Send + 'future>>
where
'c: 'future,
'input: 'future,
{
Box::pin(image_text8(self, drawable, gc, x, y, string))
}
fn image_text16<'c, 'input, 'future>(&'c self, drawable: Drawable, gc: Gcontext, x: i16, y: i16, string: &'input [Char2b]) -> Pin<Box<dyn Future<Output = Result<VoidCookie<'c, Self>, ConnectionError>> + Send + 'future>>
where
'c: 'future,
'input: 'future,
{
Box::pin(image_text16(self, drawable, gc, x, y, string))
}
fn create_colormap(&self, alloc: ColormapAlloc, mid: Colormap, window: Window, visual: Visualid) -> Pin<Box<dyn Future<Output = Result<VoidCookie<'_, Self>, ConnectionError>> + Send + '_>>
{
Box::pin(create_colormap(self, alloc, mid, window, visual))
}
fn free_colormap(&self, cmap: Colormap) -> Pin<Box<dyn Future<Output = Result<VoidCookie<'_, Self>, ConnectionError>> + Send + '_>>
{
Box::pin(free_colormap(self, cmap))
}
fn copy_colormap_and_free(&self, mid: Colormap, src_cmap: Colormap) -> Pin<Box<dyn Future<Output = Result<VoidCookie<'_, Self>, ConnectionError>> + Send + '_>>
{
Box::pin(copy_colormap_and_free(self, mid, src_cmap))
}
fn install_colormap(&self, cmap: Colormap) -> Pin<Box<dyn Future<Output = Result<VoidCookie<'_, Self>, ConnectionError>> + Send + '_>>
{
Box::pin(install_colormap(self, cmap))
}
fn uninstall_colormap(&self, cmap: Colormap) -> Pin<Box<dyn Future<Output = Result<VoidCookie<'_, Self>, ConnectionError>> + Send + '_>>
{
Box::pin(uninstall_colormap(self, cmap))
}
fn list_installed_colormaps(&self, window: Window) -> Pin<Box<dyn Future<Output = Result<Cookie<'_, Self, ListInstalledColormapsReply>, ConnectionError>> + Send + '_>>
{
Box::pin(list_installed_colormaps(self, window))
}
fn alloc_color(&self, cmap: Colormap, red: u16, green: u16, blue: u16) -> Pin<Box<dyn Future<Output = Result<Cookie<'_, Self, AllocColorReply>, ConnectionError>> + Send + '_>>
{
Box::pin(alloc_color(self, cmap, red, green, blue))
}
fn alloc_named_color<'c, 'input, 'future>(&'c self, cmap: Colormap, name: &'input [u8]) -> Pin<Box<dyn Future<Output = Result<Cookie<'c, Self, AllocNamedColorReply>, ConnectionError>> + Send + 'future>>
where
'c: 'future,
'input: 'future,
{
Box::pin(alloc_named_color(self, cmap, name))
}
fn alloc_color_cells(&self, contiguous: bool, cmap: Colormap, colors: u16, planes: u16) -> Pin<Box<dyn Future<Output = Result<Cookie<'_, Self, AllocColorCellsReply>, ConnectionError>> + Send + '_>>
{
Box::pin(alloc_color_cells(self, contiguous, cmap, colors, planes))
}
fn alloc_color_planes(&self, contiguous: bool, cmap: Colormap, colors: u16, reds: u16, greens: u16, blues: u16) -> Pin<Box<dyn Future<Output = Result<Cookie<'_, Self, AllocColorPlanesReply>, ConnectionError>> + Send + '_>>
{
Box::pin(alloc_color_planes(self, contiguous, cmap, colors, reds, greens, blues))
}
fn free_colors<'c, 'input, 'future>(&'c self, cmap: Colormap, plane_mask: u32, pixels: &'input [u32]) -> Pin<Box<dyn Future<Output = Result<VoidCookie<'c, Self>, ConnectionError>> + Send + 'future>>
where
'c: 'future,
'input: 'future,
{
Box::pin(free_colors(self, cmap, plane_mask, pixels))
}
fn store_colors<'c, 'input, 'future>(&'c self, cmap: Colormap, items: &'input [Coloritem]) -> Pin<Box<dyn Future<Output = Result<VoidCookie<'c, Self>, ConnectionError>> + Send + 'future>>
where
'c: 'future,
'input: 'future,
{
Box::pin(store_colors(self, cmap, items))
}
fn store_named_color<'c, 'input, 'future>(&'c self, flags: ColorFlag, cmap: Colormap, pixel: u32, name: &'input [u8]) -> Pin<Box<dyn Future<Output = Result<VoidCookie<'c, Self>, ConnectionError>> + Send + 'future>>
where
'c: 'future,
'input: 'future,
{
Box::pin(store_named_color(self, flags, cmap, pixel, name))
}
fn query_colors<'c, 'input, 'future>(&'c self, cmap: Colormap, pixels: &'input [u32]) -> Pin<Box<dyn Future<Output = Result<Cookie<'c, Self, QueryColorsReply>, ConnectionError>> + Send + 'future>>
where
'c: 'future,
'input: 'future,
{
Box::pin(query_colors(self, cmap, pixels))
}
fn lookup_color<'c, 'input, 'future>(&'c self, cmap: Colormap, name: &'input [u8]) -> Pin<Box<dyn Future<Output = Result<Cookie<'c, Self, LookupColorReply>, ConnectionError>> + Send + 'future>>
where
'c: 'future,
'input: 'future,
{
Box::pin(lookup_color(self, cmap, name))
}
fn create_cursor<A>(&self, cid: Cursor, source: Pixmap, mask: A, fore_red: u16, fore_green: u16, fore_blue: u16, back_red: u16, back_green: u16, back_blue: u16, x: u16, y: u16) -> Pin<Box<dyn Future<Output = Result<VoidCookie<'_, Self>, ConnectionError>> + Send + '_>>
where
A: Into<Pixmap> + Send + 'static,
{
Box::pin(create_cursor(self, cid, source, mask, fore_red, fore_green, fore_blue, back_red, back_green, back_blue, x, y))
}
fn create_glyph_cursor<A>(&self, cid: Cursor, source_font: Font, mask_font: A, source_char: u16, mask_char: u16, fore_red: u16, fore_green: u16, fore_blue: u16, back_red: u16, back_green: u16, back_blue: u16) -> Pin<Box<dyn Future<Output = Result<VoidCookie<'_, Self>, ConnectionError>> + Send + '_>>
where
A: Into<Font> + Send + 'static,
{
Box::pin(create_glyph_cursor(self, cid, source_font, mask_font, source_char, mask_char, fore_red, fore_green, fore_blue, back_red, back_green, back_blue))
}
fn free_cursor(&self, cursor: Cursor) -> Pin<Box<dyn Future<Output = Result<VoidCookie<'_, Self>, ConnectionError>> + Send + '_>>
{
Box::pin(free_cursor(self, cursor))
}
fn recolor_cursor(&self, cursor: Cursor, fore_red: u16, fore_green: u16, fore_blue: u16, back_red: u16, back_green: u16, back_blue: u16) -> Pin<Box<dyn Future<Output = Result<VoidCookie<'_, Self>, ConnectionError>> + Send + '_>>
{
Box::pin(recolor_cursor(self, cursor, fore_red, fore_green, fore_blue, back_red, back_green, back_blue))
}
fn query_best_size(&self, class: QueryShapeOf, drawable: Drawable, width: u16, height: u16) -> Pin<Box<dyn Future<Output = Result<Cookie<'_, Self, QueryBestSizeReply>, ConnectionError>> + Send + '_>>
{
Box::pin(query_best_size(self, class, drawable, width, height))
}
fn query_extension<'c, 'input, 'future>(&'c self, name: &'input [u8]) -> Pin<Box<dyn Future<Output = Result<Cookie<'c, Self, QueryExtensionReply>, ConnectionError>> + Send + 'future>>
where
'c: 'future,
'input: 'future,
{
Box::pin(query_extension(self, name))
}
fn list_extensions(&self) -> Pin<Box<dyn Future<Output = Result<Cookie<'_, Self, ListExtensionsReply>, ConnectionError>> + Send + '_>>
{
Box::pin(list_extensions(self))
}
fn change_keyboard_mapping<'c, 'input, 'future>(&'c self, keycode_count: u8, first_keycode: Keycode, keysyms_per_keycode: u8, keysyms: &'input [Keysym]) -> Pin<Box<dyn Future<Output = Result<VoidCookie<'c, Self>, ConnectionError>> + Send + 'future>>
where
'c: 'future,
'input: 'future,
{
Box::pin(change_keyboard_mapping(self, keycode_count, first_keycode, keysyms_per_keycode, keysyms))
}
fn get_keyboard_mapping(&self, first_keycode: Keycode, count: u8) -> Pin<Box<dyn Future<Output = Result<Cookie<'_, Self, GetKeyboardMappingReply>, ConnectionError>> + Send + '_>>
{
Box::pin(get_keyboard_mapping(self, first_keycode, count))
}
fn change_keyboard_control<'c, 'input, 'future>(&'c self, value_list: &'input ChangeKeyboardControlAux) -> Pin<Box<dyn Future<Output = Result<VoidCookie<'c, Self>, ConnectionError>> + Send + 'future>>
where
'c: 'future,
'input: 'future,
{
Box::pin(change_keyboard_control(self, value_list))
}
fn get_keyboard_control(&self) -> Pin<Box<dyn Future<Output = Result<Cookie<'_, Self, GetKeyboardControlReply>, ConnectionError>> + Send + '_>>
{
Box::pin(get_keyboard_control(self))
}
fn bell(&self, percent: i8) -> Pin<Box<dyn Future<Output = Result<VoidCookie<'_, Self>, ConnectionError>> + Send + '_>>
{
Box::pin(bell(self, percent))
}
fn change_pointer_control(&self, acceleration_numerator: i16, acceleration_denominator: i16, threshold: i16, do_acceleration: bool, do_threshold: bool) -> Pin<Box<dyn Future<Output = Result<VoidCookie<'_, Self>, ConnectionError>> + Send + '_>>
{
Box::pin(change_pointer_control(self, acceleration_numerator, acceleration_denominator, threshold, do_acceleration, do_threshold))
}
fn get_pointer_control(&self) -> Pin<Box<dyn Future<Output = Result<Cookie<'_, Self, GetPointerControlReply>, ConnectionError>> + Send + '_>>
{
Box::pin(get_pointer_control(self))
}
fn set_screen_saver(&self, timeout: i16, interval: i16, prefer_blanking: Blanking, allow_exposures: Exposures) -> Pin<Box<dyn Future<Output = Result<VoidCookie<'_, Self>, ConnectionError>> + Send + '_>>
{
Box::pin(set_screen_saver(self, timeout, interval, prefer_blanking, allow_exposures))
}
fn get_screen_saver(&self) -> Pin<Box<dyn Future<Output = Result<Cookie<'_, Self, GetScreenSaverReply>, ConnectionError>> + Send + '_>>
{
Box::pin(get_screen_saver(self))
}
fn change_hosts<'c, 'input, 'future>(&'c self, mode: HostMode, family: Family, address: &'input [u8]) -> Pin<Box<dyn Future<Output = Result<VoidCookie<'c, Self>, ConnectionError>> + Send + 'future>>
where
'c: 'future,
'input: 'future,
{
Box::pin(change_hosts(self, mode, family, address))
}
fn list_hosts(&self) -> Pin<Box<dyn Future<Output = Result<Cookie<'_, Self, ListHostsReply>, ConnectionError>> + Send + '_>>
{
Box::pin(list_hosts(self))
}
fn set_access_control(&self, mode: AccessControl) -> Pin<Box<dyn Future<Output = Result<VoidCookie<'_, Self>, ConnectionError>> + Send + '_>>
{
Box::pin(set_access_control(self, mode))
}
fn set_close_down_mode(&self, mode: CloseDown) -> Pin<Box<dyn Future<Output = Result<VoidCookie<'_, Self>, ConnectionError>> + Send + '_>>
{
Box::pin(set_close_down_mode(self, mode))
}
fn kill_client<A>(&self, resource: A) -> Pin<Box<dyn Future<Output = Result<VoidCookie<'_, Self>, ConnectionError>> + Send + '_>>
where
A: Into<u32> + Send + 'static,
{
Box::pin(kill_client(self, resource))
}
fn rotate_properties<'c, 'input, 'future>(&'c self, window: Window, delta: i16, atoms: &'input [Atom]) -> Pin<Box<dyn Future<Output = Result<VoidCookie<'c, Self>, ConnectionError>> + Send + 'future>>
where
'c: 'future,
'input: 'future,
{
Box::pin(rotate_properties(self, window, delta, atoms))
}
fn force_screen_saver(&self, mode: ScreenSaver) -> Pin<Box<dyn Future<Output = Result<VoidCookie<'_, Self>, ConnectionError>> + Send + '_>>
{
Box::pin(force_screen_saver(self, mode))
}
fn set_pointer_mapping<'c, 'input, 'future>(&'c self, map: &'input [u8]) -> Pin<Box<dyn Future<Output = Result<Cookie<'c, Self, SetPointerMappingReply>, ConnectionError>> + Send + 'future>>
where
'c: 'future,
'input: 'future,
{
Box::pin(set_pointer_mapping(self, map))
}
fn get_pointer_mapping(&self) -> Pin<Box<dyn Future<Output = Result<Cookie<'_, Self, GetPointerMappingReply>, ConnectionError>> + Send + '_>>
{
Box::pin(get_pointer_mapping(self))
}
fn set_modifier_mapping<'c, 'input, 'future>(&'c self, keycodes: &'input [Keycode]) -> Pin<Box<dyn Future<Output = Result<Cookie<'c, Self, SetModifierMappingReply>, ConnectionError>> + Send + 'future>>
where
'c: 'future,
'input: 'future,
{
Box::pin(set_modifier_mapping(self, keycodes))
}
fn get_modifier_mapping(&self) -> Pin<Box<dyn Future<Output = Result<Cookie<'_, Self, GetModifierMappingReply>, ConnectionError>> + Send + '_>>
{
Box::pin(get_modifier_mapping(self))
}
fn no_operation(&self) -> Pin<Box<dyn Future<Output = Result<VoidCookie<'_, Self>, ConnectionError>> + Send + '_>>
{
Box::pin(no_operation(self))
}
}
impl<C: RequestConnection + ?Sized> ConnectionExt for C {}