mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-04-22 17:52:42 +00:00
Quartz: Expose methods for bridge with Opal
Expose methods for bridging Opal types and GUI classes. The new relations are the following: a) NSImage -> CGImage b) NSColor -> CGColor c) NSImageRep -> CGImage The actual implementation for this bridge is implemented in the Backend library. This significantly improves compatibility with AppKit.
This commit is contained in:
parent
1cb15c2735
commit
dc9ff85436
3 changed files with 23 additions and 0 deletions
|
@ -286,5 +286,12 @@ APPKIT_EXPORT NSString *NSSystemColorsDidChangeNotification;
|
|||
@end
|
||||
#endif
|
||||
|
||||
typedef struct CGColor *CGColorRef;
|
||||
@interface NSColor (GSQuartz)
|
||||
#if OS_API_VERSION(MAC_OS_X_VERSION_10_3, GS_API_LATEST)
|
||||
- (CGColorRef)CGColor;
|
||||
#endif
|
||||
@end
|
||||
|
||||
#endif // _GNUstep_H_NSColor
|
||||
|
||||
|
|
|
@ -485,6 +485,13 @@ APPKIT_EXTERN NSString *const NSImageNameFolder;
|
|||
|
||||
@end
|
||||
|
||||
@interface NSImage (GSQuartz)
|
||||
#if OS_API_VERSION(MAC_OS_X_VERSION_10_6, GS_API_LATEST)
|
||||
- (CGImageRef)CGImageForProposedRect: (NSRect *)proposedDestRect
|
||||
context: (NSGraphicsContext *)referenceContext
|
||||
hints: (NSDictionary *)hints;
|
||||
#endif
|
||||
@end
|
||||
|
||||
@interface NSBundle (NSImageAdditions)
|
||||
|
||||
|
|
|
@ -177,6 +177,15 @@ enum {
|
|||
|
||||
@end
|
||||
|
||||
typedef struct CGImage *CGImageRef;
|
||||
@interface NSImageRep (GSQuartz)
|
||||
#if OS_API_VERSION(MAC_OS_X_VERSION_10_6, GS_API_LATEST)
|
||||
- (CGImageRef)CGImageForProposedRect: (NSRect *)proposedDestRect
|
||||
context: (NSGraphicsContext *)referenceContext
|
||||
hints: (NSDictionary *)hints;
|
||||
#endif
|
||||
@end
|
||||
|
||||
APPKIT_EXPORT NSString *NSImageRepRegistryChangedNotification;
|
||||
|
||||
#endif // _GNUstep_H_NSImageRep
|
||||
|
|
Loading…
Reference in a new issue