Manual Pages for Linux CentOS command on man xcb_grab_pointer_reply
MyWebUniversity

Manual Pages for Linux CentOS command on man xcb_grab_pointer_reply

xcbgrabpointer(3) XCB Requests xcbgrabpointer(3)

NAME

xcbgrabpointer - Grab the pointer SYNOPSIS

#include Request function xcbgrabpointercookiet xcbgrabpointer(xcbconnectiont *conn, uint8t ownerevents, xcbwindowt grabwindow, uint16t eventmask, uint8t pointermode, uint8t keyboardmode, xcbwindowt confineto, xcbcursort cursor, xcbtimestampt time); Reply datastructure typedef struct xcbgrabpointerreplyt { uint8t responsetype; uint8t status; uint16t sequence; uint32t length; } xcbgrabpointerreplyt; Reply function xcbgrabpointerreplyt *xcbgrabpointerreply(xcbconnectiont *conn, xcbgrabpointercookiet cookie, xcbgenericerrort **e); REQUEST ARGUMENTS conn The XCB connection to X11. ownerevents If 1, the grabwindow will still get the pointer events. If 0, events are not reported to the grabwindow. grabwindow Specifies the window on which the pointer should be grabbed. eventmask Specifies which pointer events are reported to the client. TODO: which values? pointermode One of the following values: XCBGRABMODESYNC The state of the keyboard appears to freeze: No further keyboard events are generated by the server until the grabbing client issues a releasing Allow‐ Events request or until the keyboard grab is re‐ leased. XCBGRABMODEASYNC Keyboard event processing continues normally. keyboardmode One of the following values: XCBGRABMODESYNC The state of the keyboard appears to freeze: No further keyboard events are generated by the server until the grabbing client issues a releasing Allow‐ Events request or until the keyboard grab is re‐ leased. XCBGRABMODEASYNC Keyboard event processing continues normally. confineto Specifies the window to confine the pointer in (the user will not be able to move the pointer out of that window). The special value XCBNONE means don't confine the pointer. cursor Specifies the cursor that should be displayed or XCBNONE to not change the cursor. time The time argument allows you to avoid certain circumstances that come up if applications take a long time to respond or if there are long network delays. Consider a situation where you have two applications, both of which normally grab the pointer when clicked on. If both applications specify the timestamp from the event, the second application may wake up faster and successfully grab the pointer before the first ap‐ plication. The first application then will get an indication that the other application grabbed the pointer before its re‐ quest was processed. The special value XCBCURRENTTIME will be replaced with the current server time. REPLY FIELDS responsetype The type of this reply, in this case XCBGRABPOINTER. 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). status One of the following values: XCBGRABSTATUSSUCCESS TODO: NOT YET DOCUMENTED. XCBGRABSTATUSALREADYGRABBED TODO: NOT YET DOCUMENTED. XCBGRABSTATUSINVALIDTIME TODO: NOT YET DOCUMENTED. XCBGRABSTATUSNOTVIEWABLE TODO: NOT YET DOCUMENTED. XCBGRABSTATUSFROZEN TODO: NOT YET DOCUMENTED. TODO: NOT YET DOCUMENTED. DESCRIPTION Actively grabs control of the pointer. Further pointer events are re‐ ported only to the grabbing client. Overrides any active pointer grab by this client. RETURN VALUE Returns an xcbgrabpointercookiet. Errors have to be handled when calling the reply function xcbgrabpointerreply. If you want to handle errors in the event loop instead, use

xcbgrabpointerunchecked. See xcb-requests(3) for details. ERRORS xcbvalueerrort TODO: reasons? xcbwindowerrort The specified window does not exist. EXAMPLE /* * Grabs the pointer actively * */ void myexample(xcbconnectiont *conn, xcbscreent *screen, xcbcursort cursor) { xcbgrabpointercookiet cookie; xcbgrabpointerreplyt *reply; cookie = xcbgrabpointer( conn, false, /* get all pointer events specified by the following mask */

screen->root, /* grab the root window */ XCBNONE, /* which events to let through */ XCBGRABMODEASYNC, /* pointer events should continue as normal */ XCBGRABMODEASYNC, /* keyboard mode */ XCBNONE, /* confineto = in which window should the cursor stay */ cursor, /* we change the cursor to whatever the user wanted */ XCBCURRENTTIME ); if ((reply = xcbgrabpointerreply(conn, cookie, NULL))) {

if (reply->status == XCBGRABSTATUSSUCCESS) printf("successfully grabbed the pointer\n"); free(preply); } } SEE ALSO

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




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