[Xcb] Lua binding for XCB

Peter Harris peter.harris at hummingbird.com
Thu Nov 8 08:00:18 PST 2007

Barton C Massey wrote:
> I'm not understanding why server-side XCB will be helpful
> for the case you describe.  Let us know what you need and
> maybe we have something or can figure something out?

In order to byte swap ChangeProperty, you have to know if the property
consists of a list of CARD8, CARD16, or CARD32. libxcb just punts and
calls the buffer "void *".

If you look in luaxcb, you see that I follow the punting motion and
accept a lua "string" (which is just a byte buffer). I'd be much happier
if I could somehow automatically determine that
<fieldref>format</fieldref> determines the size of the contents, and
accept an array of integers instead. Especially since Lua doesn't have a
good built-in way to pack a list of integers into a string.

I used to think that being able to walk up the <op> chain backwards
would help. I thought I read about this in relation to server side XCB,
but I can't find the reference now.

Once server-side XCB is done I can borrow whichever solution (whether
it's a hard-coded "ChangeProperty/format means integer width" or
something more generic).

Peter Harris

More information about the Xcb mailing list