Accessing PenTablet coordinates from PyGTK
Tomeu Vizoso
tomeu at tomeuvizoso.net
Mon Mar 10 05:30:32 EDT 2008
On Sun, Mar 9, 2008 at 8:18 PM, Patrick Dubroy <pdubroy at gmail.com> wrote:
> On Fri, Feb 29, 2008 at 1:38 PM, Tomeu Vizoso <tomeu at tomeuvizoso.net> wrote:
> >
> > On Fri, Feb 29, 2008 at 6:08 PM, Patrick Dubroy <pdubroy at gmail.com> wrote:
>
> > > Apparently there used to be a method gdk.Window.input_get_pointer that
> > > would allow you to query the location of the pointer for XInput
> > > devices. However, this method appears to be gone in the current
> > > version of GTK. Has it moved somewhere?
> >
> > I see it here in line 608:
> >
> > http://svn.gnome.org/viewvc/pygtk/trunk/gtk/gtk-types.c
>
> You're right, I see it there. But:
>
> python -c 'import gtk; print hasattr(gtk.gdk.Window, "input_get_pointer")'
>
> returns False. And
>
> strings /usr/lib/python2.5/site-packages/gtk-2.0/gtk/_gtk.so | grep
> input_get_pointer
>
> doesn't find it either.
Looks like that code got #ifdef'ed out 6 years ago :/
http://svn.gnome.org/viewvc/pygtk/trunk/gtk/gtk-types.c?revision=573&view=markup
I would ask in the pygtk mailing list and then probably open a ticket for pygtk.
In the meantime, perhaps your best bet is to use ctypes to call Xlib directly.
Tomeu
More information about the Devel
mailing list