• 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: screensaver madness... (the results)
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: screensaver madness... (the results)


  • Subject: RE: screensaver madness... (the results)
  • From: Jean-Daniel Dupas <email@hidden>
  • Date: Thu, 24 Apr 2003 22:17:26 +0200

And have you try to use the
- (void *)windowRef; methode on NSWindow to get
A Carbon Windows Handler on the cocoaWindow?
Or i think you can also directly use Carbon api in the Cocoa methode.
Isn't it?

> From: "Matt Pease" <email@hidden>
> To: <email@hidden>
> Subject: RE: screensaver madness... (the results)
> Date: Thu, 24 Apr 2003 18:16:28 +0200
>
> Hello Cocoa Puffs -
>
> I just wanted to post how I ended up doing this for the benefit
> of the archive dwellers.
>
> If you need to write an OSX screensaver using Carbon, for whatever
> reason, here is one way to do it.
>
> The screensaver will act as a trigger. It should implement
> the ScreenSaverView class, as per Apple docs. It can then
> signal the carbon screensaver app via an AppleEvent. It may need
> to start the carbon screensaver first, if its not already running.
>
> The Cocoa saver will draw a window itself, top most & won't allow
> the Carbon window above the Cocoa window. To get around that, you
> can make the Cocoa saver's window transparent with such code:
>
> implement animateOneFrame to call setNeedsDisplay:YES
> (this will force the saver api to call yourr Cocoa saver's
> drawRect method)
>
> drawRect should fill the passed rect with a clear color & set its AlphaValue
> to 0.0:
>
> [[NSColor clearColor] set];
> NSRectFill([self frame]);
>
> [[self window] setAlphaValue:0.0];
>
>
> Thats about it. Cocoa should probably also appleevent Carbon when it quits
> itself.
>
> Fun fun fun!
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.

  • Prev by Date: multiline tab view tabs
  • Next by Date: NSSavePanel and setting extensions...
  • Previous by thread: Re: multiline tab view tabs
  • Next by thread: NSSavePanel and setting extensions...
  • Index(es):
    • Date
    • Thread