Re: Responding To Screen Saver/Sleep Events
Re: Responding To Screen Saver/Sleep Events
- Subject: Re: Responding To Screen Saver/Sleep Events
- From: Gregory Weston <email@hidden>
- Date: Wed, 23 Jan 2008 15:13:53 -0500
Uli Kusterer wrote:
On 23.01.2008, at 16:13, Chris Schmitt wrote:
I would like my application to do something if the screen savor has
started or the computer is going to sleep. Does anyone know where I
can find an example, information on how to do this, or maybe just
the API I need to look at?
To detect the screensaver, you could simply use Unix APIs to get the
list of running processes, and look for an app called
"ScreenSaverEngine". If that's there, the screen saver is running.
But it doesn't reliably imply that the user isn't working at their
machine. While not widely publicized, ScreenSaverEngine has a switch
to run on the desktop and out of the N 3rd-party utilities I'm aware
of that let a user run a screen saver as wallpaper, N-1 of them use
ScreenSaverEngine with that switch for the heavy lifting.
G
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden