gtk.gdk.devices_list() is available in the CVS version.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.
John
_______________________________________________ pygtk mailing list [EMAIL PROTECTED] http://www.daa.com.au/mailman/listinfo/pygtk Read the PyGTK FAQ: http://www.async.com.br/faq/pygtk/
