Chapter 4: Window Information Functions

4.1 Obtaining Window Information

Xlib provides functions that you can use to obtain information about the window tree, the window's current attributes, the window's current geometry, or the current pointer coordinates. Because they are most frequently used by window managers, these functions all return a status to indicate whether the window still exists.

4.1.1 XQueryTree

To obtain the parent, a list of children, and number of children for a given window, use XQueryTree().

Status XQueryTree(Display *display, Window w, Window *root_return, Window *parent_return, Window **children_return, unsignedint *nchildren_return);

display

Specifies the connection to the X server. you want to obtain

w

Specifies the window (Wi.

root_return

Returns the root wi

猜你喜欢

转载自blog.csdn.net/arv002/article/details/111352610