xcb_rust_protocol/
lib.rs

1#![cfg_attr(not(test), no_std)]
2#![allow(
3    clippy::useless_conversion,
4    clippy::identity_op,
5    clippy::unnecessary_cast,
6    clippy::derive_partial_eq_without_eq,
7    clippy::too_many_arguments,
8    clippy::enum_variant_names,
9    unused_variables,
10    unused_mut,
11    unsafe_code
12)]
13
14/// Some types has variable lengths that need to go on the head
15extern crate alloc;
16
17#[cfg(feature = "xproto")]
18pub use con::XcbConnection;
19#[cfg(feature = "xproto")]
20pub use helpers::XcbEnv;
21
22pub use crate::error::{Error, Result};
23#[cfg(feature = "xproto")]
24use crate::proto::xproto::{Keysym, Timestamp};
25
26#[cfg(feature = "xproto")]
27pub mod con;
28pub mod connection;
29#[cfg(feature = "xproto")]
30pub mod cookie;
31pub mod error;
32#[cfg(feature = "xproto")]
33pub mod helpers;
34pub mod proto;
35pub mod util;
36
37/// The universal null resource or null atom parameter value for many core X requests
38pub const NONE: u32 = 0;
39
40/// This constant can be used for many parameters in `create_window`
41pub const COPY_FROM_PARENT: u32 = 0;
42
43/// This constant can be used for the depth parameter in `create_window`. It indicates to use the
44/// parent window's depth.
45pub const COPY_DEPTH_FROM_PARENT: u8 = 0;
46
47/// This constant can be used for the class parameter in `create_window`. It indicates to use the
48/// parent window's class.
49pub const COPY_CLASS_FROM_PARENT: u16 = 0;
50
51/// This constant can be used in most request that take a timestamp argument
52#[cfg(feature = "xproto")]
53pub const CURRENT_TIME: Timestamp = 0;
54
55/// This constant can be used to fill unused entries in `Keysym` tables
56#[cfg(feature = "xproto")]
57pub const NO_SYMBOL: Keysym = 0;