Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Getting Refresh Rate of a Monitor



The magic functions are:

DMGetDisplayIDByGDevice() and DMGetGDeviceByDisplayID()

The value of the type DisplayIDType can be casted to a CGDirectDisplayID.

So if you have a GDHandle, you can easily get the CGDirectDisplayID and use
the CGDirectDisplay functions.

HTH.

On 1/20/2006 10:20 PM, "Gerry Beggs" <email@hidden> wrote:

> 
> On 20-Jan-06, at 1:29 PM, Peter S Lau wrote:
> 
>> it's much easier if you could use the CGDirectDisplay API.
>> 
>> CGDisplayCurrentMode()
>> 
>> then CFDictionaryGetValue() with the key "RefreshRate".
>> 
>> if you really need to go through GDHandle, the field you need is
>> called csRefreshRate, but you may need to use Fix2Long to convert
>> to a long... and you would need to do a list iterator proc to
>> iterate the mode list through DMGetIndexedDisplayModeFromList(),
>> which is really painful (especially if you want to be 9 and X
>> compatible, like I did in 10.1.4 days)...
>> 
>> pete
> 
> That's great I've got the information about the displays I need.
> And to go full-screen, I can use CGDisplayCapture(displayID) also.
> 
> and CGDisplayGetDrawingContext(displayID) so I can use Quartz to draw
> on the screen.
> 
> My problem is that I will also be using QuickTime in addition to my
> own drawing to play movies to the display.
> 
> I can find no way to get QuickTime to draw to anything except an old-
> style QuickDraw GWorld.
> 
> 
> If I use QuickTime's BeginFullScreen(...) then I'm stuck using
> GDHandles and GWorlds.
> Is that my old option?


 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Carbon-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/carbon-dev/email@hidden

This email sent to email@hidden

References: 
 >Re: Getting Refresh Rate of a Monitor (From: Gerry Beggs <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.