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
This commit is contained in:
FredKiefer 2001-08-04 14:43:31 +00:00
parent 30dec24be5
commit c0a29aebd4

View file

@ -119,7 +119,7 @@ NSGraphicsContext *GSCurrentContext()
@"Internal Error: No default NSGraphicsContext set\n"); @"Internal Error: No default NSGraphicsContext set\n");
ctxt = [[defaultNSGraphicsContextClass allocWithZone: _globalGSZone] ctxt = [[defaultNSGraphicsContextClass allocWithZone: _globalGSZone]
initWithContextInfo: info]; initWithContextInfo: info];
[ctxt autorelease]; AUTORELEASE(ctxt);
return ctxt; return ctxt;
} }
@ -144,6 +144,37 @@ NSGraphicsContext *GSCurrentContext()
return 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 - (void) dealloc
{ {
if (GSCurrentContext() == self) if (GSCurrentContext() == self)
@ -175,7 +206,7 @@ NSGraphicsContext *GSCurrentContext()
{ {
[super init]; [super init];
context_info = [info retain]; ASSIGN(context_info, info);
focus_stack = [[NSMutableArray allocWithZone: [self zone]] focus_stack = [[NSMutableArray allocWithZone: [self zone]]
initWithCapacity: 1]; initWithCapacity: 1];
event_queue = [[NSMutableArray allocWithZone: [self zone]] event_queue = [[NSMutableArray allocWithZone: [self zone]]
@ -200,6 +231,21 @@ NSGraphicsContext *GSCurrentContext()
return self; return self;
} }
- (NSDictionary *) attributes
{
return context_info;
}
- (void)flushGraphics
{
[self flush];
}
- (void *)graphicsPort
{
return NULL;
}
- (void) flush - (void) flush
{ {
} }