[Xcb] xpyb and other Python modules

Julien Danjou julien at danjou.info
Mon Dec 21 06:45:10 PST 2009


xpyb is still not widely used, and is not that useful because it lacks
support from other Python modules.

Challenged accepted: I decided to add XCB support to pycairo.

But there's a big problem. To create an XCB surface, cairo requires:
- a xcb_connection_t
- a xcb_drawable_t
- a xcb_visualtype or a xcb_screen_t

For the 2 first parameters, it's not a real problem since
xcb_connection_t are used by xpyb, and a drawable is just an integer.

But xpyb declares its own Python class for visualtype and screem, so
they are not connected to the libxcb type xcb_visualtype_t and
xcb_screen_t. That means there is currently no way to bind both modules

This is gonna be a real problem for Python modules based upon a library
using libxcb (cairo, evas, etc).

xpyb seems a nice implementation of a native xcb-proto based
lib, but it's totally unusable finally in the Real World.
I don't know what's the status of other language bindings and if they
suffers from the same problem (?).

The only solution I see it writing a lot of code to map a Python
object from a xpyb Python classm to a C struct from libxcb. That seems
unpleasant to write and to maintain.

I'm seeing this situation as a dead end, so any hint would be

Julien Danjou
// ᐰ <julien at danjou.info>   http://julien.danjou.info
// 9A0D 5FD9 EB42 22F6 8974  C95C A462 B51E C2FE E5CD
// Life is life. Lalalalala.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
Url : http://lists.freedesktop.org/archives/xcb/attachments/20091221/ed261cdc/attachment.pgp 

More information about the Xcb mailing list