[pygtk] Relative mouse controlled game in gtk
Nathaniel Smith
njs at pobox.com
Wed Oct 31 13:41:47 WST 2007
On Wed, Oct 31, 2007 at 04:37:42PM +1300, Greg Ewing wrote:
> Does anyone have any ideas on how to get the same effect
> using pygtk? As far as I can tell, it doesn't seem to
> expose functionality such as input grabbing and pointer
> warping that would be needed.
Don't know quite what you need, but pygtk does have both grabbing and
pointer warping -- see e.g. gtk.Widget.grab_add, gtk.gdk.pointer_grab,
gtk.gdk.keyboard_grab, gtk.gdk.Display.warp_pointer. (As is not too
uncommon for quirky low-level stuff like this, that last is not
documented in the pygtk manual, but it does exist and presumably works
like the documented C function gdk_display_warp_pointer.)
-- Nathaniel
--
"Of course, the entire effort is to put oneself
Outside the ordinary range
Of what are called statistics."
-- Stephan Spender
More information about the pygtk
mailing list