Accessing PenTablet coordinates from PyGTK

Tomeu Vizoso tomeu at tomeuvizoso.net
Fri Feb 29 12:38:28 EST 2008


On Fri, Feb 29, 2008 at 6:08 PM, Patrick Dubroy <pdubroy at gmail.com> wrote:
> I'm trying to get access to the PenTablet from within a PyGTK
>  application. Since the PenTablet isn't working in the current system,
>  I had to modify xorg.conf to use the evdev driver (as in this example:
>  http://dev.laptop.org/attachment/ticket/2198/new-xorg.conf).
>
>  Doing this, I can get the PenTablet to work in relative mode to
>  control the core pointer. But what I really want to do is to access
>  the absolute position data from the PenTablet, to be able to draw in a
>  GTK widget independent of the core pointer.
>
>  I've tried setting SendCoreEvents to false, and then creating a GTK
>  widget and registering for extension events. This allows to receive
>  motion events from the PenTablet, but the x and y values in the event
>  object are "inf" and "nan". Anybody know why this would be? Any
>  suggestions?
>
>  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

Tomeu



More information about the Devel mailing list