mirror of
https://github.com/gnustep/libs-back.git
synced 2025-02-24 04:11:28 +00:00
In Quartz, the "graphics port" bound to an NSGraphicsContext (subclassed by OpalContext) is a CGContext. We currently initialize one in OpalSurface if it does not exist, however we do not allow the client to initialize a graphics context with a custom graphics port, which should be allowed. This commit enables this feature.
47 lines
1.4 KiB
Objective-C
47 lines
1.4 KiB
Objective-C
/*
|
|
OpalSurface.h
|
|
|
|
Copyright (C) 2013 Free Software Foundation, Inc.
|
|
|
|
Author: Ivan Vucica <ivan@vucica.net>
|
|
Date: June 2013
|
|
|
|
This file is part of GNUstep.
|
|
|
|
This library is free software; you can redistribute it and/or
|
|
modify it under the terms of the GNU Lesser General Public
|
|
License as published by the Free Software Foundation; either
|
|
version 2 of the License, or (at your option) any later version.
|
|
|
|
This library is distributed in the hope that it will be useful,
|
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
Lesser General Public License for more details.
|
|
|
|
You should have received a copy of the GNU Lesser General Public
|
|
License along with this library; see the file COPYING.LIB.
|
|
If not, see <http://www.gnu.org/licenses/> or write to the
|
|
Free Software Foundation, 51 Franklin Street, Fifth Floor,
|
|
Boston, MA 02110-1301, USA.
|
|
*/
|
|
|
|
#import <Foundation/Foundation.h>
|
|
#import <CoreGraphics/CoreGraphics.h>
|
|
|
|
@interface OpalSurface : NSObject
|
|
{
|
|
struct _gswindow_device_t * _gsWindowDevice;
|
|
CGContextRef _backingCGContext;
|
|
CGContextRef _x11CGContext;
|
|
}
|
|
|
|
- (id) initWithDevice: (void *)device context: (CGContextRef)ctx;
|
|
- (void *)device;
|
|
- (CGContextRef) CGContext;
|
|
- (NSSize) size;
|
|
|
|
- (CGContextRef) backingCGContext;
|
|
- (CGContextRef) x11CGContext;
|
|
- (void) handleExposeRect: (NSRect)rect;
|
|
- (BOOL) isDrawingToScreen;
|
|
@end
|