• 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: "Sean McBride" <email@hidden>
  • Date: Tue, 26 Apr 2005 10:19:26 -0400
  • Organization: Rogue Research

On 2005-04-26 16:03, Andreas Mayer said:

>>>> CGDirectDisplayID is a pointer to a struct, so it's just some 32-bit
>>>> value.
>>>
>>> Well, I can see that it's a pointer to a struct. It's just that I
>>> didn't know _what_ struct it is pointing to. :)
>>
>> You're not supposed to.  It's opaque.  Prevents people from depending
>> on
>> the fields of the struct, making it hard for Apple to change.
>
>Sure. But in that case there should be a function/method that gives me
>a CGDirectDisplayID and *not* some other object that I can't really
>know how to convert.

Oh, sorry, I think see what you mean now.  Yeah, well, I guess its
because CG is C-based (strong typing) and NSScreen is Obj-C based (weak
typing).  So you're probably just expected to get an int from the
NSNumber as Ricky suggested. Though this may have implications for when
we switch to 64 bit!  Other Cocoa-Carbon interfaces are like this too.
Notice NSWindow's -windowRef returns a void* not an actual Carbon
WindowRef. Its probably also so they can keep the headers separate.

--
____________________________________________________________
Sean McBride, B. Eng                 email@hidden
Rogue Research                        www.rogue-research.com
Mac Software Developer              Montréal, Québec, Canada


 _______________________________________________
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

References: 
 >How to get the CGDirectDisplayID? (From: Andreas Mayer <email@hidden>)
 >Re: How to get the CGDirectDisplayID? (From: Ricky Sharp <email@hidden>)
 >Re: How to get the CGDirectDisplayID? (From: Andreas Mayer <email@hidden>)
 >Re: How to get the CGDirectDisplayID? (From: "Sean McBride" <email@hidden>)
 >Re: How to get the CGDirectDisplayID? (From: Andreas Mayer <email@hidden>)

  • Prev by Date: Re: How to get the CGDirectDisplayID?
  • Next by Date: unbordered nscombobox are drawn 4 pixels below
  • Previous by thread: Re: How to get the CGDirectDisplayID?
  • Next by thread: Re: How to get the CGDirectDisplayID?
  • Index(es):
    • Date
    • Thread