Manual Pages for Linux CentOS command on man xcb_query_tree_children
MyWebUniversity

Manual Pages for Linux CentOS command on man xcb_query_tree_children

xcbquerytree(3) XCB Requests xcbquerytree(3)

NAME

xcbquerytree - query the window tree SYNOPSIS

#include Request function xcbquerytreecookiet xcbquerytree(xcbconnectiont *conn, xcbwindowt window); Reply datastructure typedef struct xcbquerytreereplyt { uint8t responsetype; uint8t pad0; uint16t sequence; uint32t length; xcbwindowt root; xcbwindowt parent; uint16t childrenlen; uint8t pad1[14]; } xcbquerytreereplyt; Reply function xcbquerytreereplyt *xcbquerytreereply(xcbconnectiont *conn, xcbquerytreecookiet cookie, xcbgenericerrort **e); Reply accessors xcbwindowt *xcbquerytreechildren(const xcbquerytreerequestt *reply); int xcbquerytreechildrenlength(const xcbquerytreereplyt *reply); xcbgenericiteratort xcbquerytreechildrenend(const xcbquerytreereplyt *reply); REQUEST ARGUMENTS conn The XCB connection to X11. window The window to query. REPLY FIELDS responsetype The type of this reply, in this case XCBQUERYTREE. This field is also present in the xcbgenericreplyt and can be used to tell replies apart from each other. sequence The sequence number of the last request processed by the X11 server. length The length of the reply, in words (a word is 4 bytes). root The root window of window. parent The parent window of window. childrenlen The number of child windows. DESCRIPTION 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. RETURN VALUE Returns an xcbquerytreecookiet. Errors have to be handled when calling the reply function xcbquerytreereply. If you want to handle errors in the event loop instead, use

xcbquerytreeunchecked. See xcb-requests(3) for details. ERRORS This request does never generate any errors. EXAMPLE /* * Displays the root, parent and children of the specified window. * */ void myexample(xcbconnectiont *conn, xcbwindowt window) { xcbquerytreecookiet cookie; xcbquerytreereplyt *reply; cookie = xcbquerytree(conn, window); if ((reply = xcbquerytreereply(conn, cookie, NULL))) {

printf("root = 0x%08x\n", reply->root);

printf("parent = 0x%08x\n", reply->parent); xcbwindowt *children = xcbquerytreechildren(reply); for (int i = 0; i < xcbquerytreechildrenlength(reply); i++)

printf("child window = 0x%08x\n", children[i]); free(reply); } } SEE ALSO

xcb-requests(3), xcb-examples(3), xwininfo(1) AUTHOR Generated from xproto.xml. Contact xcb@lists.freedesktop.org for cor‐ rections and improvements. X Version 11 libxcb 1.13 xcbquerytree(3)




Contact us      |      About us      |      Term of use      |       Copyright © 2000-2019 MyWebUniversity.com ™