Mac
Mac

Reputation: 2705

How to dim os x desktop using Cocoa/Core Animation

Is there a way to control the brightness of the OS X desktop programmatically using Cocoa or Core Animation?

Upvotes: 3

Views: 1377

Answers (2)

Naaff
Naaff

Reputation: 9333

In case you were actually interested in doing a fade-out or fade-in of the whole screen, here is a link describing how to do that.

The linked document contains examples for how to fade all displays (or a single display) to black (you can change the color), capture the display (where you can display what you'd like), and then fade back. This uses CGAcquireDisplayFadeReservation() mentioned in the comment to my other answer.

Is this more like what you were looking for?

Upvotes: 2

Naaff
Naaff

Reputation: 9333

Create a semi-transparent full-screen view behind your main window.

Upvotes: 3

Related Questions