Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Drawing feedback for mouse operations




On Jun 11, 2006, at 3:28 PM, Rick Mann wrote:

I've been looking at the MouseTracking sample code. It uses TrackMouseLocation in the mouse-down handler, which is what I thought I wanted to avoid. But TrackMouseLocation seems to allow events to be handled, and so the draw event handler gets called, and stuff gets drawn. I wonder if i could get key event handlers called the same way?

TrackMouseLocation calls the runloop, and in a composited window, invalid areas will be redrawn during a call to the runloop. Otherwise, though, TrackMouseLocation only handles a specific set of events. In particular, key events are dequeued and then thrown away.


You could, however, write your own version of TrackMouseLocation easily enough; it's basically just a loop that calls ReceiveNextEvent to get mouse and key events, and translates the event into the appropriate MouseTracking result code. Then you could handle key events however you wanted.

-eric

_______________________________________________
Do not post admin requests to the list. They will be ignored.
Carbon-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/carbon-dev/email@hidden

This email sent to email@hidden
References: 
 >Re: Drawing feedback for mouse operations (From: Mike Kluev <email@hidden>)
 >Re: Drawing feedback for mouse operations (From: Jerry <email@hidden>)
 >Re: Drawing feedback for mouse operations (From: Rick Mann <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.