Re: Cocoa-dev Digest, Vol 4, Issue 217
Re: Cocoa-dev Digest, Vol 4, Issue 217
- Subject: Re: Cocoa-dev Digest, Vol 4, Issue 217
- From: Michael Diehr <email@hidden>
- Date: Tue, 13 Nov 2007 09:06:26 -0800
From: David Gish <email@hidden>
Subject: Screensaver question
To: email@hidden
Message-ID: <email@hidden>
Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed
Does anyone know of a way to capture keyboard and mouse events in an
OS X screensaver app in order to provide a degree of interactivity
and allow the screensaver code itself determine when to exit? I'm a
relative newbie to Cocoa, but it looks like this would require
modifying or replacing the default NSRunLoop instance
(currentRunLoop) so events can be redirected. Screen savers are
written essentially as plugins and stealing the run loop from the
host app (ScreenSaverEngine) seems very unkosher to me. And there's a
complicating factor. Sniffing around in gdb, it appears that a system
with one display runs ScreenSaverEngine and the screen saver itself
in a single thread, but with additional displays, a thread is spawned
for each screen saver.
My idea at this point is to simply write a screensaver stub that
launches a real full-screen app. The control panel preview would have
to be handled separately. Any other ideas?
Thanks,
David,
Did you ever get this working? I'm finding it's easy to trap keyboard
events in an ScreenSaverView, but having no luck capturing mouse
movement. I too am trying to have my screensaver launch a second app
that takes over the screen.
-mike
_______________________________________________
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