Mailing Lists: Apple Mailing Lists
Image of Mac OS face in stamp
Re: Tracking Mouse Location/State in OS X?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Tracking Mouse Location/State in OS X?




On Oct 26, 2006, at 4:55 PM, Brad Johanson wrote:


We are working on an application that needs to track the location of the mouse (and button state) even when it is not the active application. Is anybody aware of any Carbon API calls that would allow us to do this? Or, if this is something you can't do with Carbon, is there some other way we could hook into OS X to do this?

Yes, you can use the GetEventMonitorTarget API to do this. Install event handlers for kEventMouseMoved, kEventMouseDragged, kEventMouseUp, and kEventMouseDown on this target, and you'll receive these events when your application isn't active.


-eric

_______________________________________________
Do not post admin requests to the list. They will be ignored.
Carbon-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


References: 
 >Tracking Mouse Location/State in OS X? (From: Brad Johanson <email@hidden>)



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

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2011 Apple Inc. All rights reserved.