Manual Pages for Linux CentOS command on man xcb_intern_atom
MyWebUniversity

Manual Pages for Linux CentOS command on man xcb_intern_atom

xcbinternatom(3) XCB Requests xcbinternatom(3)

NAME

xcbinternatom - Get atom identifier by name SYNOPSIS

#include Request function xcbinternatomcookiet xcbinternatom(xcbconnectiont *conn, uint8t onlyifexists, uint16t namelen, const char *name); Reply datastructure typedef struct xcbinternatomreplyt { uint8t responsetype; uint8t pad0; uint16t sequence; uint32t length; xcbatomt atom; } xcbinternatomreplyt; Reply function xcbinternatomreplyt *xcbinternatomreply(xcbconnectiont *conn, xcbinternatomcookiet cookie, xcbgenericerrort **e); REQUEST ARGUMENTS conn The XCB connection to X11. onlyifexists Return a valid atom id only if the atom already exists. namelen The length of the following name. name The name of the atom. REPLY FIELDS responsetype The type of this reply, in this case XCBINTERNATOM. 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). atom TODO: NOT YET DOCUMENTED. DESCRIPTION Retrieves the identifier (xcbatomt TODO) for the atom with the speci‐ fied name. Atoms are used in protocols like EWMH, for example to store window titles (NETWMNAME atom) as property of a window. If onlyifexists is 0, the atom will be created if it does not already exist. If onlyifexists is 1, XCBATOMNONE will be returned if the atom does not yet exist. RETURN VALUE Returns an xcbinternatomcookiet. Errors have to be handled when calling the reply function xcbinternatomreply. If you want to handle errors in the event loop instead, use xcbin‐

ternatomunchecked. See xcb-requests(3) for details. ERRORS xcballocerrort TODO: reasons? xcbvalueerrort A value other than 0 or 1 was specified for onlyifexists. EXAMPLE /* * Resolves the NETWMNAME atom. * */ void myexample(xcbconnectiont *c) { xcbinternatomcookiet cookie; xcbinternatomreplyt *reply; cookie = xcbinternatom(c, 0, strlen("NETWMNAME"), "NETWMNAME"); /* ... do other work here if possible ... */ if ((reply = xcbinternatomreply(c, cookie, NULL))) {

printf("The NETWMNAME atom has ID %u0, reply->atom); free(reply); } } SEE ALSO

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




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