From 5917f0519bb5fb822476bf82b3b5ffe790eefede Mon Sep 17 00:00:00 2001 From: Riccardo Mottola Date: Tue, 4 Mar 2025 23:56:39 +0100 Subject: [PATCH 01/15] always reset _needsLayout in -layout and not only -layoutSubtreeIfNeeded via layoutViewAndSubvies. Apple states for -(void) layout: Override this method if your custom view needs to perform custom layout not expressible using the constraint-based layout system. In this case you are responsible for setting needsLayout to true when something that impacts your custom layout changes. Which seems to suggest that layout does the reset of needsLayout, since setting it is up to programmer. --- Source/NSView.m | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Source/NSView.m b/Source/NSView.m index 88f78ae0b..470b93db4 100644 --- a/Source/NSView.m +++ b/Source/NSView.m @@ -5172,6 +5172,8 @@ static NSView* findByTag(NSView *view, NSInteger aTag, NSUInteger *level) - (void) layout { + _needsLayout = NO; + GSAutoLayoutEngine *engine = [self _layoutEngine]; if (!engine) { @@ -5307,7 +5309,6 @@ static NSView* findByTag(NSView *view, NSInteger aTag, NSUInteger *level) if (_needsLayout) { [self layout]; - _needsLayout = NO; } NSArray *subviews = [self subviews]; From 07f2213285d469452efe9da99519ef8f4bddc7c1 Mon Sep 17 00:00:00 2001 From: Riccardo Mottola Date: Wed, 5 Mar 2025 16:08:10 +0100 Subject: [PATCH 02/15] fix copy&paste error in release which caused crash --- Source/GSAutoLayoutEngine.m | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Source/GSAutoLayoutEngine.m b/Source/GSAutoLayoutEngine.m index 84c3f8a4b..5ecb081e0 100644 --- a/Source/GSAutoLayoutEngine.m +++ b/Source/GSAutoLayoutEngine.m @@ -1280,7 +1280,7 @@ typedef NSInteger GSLayoutViewAttribute; RELEASE(_viewAlignmentRectByViewIndex); RELEASE(_viewIndexByViewHash); RELEASE(_constraintsByViewIndex); - RELEASE(_constraintsByViewIndex); + RELEASE(_layoutConstraintsBySolverConstraint); RELEASE(_supportingConstraintsByConstraint); RELEASE(_constraintsByAutoLayoutConstaintHash); RELEASE(_internalConstraintsByViewIndex); From 60aca743365a032169b96c5db2db75e632f9b81c Mon Sep 17 00:00:00 2001 From: Riccardo Mottola Date: Mon, 24 Mar 2025 23:58:04 +0100 Subject: [PATCH 03/15] improve handling of external viewer success or failure, return early in case of success --- Source/NSHelpManager.m | 79 ++++++++++++++++++++++-------------------- 1 file changed, 41 insertions(+), 38 deletions(-) diff --git a/Source/NSHelpManager.m b/Source/NSHelpManager.m index e09e4e652..f505f88c6 100644 --- a/Source/NSHelpManager.m +++ b/Source/NSHelpManager.m @@ -221,54 +221,57 @@ { result = [[NSWorkspace sharedWorkspace] openFile: file withApplication: viewer]; - return; } } - if (result == NO) - { - NSHelpPanel *panel; - NSTextView *tv; - id object = nil; + // external viewer succeeded + if (result) + return; - panel = [NSHelpPanel sharedHelpPanel]; - tv = [(NSScrollView*)[panel contentView] documentView]; - if (ext == nil + // fallback to internal viewer + { + NSHelpPanel *panel; + NSTextView *tv; + id object = nil; + + panel = [NSHelpPanel sharedHelpPanel]; + tv = [(NSScrollView*)[panel contentView] documentView]; + if (ext == nil || [ext isEqualToString: @""] || [ext isEqualToString: @"txt"] || [ext isEqualToString: @"text"]) - { - object = [NSString stringWithContentsOfFile: file]; - } - else if ([ext isEqualToString: @"rtf"]) - { - NSData *data = [NSData dataWithContentsOfFile: file]; + { + object = [NSString stringWithContentsOfFile: file]; + } + else if ([ext isEqualToString: @"rtf"]) + { + NSData *data = [NSData dataWithContentsOfFile: file]; - object = [[NSAttributedString alloc] initWithRTF: data - documentAttributes: 0]; - AUTORELEASE (object); - } - else if ([ext isEqualToString: @"rtfd"]) - { - NSFileWrapper *wrapper; + object = [[NSAttributedString alloc] initWithRTF: data + documentAttributes: 0]; + AUTORELEASE (object); + } + else if ([ext isEqualToString: @"rtfd"]) + { + NSFileWrapper *wrapper; - wrapper = [[NSFileWrapper alloc] initWithPath: file]; - AUTORELEASE (wrapper); - object = [[NSAttributedString alloc] - initWithRTFDFileWrapper: wrapper - documentAttributes: 0]; - AUTORELEASE (object); - } + wrapper = [[NSFileWrapper alloc] initWithPath: file]; + AUTORELEASE (wrapper); + object = [[NSAttributedString alloc] + initWithRTFDFileWrapper: wrapper + documentAttributes: 0]; + AUTORELEASE (object); + } - if (object != nil) - { - [[tv textStorage] setAttributedString: object]; - [tv sizeToFit]; - } - [tv setNeedsDisplay: YES]; - [panel makeKeyAndOrderFront: self]; - return; - } + if (object != nil) + { + [[tv textStorage] setAttributedString: object]; + [tv sizeToFit]; + } + [tv setNeedsDisplay: YES]; + [panel makeKeyAndOrderFront: self]; + return; + } } } From c00d5beaf86e3bac2a91f98a6778efa1420c6dda Mon Sep 17 00:00:00 2001 From: Riccardo Mottola Date: Tue, 25 Mar 2025 00:00:18 +0100 Subject: [PATCH 04/15] use existing ws local variable work shared NSWorkspace --- Source/NSHelpManager.m | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Source/NSHelpManager.m b/Source/NSHelpManager.m index f505f88c6..89436b171 100644 --- a/Source/NSHelpManager.m +++ b/Source/NSHelpManager.m @@ -219,8 +219,8 @@ } if (viewer != nil) { - result = [[NSWorkspace sharedWorkspace] openFile: file - withApplication: viewer]; + result = [ws openFile: file + withApplication: viewer]; } } From 2cd675f736d47993bf77034f63193ced4ed01e11 Mon Sep 17 00:00:00 2001 From: Riccardo Mottola Date: Tue, 25 Mar 2025 00:10:37 +0100 Subject: [PATCH 05/15] fix typo --- Documentation/GuiUser/DefaultsSummary.gsdoc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Documentation/GuiUser/DefaultsSummary.gsdoc b/Documentation/GuiUser/DefaultsSummary.gsdoc index 8b4485a7d..f5fea817e 100644 --- a/Documentation/GuiUser/DefaultsSummary.gsdoc +++ b/Documentation/GuiUser/DefaultsSummary.gsdoc @@ -108,7 +108,7 @@ to be used to view application help.
If this is not specified (or is an empty string) the 'best' available viewer is used (an application whose Info.plist says that it can view files of the - appropriate type ... usually rtp or rtfd files).
+ appropriate type ... usually rtf or rtfd files).
If this is set to NSHelpPanel or if no application can be used to view the help file, the help is displayed by the shared help panel object built in to the application. From 4faee2de0ba0894b6bf2f5478999be4ebb6a8e63 Mon Sep 17 00:00:00 2001 From: Riccardo Mottola Date: Tue, 25 Mar 2025 01:06:28 +0100 Subject: [PATCH 06/15] before using designated HelpViewer check if it is capable of opening the extension --- Source/NSHelpManager.m | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/Source/NSHelpManager.m b/Source/NSHelpManager.m index 89436b171..d3a6d83fd 100644 --- a/Source/NSHelpManager.m +++ b/Source/NSHelpManager.m @@ -213,6 +213,34 @@ if ([viewer isEqual: @"NSHelpPanel"] == NO) { + if (viewer && [viewer length] > 0) + { + NSBundle *appBundle = [ws bundleForApp: viewer]; + NSArray *types; + NSMutableArray *extensions = [NSMutableArray array]; + + types = [appBundle objectForInfoDictionaryKey:@"NSTypes"]; + if (types) + { + NSUInteger i; + + for (i = 0; i < [types count]; i++) + { + NSArray *unixExtensions; + NSUInteger j; + + unixExtensions = [[types objectAtIndex: i] objectForKey:@"NSUnixExtensions"]; + for (j = 0; j < [unixExtensions count]; j++) + [extensions addObject: [[unixExtensions objectAtIndex:j] lowercaseString]]; + } + } + + if (![extensions containsObject:[ext lowercaseString]]) + { + NSWarnLog(@"Designated viewer %@ is not registered for %@", viewer, ext); + viewer = nil; + } + } if ([viewer length] == 0) { viewer = [ws getBestAppInRole: @"Viewer" forExtension: ext]; From 0db5a24849607e69d3fbc502e7e7b7ffca82c72a Mon Sep 17 00:00:00 2001 From: Riccardo Mottola Date: Tue, 1 Apr 2025 00:29:15 +0200 Subject: [PATCH 07/15] Use NSWorkspace inforForExcetsion to check if current registred HelpViewer is capable of showing the Help File, otherwise fall-back to NSWorkspace open as if no HelpViewer is set --- Source/NSHelpManager.m | 27 ++++++++------------------- 1 file changed, 8 insertions(+), 19 deletions(-) diff --git a/Source/NSHelpManager.m b/Source/NSHelpManager.m index d3a6d83fd..c39dac63f 100644 --- a/Source/NSHelpManager.m +++ b/Source/NSHelpManager.m @@ -215,27 +215,16 @@ { if (viewer && [viewer length] > 0) { - NSBundle *appBundle = [ws bundleForApp: viewer]; - NSArray *types; - NSMutableArray *extensions = [NSMutableArray array]; + NSDictionary *apps = [ws infoForExtension: ext]; + NSDictionary *appInfo; - types = [appBundle objectForInfoDictionaryKey:@"NSTypes"]; - if (types) - { - NSUInteger i; + // Let's try to be lenient if Viewer was set instead of Viewer.app + if ([[viewer pathExtension] length] == 0) + viewer = [viewer stringByAppendingPathExtension:@"app"]; + appInfo = [apps objectForKey: viewer]; - for (i = 0; i < [types count]; i++) - { - NSArray *unixExtensions; - NSUInteger j; - - unixExtensions = [[types objectAtIndex: i] objectForKey:@"NSUnixExtensions"]; - for (j = 0; j < [unixExtensions count]; j++) - [extensions addObject: [[unixExtensions objectAtIndex:j] lowercaseString]]; - } - } - - if (![extensions containsObject:[ext lowercaseString]]) + // We ingore the role, supposing both Editor and Viewer are fine + if (nil == appInfo) { NSWarnLog(@"Designated viewer %@ is not registered for %@", viewer, ext); viewer = nil; From e3da52aae37e7fe1273e0e3e858dba23c2aa7455 Mon Sep 17 00:00:00 2001 From: Riccardo Mottola Date: Tue, 1 Apr 2025 01:34:27 +0200 Subject: [PATCH 08/15] Normalize path always and use it to check if it exists, not argc. --- Tools/gopen.m | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Tools/gopen.m b/Tools/gopen.m index 73b097b22..3a635adaa 100644 --- a/Tools/gopen.m +++ b/Tools/gopen.m @@ -100,7 +100,8 @@ main(int argc, char** argv, char **env_c) if (filetoopen) { - exists = [fm fileExistsAtPath: arg isDirectory: &isDir]; + filetoopen = absolutePath(fm, filetoopen); + exists = [fm fileExistsAtPath: filetoopen isDirectory: &isDir]; if (exists == NO) { if ([filetoopen hasPrefix: @"/"] == NO @@ -111,7 +112,6 @@ main(int argc, char** argv, char **env_c) } else { - filetoopen = absolutePath(fm, filetoopen); [workspace openFile: filetoopen withApplication: application]; } From 3c83194b7bb8038fb20f1ad671c790120f5c06b3 Mon Sep 17 00:00:00 2001 From: Riccardo Mottola Date: Tue, 1 Apr 2025 14:41:38 +0200 Subject: [PATCH 09/15] fix missing space --- Source/NSHelpManager.m | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Source/NSHelpManager.m b/Source/NSHelpManager.m index c39dac63f..83aa122de 100644 --- a/Source/NSHelpManager.m +++ b/Source/NSHelpManager.m @@ -220,7 +220,7 @@ // Let's try to be lenient if Viewer was set instead of Viewer.app if ([[viewer pathExtension] length] == 0) - viewer = [viewer stringByAppendingPathExtension:@"app"]; + viewer = [viewer stringByAppendingPathExtension: @"app"]; appInfo = [apps objectForKey: viewer]; // We ingore the role, supposing both Editor and Viewer are fine From a4da1a1b5a69751937db16faacccd610c4e1e895 Mon Sep 17 00:00:00 2001 From: Riccardo Mottola Date: Wed, 2 Apr 2025 01:46:40 +0200 Subject: [PATCH 10/15] Fix standardizing absolute paths: first check for them, then add CWD then standardize the path. As we are, add a nil/empty string check for path. --- Tools/gopen.m | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/Tools/gopen.m b/Tools/gopen.m index 3a635adaa..6bbdec407 100644 --- a/Tools/gopen.m +++ b/Tools/gopen.m @@ -1,9 +1,10 @@ /* This tool opens the appropriate application from the command line based on what type of file is being accessed. - Copyright (C) 2001 Free Software Foundation, Inc. + Copyright (C) 2001-2025 Software Foundation, Inc. - Written by: Gregory Casamento + Written by: Gregory Casamento + Riccardo Mottola Created: November 2001 This file is part of the GNUstep Project @@ -45,11 +46,12 @@ static NSString* absolutePath(NSFileManager *fm, NSString *path) { + if (nil == path || [path length] == 0) + return path; + + if (![path isAbsolutePath]) + path = [[fm currentDirectoryPath] stringByAppendingPathComponent: path] ; path = [path stringByStandardizingPath]; - if ([path isAbsolutePath] == NO) - { - path = [[fm currentDirectoryPath] stringByAppendingPathComponent: path]; - } return path; } From 2e5f204d6a61d849f104947f8950b306f0401df9 Mon Sep 17 00:00:00 2001 From: Riccardo Mottola Date: Fri, 11 Apr 2025 09:23:39 +0200 Subject: [PATCH 11/15] imageable area is usually smaller than the full page, don't provide a edge-to-edge printer as default dummy --- .../Generic-PostScript_Printer-Postscript.ppd | 26 +++++++++---------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/PrinterTypes/English.lproj/Generic-PostScript_Printer-Postscript.ppd b/PrinterTypes/English.lproj/Generic-PostScript_Printer-Postscript.ppd index 917a3b2b5..995435e79 100644 --- a/PrinterTypes/English.lproj/Generic-PostScript_Printer-Postscript.ppd +++ b/PrinterTypes/English.lproj/Generic-PostScript_Printer-Postscript.ppd @@ -105,19 +105,19 @@ tFile=- -; else cat; fi" *CloseUI: *PageRegion *DefaultImageableArea: Letter -*ImageableArea Letter/US Letter: "0 0 612 792" -*ImageableArea A4/A4: "0 0 595 842" -*ImageableArea 11x17/11x17: "0 0 792 1224" -*ImageableArea A3/A3: "0 0 842 1191" -*ImageableArea A5/A5: "0 0 421 595" -*ImageableArea B5/B5 (JIS): "0 0 516 729" -*ImageableArea Env10/Envelope #10: "0 0 297 684" -*ImageableArea EnvC5/Envelope C5: "0 0 459 649" -*ImageableArea EnvDL/Envelope DL: "0 0 312 624" -*ImageableArea EnvISOB5/Envelope B5: "0 0 499 709" -*ImageableArea EnvMonarch/Envelope Monarch: "0 0 279 540" -*ImageableArea Executive/Executive: "0 0 522 756" -*ImageableArea Legal/US Legal: "0 0 612 1008" +*ImageableArea Letter/US Letter: "25 25 600 780" +*ImageableArea A4/A4: "25 25 575 815" +*ImageableArea 11x17/11x17: "20 20 792 1224" +*ImageableArea A3/A3: "20 20 820 1111" +*ImageableArea A5/A5: "10 10 406 578" +*ImageableArea B5/B5 (JIS): "20 20 516 729" +*ImageableArea Env10/Envelope #10: "20 20 277 664" +*ImageableArea EnvC5/Envelope C5: "20 20 439 629" +*ImageableArea EnvDL/Envelope DL: "20 20 292 604" +*ImageableArea EnvISOB5/Envelope B5: "20 20 479 689" +*ImageableArea EnvMonarch/Envelope Monarch: "20 20 259 530" +*ImageableArea Executive/Executive: "20 20 512 736" +*ImageableArea Legal/US Legal: "25 25 567 963" *DefaultPaperDimension: Letter *PaperDimension Letter/US Letter: "612 792" From 4f54f4d6cffd5c781aed3cd80a8cb4f39efb6cee Mon Sep 17 00:00:00 2001 From: Riccardo Mottola Date: Fri, 11 Apr 2025 09:24:28 +0200 Subject: [PATCH 12/15] recalculate margins every time the paper type changes, do not stick to thos calculated on the default in init --- Source/NSPrintInfo.m | 29 +++++++++++++++++++---------- 1 file changed, 19 insertions(+), 10 deletions(-) diff --git a/Source/NSPrintInfo.m b/Source/NSPrintInfo.m index 2f82f6d4a..47ded456d 100644 --- a/Source/NSPrintInfo.m +++ b/Source/NSPrintInfo.m @@ -133,6 +133,20 @@ static NSPrintInfo *sharedPrintInfo = nil; [[principalClass printInfoClass] setDefaultPrinter: printer]; } +- (void) _updateMargins +{ + NSPrinter *printer = [self printer]; + NSRect imageableRect; + NSSize paperSize; + + paperSize = [printer pageSizeForPaper: [self paperName]]; + imageableRect = [printer imageRectForPaper: [self paperName]]; + [self setRightMargin: (paperSize.width - NSMaxX(imageableRect))]; + [self setLeftMargin: imageableRect.origin.y]; + [self setTopMargin: (paperSize.height - NSMaxY(imageableRect))]; + [self setBottomMargin: imageableRect.origin.x]; +} + // // Instance methods // @@ -143,8 +157,6 @@ static NSPrintInfo *sharedPrintInfo = nil; { NSPrinter *printer; NSString *pageSize; - NSRect imageRect; - NSSize paperSize; if (!(self = [super init])) { @@ -174,14 +186,10 @@ static NSPrintInfo *sharedPrintInfo = nil; [self setPaperName: pageSize]; /* Set default margins. */ - paperSize = [printer pageSizeForPaper: pageSize]; - imageRect = [printer imageRectForPaper: pageSize]; - [self setRightMargin: (paperSize.width - NSMaxX(imageRect))]; - [self setLeftMargin: imageRect.origin.y]; - [self setTopMargin: (paperSize.height - NSMaxY(imageRect))]; - [self setBottomMargin: imageRect.origin.x]; - [self setOrientation: NSPortraitOrientation]; - + [self _updateMargins]; + + [self setOrientation: NSPortraitOrientation]; + if (aDict != nil) { [_info addEntriesFromDictionary: aDict]; @@ -293,6 +301,7 @@ static NSPrintInfo *sharedPrintInfo = nil; [_info setObject: [NSValue valueWithSize: [NSPrintInfo sizeForPaperName: name]] forKey: NSPrintPaperSize]; + [self _updateMargins]; } - (void) setPaperSize: (NSSize)size From 15de9c7eb39cf7bc147f5f35c3022bf3d4b698b1 Mon Sep 17 00:00:00 2001 From: Riccardo Mottola Date: Fri, 11 Apr 2025 15:34:15 +0200 Subject: [PATCH 13/15] further tweak margins --- .../Generic-PostScript_Printer-Postscript.ppd | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/PrinterTypes/English.lproj/Generic-PostScript_Printer-Postscript.ppd b/PrinterTypes/English.lproj/Generic-PostScript_Printer-Postscript.ppd index 995435e79..622eae471 100644 --- a/PrinterTypes/English.lproj/Generic-PostScript_Printer-Postscript.ppd +++ b/PrinterTypes/English.lproj/Generic-PostScript_Printer-Postscript.ppd @@ -105,19 +105,19 @@ tFile=- -; else cat; fi" *CloseUI: *PageRegion *DefaultImageableArea: Letter -*ImageableArea Letter/US Letter: "25 25 600 780" -*ImageableArea A4/A4: "25 25 575 815" -*ImageableArea 11x17/11x17: "20 20 792 1224" -*ImageableArea A3/A3: "20 20 820 1111" -*ImageableArea A5/A5: "10 10 406 578" -*ImageableArea B5/B5 (JIS): "20 20 516 729" +*ImageableArea Letter/US Letter: "25 25 587 767" +*ImageableArea A4/A4: "25 25 570 817" +*ImageableArea 11x17/11x17: "30 30 762 1194" +*ImageableArea A3/A3: "25 25 817 1166" +*ImageableArea A5/A5: "25 25 396 587" +*ImageableArea B5/B5 (JIS): "20 20 496 709" *ImageableArea Env10/Envelope #10: "20 20 277 664" *ImageableArea EnvC5/Envelope C5: "20 20 439 629" *ImageableArea EnvDL/Envelope DL: "20 20 292 604" *ImageableArea EnvISOB5/Envelope B5: "20 20 479 689" -*ImageableArea EnvMonarch/Envelope Monarch: "20 20 259 530" -*ImageableArea Executive/Executive: "20 20 512 736" -*ImageableArea Legal/US Legal: "25 25 567 963" +*ImageableArea EnvMonarch/Envelope Monarch: "20 20 259 526" +*ImageableArea Executive/Executive: "20 20 502 736" +*ImageableArea Legal/US Legal: "25 25 587 983" *DefaultPaperDimension: Letter *PaperDimension Letter/US Letter: "612 792" From 53a85514c1467aa081d51a80cbf08e31b3ce4b5c Mon Sep 17 00:00:00 2001 From: Riccardo Mottola Date: Thu, 17 Apr 2025 02:30:05 +0200 Subject: [PATCH 14/15] do not crash if passed rect as value is nil --- Source/NSView.m | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/Source/NSView.m b/Source/NSView.m index 470b93db4..e6ad16481 100644 --- a/Source/NSView.m +++ b/Source/NSView.m @@ -2830,9 +2830,14 @@ in the main thread. - (void) _setNeedsDisplayInRect_real: (NSValue *)v { - NSRect invalidRect = [v rectValue]; + NSRect invalidRect; NSView *currentView = _super_view; + if (nil == v) + return; + + invalidRect = [v rectValue]; + /* * Limit to bounds, combine with old _invalidRect, and then check to see * if the result is the same as the old _invalidRect - if it isn't then From 43feefce685ab8d0944da28dcc2d5206c2808f7e Mon Sep 17 00:00:00 2001 From: Gregory John Casamento Date: Wed, 30 Apr 2025 07:57:40 -0400 Subject: [PATCH 15/15] Add new colorspace enums, minor change --- ChangeLog | 4 ++++ Headers/AppKit/NSColorSpace.h | 8 +++++++- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 5ed1ae5d7..9d93a22cc 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2025-04-30 Gregory John Casamento + + * Headers/AppKit/NSColorSpace.h: Add NSColorSpaceModel* enumerated values. + 2025-02-11 Richard Frith-Macdonald * ANNOUNCE: diff --git a/Headers/AppKit/NSColorSpace.h b/Headers/AppKit/NSColorSpace.h index e3fd7ad60..29eabebf5 100644 --- a/Headers/AppKit/NSColorSpace.h +++ b/Headers/AppKit/NSColorSpace.h @@ -44,7 +44,13 @@ typedef enum _NSColorSpaceModel NSRGBColorSpaceModel, NSCMYKColorSpaceModel, NSLABColorSpaceModel, - NSDeviceNColorSpaceModel + NSDeviceNColorSpaceModel, + NSColorSpaceModelUnknown = NSUnknownColorSpaceModel, + NSColorSpaceModelGray = NSGrayColorSpaceModel, + NSColorSpaceModelRGB = NSRGBColorSpaceModel, + NSColorSpaceModelCMYK = NSCMYKColorSpaceModel, + NSColorSpaceModelLAB = NSLABColorSpaceModel, + NSColorSpaceModelDeviceN = NSDeviceNColorSpaceModel } NSColorSpaceModel; APPKIT_EXPORT_CLASS