Struct x11rb_protocol::protocol::xproto::QueryTreeRequest
source · pub struct QueryTreeRequest {
pub window: Window,
}
Expand description
query the window tree.
Gets the root window ID, parent window ID and list of children windows for the
specified window
. The children are listed in bottom-to-top stacking order.
§Fields
window
- Thewindow
to query.
§See
xwininfo
: program
§Example
/*
* Displays the root, parent and children of the specified window.
*
*/
void my_example(xcb_connection_t *conn, xcb_window_t window) {
xcb_query_tree_cookie_t cookie;
xcb_query_tree_reply_t *reply;
cookie = xcb_query_tree(conn, window);
if ((reply = xcb_query_tree_reply(conn, cookie, NULL))) {
printf("root = 0x%08x\\n", reply->root);
printf("parent = 0x%08x\\n", reply->parent);
xcb_window_t *children = xcb_query_tree_children(reply);
for (int i = 0; i < xcb_query_tree_children_length(reply); i++)
printf("child window = 0x%08x\\n", children[i]);
free(reply);
}
}
Fields§
§window: Window
Implementations§
source§impl QueryTreeRequest
impl QueryTreeRequest
sourcepub fn serialize(self) -> BufWithFds<[Cow<'static, [u8]>; 1]>
pub fn serialize(self) -> BufWithFds<[Cow<'static, [u8]>; 1]>
Serialize this request into bytes for the provided connection
sourcepub fn try_parse_request(
header: RequestHeader,
value: &[u8]
) -> Result<Self, ParseError>
pub fn try_parse_request( header: RequestHeader, value: &[u8] ) -> Result<Self, ParseError>
Parse this request given its header, its body, and any fds that go along with it
Trait Implementations§
source§impl Clone for QueryTreeRequest
impl Clone for QueryTreeRequest
source§fn clone(&self) -> QueryTreeRequest
fn clone(&self) -> QueryTreeRequest
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for QueryTreeRequest
impl Debug for QueryTreeRequest
source§impl Default for QueryTreeRequest
impl Default for QueryTreeRequest
source§fn default() -> QueryTreeRequest
fn default() -> QueryTreeRequest
Returns the “default value” for a type. Read more
source§impl<'de> Deserialize<'de> for QueryTreeRequest
impl<'de> Deserialize<'de> for QueryTreeRequest
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
source§impl Hash for QueryTreeRequest
impl Hash for QueryTreeRequest
source§impl Ord for QueryTreeRequest
impl Ord for QueryTreeRequest
source§fn cmp(&self, other: &QueryTreeRequest) -> Ordering
fn cmp(&self, other: &QueryTreeRequest) -> Ordering
1.21.0 · source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
source§impl PartialEq for QueryTreeRequest
impl PartialEq for QueryTreeRequest
source§fn eq(&self, other: &QueryTreeRequest) -> bool
fn eq(&self, other: &QueryTreeRequest) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl PartialOrd for QueryTreeRequest
impl PartialOrd for QueryTreeRequest
source§fn partial_cmp(&self, other: &QueryTreeRequest) -> Option<Ordering>
fn partial_cmp(&self, other: &QueryTreeRequest) -> Option<Ordering>
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self
and other
) and is used by the <=
operator. Read moresource§impl ReplyRequest for QueryTreeRequest
impl ReplyRequest for QueryTreeRequest
§type Reply = QueryTreeReply
type Reply = QueryTreeReply
The kind of reply that this request generates.
source§impl Request for QueryTreeRequest
impl Request for QueryTreeRequest
source§impl Serialize for QueryTreeRequest
impl Serialize for QueryTreeRequest
impl Copy for QueryTreeRequest
impl Eq for QueryTreeRequest
impl StructuralPartialEq for QueryTreeRequest
Auto Trait Implementations§
impl Freeze for QueryTreeRequest
impl RefUnwindSafe for QueryTreeRequest
impl Send for QueryTreeRequest
impl Sync for QueryTreeRequest
impl Unpin for QueryTreeRequest
impl UnwindSafe for QueryTreeRequest
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more