[Xcb] Lua binding for XCB
Barton C Massey
bart at cs.pdx.edu
Wed Nov 7 09:53:19 PST 2007
In message <4731ECFF.60501 at hummingbird.com> you wrote:
> As to how it goes, it seems to work surprisingly well given the amount
> of effort I've spent on it so far. I believe I've spent more time on my
> visual-id-matching algorithm than I have spent with XCB, which speaks
> well to the ease-of-use of XCB.
I also have xcb_aux_find_visual_by_id() ready to commit to
util/convenient/xcb_aux.c
> There are a few nits, of course. I seem to recall that GetProperty was
> surprising to implement correctly. XCB does not provide an iterator (or
> a set of iterators), only a byte (well, void *) buffer. But the
> xcb_get_property_value_length function returns a number of units, not
> bytes. Compare and contrast to xcb_get_image_data_length, which appears
> to return the number of bytes, not the number of units (pixels). Or any
> other xcb_*_length function that isn't matched with an iterator.
I think this is a bug (or perhaps several bugs); if you
would please post it to bugs.freedesktop.org, that would be
awesome.
> ChangeProperty is not correctly implemented in luaxcb because I haven't
> gotten around to inverting "op". My current plan is to wait until you
> finish xserver-XCB and borrow that code.
The Python code (if that is what you mean) should be in soon.
> The other minor nit is the lack of type information for
> the CreateWindow, ChangeWindowAttributes, Create/ChangeGC,
> and ConfigureWindow bit masks. This is the only place (so
> far) where I've had to manually set type information (XID
> vs integer).
I'm not quite following. The masks aren't XIDs...
> Right now, I'm optimistic that XCB will make my life much easier when it
> comes to implementing extensions. With one exception: It looks like GLX
> won't be possible to implement with the current XML definition. I need
> to be able to take apart the contents of Render/RenderLarge in order to
> byte swap if necessary. Implementing all the possible GLX/Render
> sub-requests is a huge chore, but at least I'm not the only person who
> would use such a thing. Any xmond, xscope, or similar based on XCB will
> want to be able to take apart the contents of GLX/Render, too.
An enhancement request bug should be filed for this.
> Thanks for XCB!
Thanks for your feedback! Of course, feel free to fix any
of these, as well. :-)
Bart
More information about the Xcb
mailing list