The XCLATOM function casts an Atom object to an XCBATOM object.

Function Prototype

static inline XCBATOM XCLATOM(Atom src);

Example

#include <X11/xcl.h>
#include <stdlib.h>
#include <assert.h>

int main(int argc, char* argv[])
{
    Atom src, result;
    XCBATOM dest = XCLATOM(src);

    /* To cast back to an `Atom' from an `XCBATOM', just use the XCB
       type's `xid' field. */
    result = dest.xid;
    assert(result == src);

    return EXIT_SUCCESS;
}

See Also