site_archiver@lists.apple.com Delivered-To: darwin-dev@lists.apple.com
From CGEventSource.h:
CG_EXTERN CFTimeInterval CGEventSourceSecondsSinceLastEventType( CGEventSourceStateID stateID, CGEventType eventType) CG_AVAILABLE_STARTING(__MAC_10_4, __IPHONE_NA); The value returned is the number of idle seconds. Unfortunately, there's no event sent, so you have to poll or roll your own event mechanism. This is more work, but can be done with a CG event tap. p.s. While the above API states 10.4, there was a bug in 10.4 that could cause system hangs if this is called, so 10.5 is really the min sys ver. On May 19, 2010, at 4:50 PM, Arnab Ganguly wrote:
How do I detect user idle in Mac OS X.Is it possible to get such event ? Thanks, -A
_______________________________________________ Do not post admin requests to the list. They will be ignored. Darwin-dev mailing list (Darwin-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/darwin-dev/site_archiver%40lists.appl... This email sent to site_archiver@lists.apple.com