• 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: What's the proper way of creating a temporary NSWindow from a Carbon window?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: What's the proper way of creating a temporary NSWindow from a Carbon window?


  • Subject: Re: What's the proper way of creating a temporary NSWindow from a Carbon window?
  • From: Jonathan del Strother <email@hidden>
  • Date: Fri, 6 May 2005 15:52:07 +0100


On 6 May 2005, at 15:43, Sean McBride wrote:

On 2005-05-06 15:10, Jonathan del Strother said:


My iTunes plugin needs a list of supported resolutions from the
screen that the iTunes window is on.


The iTunes window may be on more than one screen.


True. However, the screen that most of the window is on is the one that's used when switching to fullscreen.




It's doing this by creating an NSWindow using initWithWindowRef.

    NSWindow* iTunesWindow = [[NSWindow alloc]
initWithWindowRef:FrontWindow()];


How does that tell you the supported resolutions?

You can get NSScreen from an NSWindow. Then, [NSScreen deviceDescription] to get the screen number. Then, CGDisplayAvailableModes to get an array of resolutions. I'm sure there's a better way, but I couldn't figure it out...





Are iTunes plugins even allowed to be Cocoa? iTunes is Carbon afterall.

I use a Carbon base and then load a Cocoa bundle in for the UI. Works pretty well.



There are non-Cocoa ways to get screen resolutions you know, see
CGDirectDisplay for example.

Hmmm, I'll take a look. Thanks for the suggestion

Jon
_______________________________________________
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: What's the proper way of creating a temporary NSWindow from a Carbon window?
      • From: "Sean McBride" <email@hidden>
References: 
 >What's the proper way of creating a temporary NSWindow from a Carbon window? (From: Jonathan del Strother <email@hidden>)
 >Re: What's the proper way of creating a temporary NSWindow from a Carbon window? (From: "Sean McBride" <email@hidden>)

  • Prev by Date: Re: programmaticaly modify .nib files
  • Next by Date: Re: What's the proper way of creating a temporary NSWindow from a Carbon window?
  • Previous by thread: Re: What's the proper way of creating a temporary NSWindow from a Carbon window?
  • Next by thread: Re: What's the proper way of creating a temporary NSWindow from a Carbon window?
  • Index(es):
    • Date
    • Thread