[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: Wanna catch a motion event



Andreas Sliwka <goff@nef.wh.uni-dortmund.de> writes:
> I guess you mean gdk_window_get_pointer(). 

Yes, sorry.

> But your book does not help me much with that: How should I do this?
> When I got the first motion event (mouse enters window) I call
> gdk_window_get_pointer(). I get some mouse coords. And than? Do I
> have to call gdk_window_get_pointer() every 0.1 second to get a
> constant flow of coords?
> 

Just call it from your motion event handler. See the "scribble"
example in the tutorial.

> I would prefer that my "motion_event" handler would get called
> automatically ... 

Then don't specify POINTER_MOTION_HINT_MASK, just use
POINTER_MOTION_MASK.

But you will get a _lot_ of events and you have to handle them pretty
fast or the user will see backlog.

This is in sect. 10.5.6, Mouse Movement Events, page 206 in my book.

Havoc



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]