[Xcb] Lua binding for XCB
Barton C Massey
bart at cs.pdx.edu
Thu Nov 8 11:37:16 PST 2007
In message <47333292.4010801 at hummingbird.com> you wrote:
> 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).
Oh, that. :-)
If there isn't a bug filed against the protocol description
and against libxcb for this, please file one. We do need to
figure out what to do about this, and as you say if we fix
the protocol description you can do something sensible in
your binding.
Once again, thanks hugely for the help.
Bart
More information about the Xcb
mailing list