pycairo icon indicating copy to clipboard operation
pycairo copied to clipboard

No bridge between python-xlib and pycairo

Open P403n1x87 opened this issue 7 years ago • 5 comments

According to the documentation, it is currently not possible to create an instance of XlibSurface, which must be returned, e.g., by Gtk.

I was wondering if there is a particular reason why no support has been implemented yet to bridge between pycairo and python-xlib. The latter seems to have (almost) all the classes necessary to create an XlibSurface (perhaps Visual is missing?).

P403n1x87 avatar Mar 14 '18 22:03 P403n1x87

Do you have any specific use case in mind?

lazka avatar Mar 15 '18 11:03 lazka

I would like to be able to create a simple X11 window and use cairo to draw on it. I know I can achieve the same with Gtk at the moment, but then I would have to force everybody who is using e.g. Qt to install Gtk libraries.

P403n1x87 avatar Mar 15 '18 12:03 P403n1x87

I think there is definitely space for something that can create a window and give you back the most appropriate Cairo Surface, exactly where that would live I'm not sure.

stuaxo avatar Jan 27 '19 21:01 stuaxo

I added some XCB hooks in my pure-Python binding for Cairo, and more recently was able to make use of those hooks to create a binding for xcffib. This also uses asyncio to provide the event loop.

ldo avatar Mar 22 '22 08:03 ldo