OK, I'm getting closer to being able to do this, as I figured out a C program
that does it after poking through gsumi's source. As a test, it sets the
mapping to screen for all of the input devices:
#include <glib.h>
#include <gtk/gtk.h>
int main(int argc, char **argv) {
GList *dev_list, *current;
GdkDevice*info;
GtkWindow *window;
gtk_init(&argc, &argv);
window = (GtkWindow *)gtk_window_new(GTK_WINDOW_TOPLEVEL);
dev_list = gdk_devices_list();
for (current = dev_list; current != NULL;
(GSList *)current = g_slist_next(current))
{
info = (GdkDevice *)current->data;
printf("%s\n", info->name);
gtk_widget_set_events ((GtkWidget *)window, GDK_EXPOSURE_MASK
| GDK_LEAVE_NOTIFY_MASK
| GDK_BUTTON_PRESS_MASK
| GDK_POINTER_MOTION_MASK
| GDK_POINTER_MOTION_HINT_MASK);
gtk_widget_set_extension_events ((GtkWidget *)window,
GDK_EXTENSION_EVENTS_CURSOR);
gdk_device_set_mode(info, GDK_MODE_SCREEN);
}
return 0;
}
All of the calls involved appear to be available in pygtk-1.99.16 except for
gtk.gdk.devices_list. It appears in gdk.defs in the pygtk's source, but for
some reason isn't getting built into the library.
Is this a bug, or something well-known that I'm missing? If it's indeed a bug,
I'll put it into bugzilla.
Thanks!
-lars
>From Christian Reis <[EMAIL PROTECTED]>, Sun, Jun 29, 2003 at 12:23:00PM -0300:
> On Fri, Jun 27, 2003 at 04:42:23PM -0700, Lars Damerow wrote:
> >
> > I've written a pygtk program that accepts pressure data from a stylus XInput
> > device, but it requires that the user manually sets the stylus device to
> > 'screen' on the GTK Input Dialog.
>
> Hmmm. What does setting it to screen do?
>
> Does the stylus work otherwise, i.e., you can manipulate the interface
> normally with it (you need to have AlwaysCore for that)?
>
> > Is there a way that I can enable pressure data programmatically, so that the
> > user never sees the Input dialog?
>
> I'm sure there is, since Gimp does it. Try checking out the source code,
> or asking on a gimp mailing list. If you find out the answer, write us
> so I can add it to the FAQ.
>
> Take care,
> --
> Christian Reis, Senior Engineer, Async Open Source, Brazil.
> http://async.com.br/~kiko/ | [+55 16] 261 2331 | NMFL
___________________________________________________________
lars damerow
button pusher
pixar animation studios
[EMAIL PROTECTED]
"What? I don't speak your crazy moon-language."
_______________________________________________
pygtk mailing list [EMAIL PROTECTED]
http://www.daa.com.au/mailman/listinfo/pygtk
Read the PyGTK FAQ: http://www.async.com.br/faq/pygtk/