XQueryPointer(3X) XQueryPointer(3X)NAME XQueryPointer - gets pointer coordinates SYNOPSIS Bool XQueryPointer (display, w, root-return, child-return, root-x-return, root-y-return, win-x-return, win-y-return, mask-return) Display *display; Window w; Window *root-return,*child-return; int *root-x-return,*root-y-return; int *win-x-return,*win-y-return; unsigned int *mask-return; DESCRIPTION The XQueryPointer function returns the root window on which the pointer logically resides. It also returns the pointer coordinates relative to the root window's origin. If XQueryPointer returns FALSE, the pointer is not on the same screen as the specified window, and XQueryPointer returns None in child-return and 0 in win-x-return and win-y-return. If XQueryPointer returns TRUE, the pointer coordinates re- turned in win-x-return and win-y-return are relative to the origin of the specified window. In this case, XQueryPointer returns the child that contains the pointer, if any, or else None in child-return. XQueryPointer returns the current logical state of the key- board buttons and the modifier keys in mask-return. It sets mask-return to the bitwise inclusive OR of one or more of the button or modifier key bitmasks to match the current state of the mouse buttons and the modifier keys. Arguments This function accepts the following arguments: child-return Returns any child window ID in which the pointer is located. display Specifies the connection to the X server. mask-return Returns the current state of the modifier keys and pointer buttons. root-return Returns the root window ID for the specified window. root-x-return, root-y-return Return the pointer coordinates relative to the root window's origin. November, 1990 1
XQueryPointer(3X) XQueryPointer(3X)w Specifies the window ID. win-x-return, win-y-return Return the pointer coordinates relative to the specified window. ERRORS BadWindow A value for a Window argument does not name a de- fined window. SEE ALSO XGetWindowAttributes(3X), XQueryTree(3X)Xlib - C Language Interface2 November, 1990