[Xcb] Predefined atoms

Rémi Denis-Courmont remi at remlab.net
Thu Oct 29 12:23:28 PDT 2009


Le jeudi 29 octobre 2009 21:18:59 Peter Harris, vous avez écrit :
> Rémi Denis-Courmont wrote:
> > 	Hello,
> >
> > I have been porting VLC media player to XCB for the last few months. Most
> > things are now in place. Nevertheless, I was wondering what the
> > recommended way to get "hard-coded" atom values is?
> >
> > Currently, I'm using <X11/Xatom.h>. Unfortunately, this depends on the
> > Atom type, which is part of Xlib (which I manually typedef to xcb_atom_t
> > instead). Also, this requires the non-XCB x11-proto development package.
> > This seems rather ugly to me. Is there a "better" method?
> 
> <xcb/xcb_atom.h> from the xcb/util package (sometimes split up by
> distributions - in package libxcb-atom1-dev on Debian, for example) is
> the equivalent for XCB. You will also need to link to libxcb-atom.

To me, adding another library just to obtain protocol constants sounds worse. 
I don't really care about X12 forward compatibility ;)

-- 
Rémi Denis-Courmont
http://www.remlab.net/


More information about the Xcb mailing list