Updating a screensaver from 10.6 to 10.10
Updating a screensaver from 10.6 to 10.10
- Subject: Updating a screensaver from 10.6 to 10.10
- From: Gabriel Zachmann <email@hidden>
- Date: Sun, 26 Jul 2015 23:11:37 +0200
Dear all,
I have written a screensaver , but unfortunately, I didn't have the time to update the source code sine OS X 10.7 .
It is still working so-so, but showing signs of code aging.
Now I would like to bring the source code up to date.
Does anybody know of some guidelines , or a list of hints, or any other document anywhere, that would outline the exact changes
I need to do.
In particular, I'd like to learn more about the changes needed in CoreAnimation, in Scripting Bridge to retrieve photos from iPhoto-now-Photos,
and the way I identify the current display/monitor.
Below are a few code snippets, for your information.
And I am interesting in anything else you might deem worthy of upgrading in the source code.
Thanks a lot in advance.
Best regards,
Gabriel.
-------------
Code snippet I used to make a layer (containing only one image) cross-dissolve with a new one:
[CATransaction begin];
if ( crossDissolve_ )
[CATransaction setAnimationDuration: fading_duration];
else
[CATransaction setValue: (id)kCFBooleanTrue forKey: kCATransactionDisableActions];
[mainLayer_ replaceSublayer: currentLayer_ with: newlayer];
currentLayer_ = newlayer;
[CATransaction commit];
------------------
Code snippet I used to identify monitors/displays (this seems to fail since OS X 10.9 ):
displayNumber_ = [ [[newWindow screen] deviceDescription] objectForKey: @"NSScreenNumber"];
displayID_ = [displayNumber_ unsignedIntValue];
unsigned int main_screen_id = [[ [[NSScreen mainScreen] deviceDescription] objectForKey: @"NSScreenNumber"] unsignedIntValue];
I suspect , this code does not work any more as intended, because I get often a new display ID for exactly the same monitor (just a cinema display).
_______________________________________________
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