• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Quartz Display Services & Retina Display Modes
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Quartz Display Services & Retina Display Modes


  • Subject: Re: Quartz Display Services & Retina Display Modes
  • From: Matthias Dörfelt <email@hidden>
  • Date: Tue, 20 May 2014 01:03:53 -0700

Thanks, that does exactly what I want. The naming of kCGDisplayShowDuplicateLowResolutionModes seems is very confusing and ambiguous to me, though.

Thanks for the help!

Matthias

Am 20.05.2014 um 00:32 schrieb Ken Thomases <email@hidden>:

> On May 20, 2014, at 1:59 AM, Matthias Dörfelt wrote:
>
>> AFAIK there is no way to find retina display modes with Quartz Display Services right now. Why is that? Is there any workaround or different API?
>> Right now, if I change the Display Mode of my retina display programmatically, I have to cache the original retina display mode in order to return to it, as
>> CGDisplayCopyAllDisplayModes won’t expose them to me.
>> Are we still waiting for a proper public API to handle these things or am I fundamentally misunderstanding something here?
>
> It's not that you're misunderstanding, it's that the new capability has not been documented well.  It's only listed in the headers.
>
> In /System/Library/Frameworks/CoreGraphics.framework/Versions/A/Headers/CGDirectDisplay.h you'll find the declaration of kCGDisplayShowDuplicateLowResolutionModes.  That's a key that can be used in the options dictionary parameter of CGDisplayCopyAllDisplayModes().  Use the value kCFBooleanTrue.
>
> There are also new functions to get the dimensions of a display mode in pixels rather than points: CGDisplayModeGetPixelWidth() and CGDisplayModeGetPixelHeight().  Without these, you may mistake a HiDPI display mode as a normal one, since its dimensions will be reported in points.
>
>
> For what it's worth, I found that the old, deprecated display mode APIs (e.g. CGDisplayAvailableModes()) list all of the display modes with no special flags or options.
>
> Regards,
> Ken
>
>

_______________________________________________

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


References: 
 >Quartz Display Services & Retina Display Modes (From: Matthias Dörfelt <email@hidden>)
 >Re: Quartz Display Services & Retina Display Modes (From: Ken Thomases <email@hidden>)

  • Prev by Date: Re: Core Data migration and non-optional transient relationships
  • Next by Date: Re: Core Data migration and non-optional transient relationships
  • Previous by thread: Re: Quartz Display Services & Retina Display Modes
  • Next by thread: kCGStatusWindowLevel
  • Index(es):
    • Date
    • Thread