Le 4 mai 09 à 19:23, Grant Erickson a écrit :

While the Displays preference pane doesn't appear to allow it, the Universal
Access preference pane allows setting all active, online displays to
greyscale mode.

However, when using CGDisplayAvailableModes, the only modes that appear for the current display width and height are 8-bit, 16-bit and 32-bit RGB modes
(3 samples per pixel).

Is there a Cocoa, CoreGraphics or other ApplicationServices API that handles
this mode selection or does this use an IOKit COM API? Given that
CGDisplayCurrentMode displays 32-bits, 3 samples per pixel even when
Universal Access is putting the displays in greyscale mode seems to hint at
the latter.

Regards,

Grant

I don't know any public function to do this, but the pref pane uses theses privates functions:

extern Boolean CGDisplayUsesForceToGray();
extern void CGDisplayForceToGray(Boolean gray);

Fill a feature request if you want them to be public in a futur 
release._______________________________________________

Cocoa-dev mailing list ([email protected])

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [email protected]

Reply via email to