How to obtain background color of the on screen windows in Mac
I am developing an Mac-Desktop application in which I 开发者_StackOverflow社区want to obtain background color of all the on-screen windows.
The function 'CGWindowListCopyWindowInfo' returns array of all on-screen windows with its size, alpha value etc.
Is there any method to obtain background color of all the on-screen windows?
Thanks in advance.
Regards, Deepa
I don't think so. See the Quartz Window Service Reference where CGWindowListCopyWindowInfo
is listed.
In any case, there is no concept of a "window background color" in OS X. There's no configurable background color which is then automatically put behind various objects on a window.
Instead, use CGWindowListCreateImage
to create an image of the window, and get the color somehow representative of that window, according to your own criterion.
精彩评论