• 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: How to get the CGDirectDisplayID?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


  • Follow-Ups:
    • Re: How to get the CGDirectDisplayID?
      • From: Finlay Dobbie <email@hidden>
    • Re: How to get the CGDirectDisplayID?
      • From: Andreas Mayer <email@hidden>
References: 
 >How to get the CGDirectDisplayID? (From: Andreas Mayer <email@hidden>)

  • Prev by Date: How to get the CGDirectDisplayID?
  • Next by Date: IPTC EXIF header in Tiger
  • Previous by thread: How to get the CGDirectDisplayID?
  • Next by thread: Re: How to get the CGDirectDisplayID?
  • Index(es):
    • Date
    • Thread