Re: How to get the CGDirectDisplayID?
Re: How to get the CGDirectDisplayID?
- Subject: Re: How to get the CGDirectDisplayID?
- From: Ricky Sharp <email@hidden>
- Date: Mon, 25 Apr 2005 19:22:17 -0500
On Apr 25, 2005, at 7:10 PM, Andreas Mayer wrote:
I would like to use some CGDisplay... function to get information
about an NSScreen.
NSScreen's -deviceDescription methods returns a dictionary that,
according to
<http://developer.apple.com/documentation/Cocoa/Conceptual/DrawEnv/
Concepts/devices.html>
has an entry that holds the CGDirectDisplayID:
"@"NSScreenNumber"
An NSNumber that contains the CGDirectDisplayID for the screen
device. This key is only valid for the device description
dictionary for an NSScreen."
That's great, but ... CGDirectDisplayID is declared as:
typedef struct _CGDirectDisplayID * CGDirectDisplayID;
So I guess my question is: How exactly do I get the
CGDirectDisplayID from that NSNumber instance?
Thanks for any insight. :)
CGDirectDisplayID is a pointer to a struct, so it's just some 32-bit
value. Thus, you can do this:
CGDirectDisplayID theCGDisplayID = (CGDirectDisplayID) [theNSNumber
intValue];
___________________________________________________________
Ricky A. Sharp mailto:email@hidden
Instant Interactive(tm) http://www.instantinteractive.com
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden