Re: [pygtk] How to get cursor/mouse-pointer image (pixbuf) for an application window.

2010-03-01 Thread Osmo Maatta
Re-hello. I wasn't aware of the ctypes module at all. It really works well and I solved this problem by using ctypes to access functions in libXfixes.so. The final code is here: http://www.futuredesktop.com/tmp/read_cursor_image.py # Running it on Linux. # Sleep a while so you have time to po

Re: [pygtk] How to get cursor/mouse-pointer image (pixbuf) for an application window.

2010-02-28 Thread Wojciech Muła
Osmo Maatta wrote: > I've done it in c-code earlier and it works well. > The c-code is here: > http://code.google.com/p/gscreendump/source/browse/trunk/src/sd_xutils.c Standard python module ctypes allows to call any function from a shared library. Try to load xlib and call these XFixes-functio

[pygtk] How to get cursor/mouse-pointer image (pixbuf) for an application window.

2010-02-28 Thread Osmo Maatta
Hello, I would like to get cursor/mouse-pointer image for an application window in Linux. I have studied several libraries that support Python, but haven't found a suitable function to read Cursor or Pointer image. PyGTK : http://www.pygtk.org/docs/pygtk/index.html No success. Wnck python l