• 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: converting application to cocoa
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: converting application to cocoa


  • Subject: Re: converting application to cocoa
  • From: Eric Peyton <email@hidden>
  • Date: Wed, 4 Jul 2001 23:16:10 -0500

Just use an NSQuickDraw view in your screensaver and draw quickdraw in to your screensaver.

The example source I have on http://www.epicware.com/macosxsavers.html can be sort of a guide. Instead of the NSOpenGLView that I use to draw, use an NSQuickDrawView and instantiate it and draw in to it.

I would imagine that your ScreenSaverView subclass might contain code something like this ...

(this is all off the top of my head - YMMV).

QuickDrawSample.h

@interface QuickDrawSample : ScreenSaverView
{

NSQuickDrawView *_qdview;
}

@end

QuickDrawSample.m

@implementation QuickDrawSample

- (id)initWithFrame:(NSRect)frameRect isPreview:(BOOL)preview
{
self = [super initWithFrame:frameRect isPreview:preview];

if (self) {

// add a view the same size and frame as myself, and make it my subview
_qdview = [[[NSQuickDrawView alloc] initWithFrame:frameRect] autorelease];
[self addSubview:_view];
}

return self;
}


- (void)dealloc
{
[_qdview removeFromSuperview];
[super dealloc];
}

- (void)animateOneFrame
{
void *port = [_qdview qdport];

// do quickdraw code here.

return;
}


- (BOOL)hasConfigureSheet { return NO; }
- (NSWindow*)configureSheet {
return nil;
}

@end

Eric

On Wednesday, July 4, 2001, at 10:50 PM, Annie Felix wrote:

I have got an uncarbonised version of a program
which I am trying to develop into a cocoa application.
It makes use of quickdraw to draw on to the window.It
is an screen saver application.What is it that I
should use in place of quick draw. Is it the openGL
framework? I have gone through an example app that
uses screensaver framework for developing screensaver
application.But as the present application uses quick
draw I don't have an idea of how to proceed.
Please give me some suggestion of how to proceed...
_______________________________________________
cocoa-dev mailing list
email@hidden
http://www.lists.apple.com/mailman/listinfo/cocoa-dev


References: 
 >converting application to cocoa (From: Annie Felix <email@hidden>)

  • Prev by Date: Re: How to set menu action with argument.
  • Next by Date: Using Custom.plist
  • Previous by thread: converting application to cocoa
  • Next by thread: Using Custom.plist
  • Index(es):
    • Date
    • Thread