From 3bea937d15afab20caa0ce99bb7b953b180b00c2 Mon Sep 17 00:00:00 2001 From: Fred Kiefer Date: Sat, 4 Aug 2001 14:43:31 +0000 Subject: [PATCH] Dumy implementations for new class methods and implementations for new instance methods. git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@10651 72102866-910b-0410-8b05-ffd578937521 --- Source/NSGraphicsContext.m | 50 ++++++++++++++++++++++++++++++++++++-- 1 file changed, 48 insertions(+), 2 deletions(-) diff --git a/Source/NSGraphicsContext.m b/Source/NSGraphicsContext.m index 435fb16f4..dc76bbdaf 100644 --- a/Source/NSGraphicsContext.m +++ b/Source/NSGraphicsContext.m @@ -119,7 +119,7 @@ NSGraphicsContext *GSCurrentContext() @"Internal Error: No default NSGraphicsContext set\n"); ctxt = [[defaultNSGraphicsContextClass allocWithZone: _globalGSZone] initWithContextInfo: info]; - [ctxt autorelease]; + AUTORELEASE(ctxt); return ctxt; } @@ -144,6 +144,37 @@ NSGraphicsContext *GSCurrentContext() return GSCurrentContext(); } ++ (BOOL) currentContextDrawingToScreen +{ + return [GSCurrentContext() isDrawingToScreen]; +} + ++ (NSGraphicsContext *) graphicsContextWithAttributes: (NSDictionary *)attributes +{ + // FIXME: The attributes should determine the concrete class + return [self defaultContextWithInfo: attributes]; +} + ++ (NSGraphicsContext *) graphicsContextWithWindow: (NSWindow *)aWindow +{ + return [self graphicsContextWithAttributes: [aWindow deviceDescription]]; +} + ++ (void) restoreGraphicsState +{ +// FIXME +} + ++ (void) saveGraphicsState +{ +// FIXME +} + ++ (void) setGraphicsState: (int)graphicsState +{ +// FIXME +} + - (void) dealloc { if (GSCurrentContext() == self) @@ -175,7 +206,7 @@ NSGraphicsContext *GSCurrentContext() { [super init]; - context_info = [info retain]; + ASSIGN(context_info, info); focus_stack = [[NSMutableArray allocWithZone: [self zone]] initWithCapacity: 1]; event_queue = [[NSMutableArray allocWithZone: [self zone]] @@ -200,6 +231,21 @@ NSGraphicsContext *GSCurrentContext() return self; } +- (NSDictionary *) attributes +{ + return context_info; +} + +- (void)flushGraphics +{ + [self flush]; +} + +- (void *)graphicsPort +{ + return NULL; +} + - (void) flush { }