Manual Pages for Linux CentOS command on man xcb_grab_keyboard
MyWebUniversity

Manual Pages for Linux CentOS command on man xcb_grab_keyboard

xcbgrabkeyboard(3) XCB Requests xcbgrabkeyboard(3)

NAME

xcbgrabkeyboard - Grab the keyboard SYNOPSIS

#include Request function xcbgrabkeyboardcookiet xcbgrabkeyboard(xcbconnectiont *conn, uint8t ownerevents, xcbwindowt grabwindow, xcbtimestampt time, uint8t pointermode, uint8t keyboardmode); Reply datastructure typedef struct xcbgrabkeyboardreplyt { uint8t responsetype; uint8t status; uint16t sequence; uint32t length; } xcbgrabkeyboardreplyt; Reply function xcbgrabkeyboardreplyt *xcbgrabkeyboardreply(xcbconnectiont *conn, xcbgrabkeyboardcookiet 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. time Timestamp to avoid race conditions when running X over the network. The special value XCBCURRENTTIME will be replaced with the current server time. 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. REPLY FIELDS responsetype The type of this reply, in this case XCBGRABKEYBOARD. 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 keyboard and generates FocusIn and Focu‐ sOut events. Further key events are reported only to the grabbing client. Any active keyboard grab by this client is overridden. If the keyboard is actively grabbed by some other client, AlreadyGrabbed is returned. If grabwindow is not viewable, GrabNotViewable is returned. If the keyboard is frozen by an active grab of another client, GrabFrozen is

returned. If the specified time is earlier than the last-keyboard-grab time or later than the current X server time, GrabInvalidTime is re‐

turned. Otherwise, the last-keyboard-grab time is set to the specified time. RETURN VALUE Returns an xcbgrabkeyboardcookiet. Errors have to be handled when calling the reply function xcbgrabkeyboardreply. If you want to handle errors in the event loop instead, use

xcbgrabkeyboardunchecked. See xcb-requests(3) for details. ERRORS xcbvalueerrort TODO: reasons? xcbwindowerrort The specified window does not exist. EXAMPLE /* * Grabs the keyboard actively * */ void myexample(xcbconnectiont *conn, xcbscreent *screen) { xcbgrabkeyboardcookiet cookie; xcbgrabkeyboardreplyt *reply; cookie = xcbgrabkeyboard( conn, true, /* report events */

screen->root, /* grab the root window */ XCBCURRENTTIME, XCBGRABMODEASYNC, /* process events as normal, do not require sync */ XCBGRABMODEASYNC ); if ((reply = xcbgrabkeyboardreply(conn, cookie, NULL))) {

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

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




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