Struct x11rb::protocol::xproto::QueryTreeRequest
source · pub struct QueryTreeRequest {
pub window: u32,
}
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: u32
Implementations§
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 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
impl Copy 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
source§impl<T> CloneToUninit for Twhere
T: Copy,
impl<T> CloneToUninit for Twhere
T: Copy,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)