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
sourceimpl QueryTreeRequest
impl QueryTreeRequest
sourcepub fn serialize(self) -> BufWithFds<PiecewiseBuf<'static>>
pub fn serialize(self) -> BufWithFds<PiecewiseBuf<'static>>
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
sourceimpl Clone for QueryTreeRequest
impl Clone for QueryTreeRequest
sourcefn clone(&self) -> QueryTreeRequest
fn clone(&self) -> QueryTreeRequest
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl Debug for QueryTreeRequest
impl Debug for QueryTreeRequest
sourceimpl Default for QueryTreeRequest
impl Default for QueryTreeRequest
sourcefn default() -> QueryTreeRequest
fn default() -> QueryTreeRequest
Returns the “default value” for a type. Read more
sourceimpl Hash for QueryTreeRequest
impl Hash for QueryTreeRequest
sourceimpl Ord for QueryTreeRequest
impl Ord for QueryTreeRequest
sourceimpl PartialEq<QueryTreeRequest> for QueryTreeRequest
impl PartialEq<QueryTreeRequest> for QueryTreeRequest
sourcefn 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 ==
. Read more
sourcefn ne(&self, other: &QueryTreeRequest) -> bool
fn ne(&self, other: &QueryTreeRequest) -> bool
This method tests for !=
.
sourceimpl PartialOrd<QueryTreeRequest> for QueryTreeRequest
impl PartialOrd<QueryTreeRequest> for QueryTreeRequest
sourcefn partial_cmp(&self, other: &QueryTreeRequest) -> Option<Ordering>
fn partial_cmp(&self, other: &QueryTreeRequest) -> Option<Ordering>
This method returns an ordering between self
and other
values if one exists. Read more
1.0.0 · sourcefn lt(&self, other: &Rhs) -> bool
fn lt(&self, other: &Rhs) -> bool
This method tests less than (for self
and other
) and is used by the <
operator. Read more
1.0.0 · sourcefn 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 more
sourceimpl ReplyRequest for QueryTreeRequest
impl ReplyRequest for QueryTreeRequest
type Reply = QueryTreeReply
type Reply = QueryTreeReply
The kind of reply that this request generates.
sourceimpl Request for QueryTreeRequest
impl Request for QueryTreeRequest
impl Copy for QueryTreeRequest
impl Eq for QueryTreeRequest
impl StructuralEq for QueryTreeRequest
impl StructuralPartialEq for QueryTreeRequest
Auto Trait Implementations
impl RefUnwindSafe for QueryTreeRequest
impl Send for QueryTreeRequest
impl Sync for QueryTreeRequest
impl Unpin for QueryTreeRequest
impl UnwindSafe for QueryTreeRequest
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more