如何使用Cocoa / Core Animation调整os x桌面 [英] How to dim os x desktop using Cocoa/Core Animation

查看:102
本文介绍了如何使用Cocoa / Core Animation调整os x桌面的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有没有办法使用Cocoa或Core Animation以编程方式控制OS X桌面的亮度?

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

推荐答案

你实际上对整个屏幕的淡出或淡入感兴趣,这里是描述如何做的链接

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.

链接的文档包含了如何将所有显示(或单个显示)淡化为黑色(可以更改颜色),捕获显示(可在其中显示所需内容),然后淡出的示例。这使用对我的其他答案的评论中提到的 CGAcquireDisplayFadeReservation()

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.

这更像你在看for?

这篇关于如何使用Cocoa / Core Animation调整os x桌面的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆