• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Responding To Screen Saver/Sleep Events
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


  • Prev by Date: Re: Constructing smooth line from points
  • Next by Date: Re: HUD Windows
  • Previous by thread: Re: Responding To Screen Saver/Sleep Events
  • Next by thread: Reading text attachments from pasteboard into NSTextView
  • Index(es):
    • Date
    • Thread