[Xcb] QueryTextExtents one-byte and two-bytes wrappers

Uli Schlachter psychon at znc.in
Wed Feb 23 16:04:38 UTC 2022


Hi,

Am 20.02.22 um 21:55 schrieb Andrea Monaco:
[...]
> and another called XQueryTextExtents that takes a
> one-byte string, inserts zero bytes at odd positions and then calls the
> X server.
> 
> But libxcb only provides the direct wrapper, seeing from docs and from
> proto/src/xproto.xml.  Am I correct?

Yup, xcb only provides access to the actual X11 protocol requests. Thus,
it only provides xcb_query_text_extents().

> I happen to need the one-byte version, how can I do?

Well, you take your string, insert zero bytes at odd positions and then
call xcb_query_text_extents().

Of course, you could write a convenience wrapper similar to
XQueryTextExtents().

Cheers,
Uli
-- 
A normal person is just someone you don't know well enough yet.
 - Nettie Wiebe


More information about the Xcb mailing list