Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

No bridge between python-xlib and pycairo #107

Open
P403n1x87 opened this issue Mar 14, 2018 · 4 comments
Open

No bridge between python-xlib and pycairo #107

P403n1x87 opened this issue Mar 14, 2018 · 4 comments

Comments

@P403n1x87
Copy link

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?).

@lazka
Copy link
Member

lazka commented Mar 15, 2018

Do you have any specific use case in mind?

@P403n1x87
Copy link
Author

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.

@stuaxo
Copy link
Collaborator

stuaxo commented Jan 27, 2019

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.

@ldo
Copy link

ldo commented Mar 22, 2022

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants