Re: How to get the CGDirectDisplayID?
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