diff --git a/ChangeLog b/ChangeLog index 00067941f..e2bf30152 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,17 @@ +2010-02-20 Fred Kiefer + + * Headers/AppKit/NSAttributedString.h, + * Source/NSAttributedString.m, + * Source/GSNibLoading.m, + * Headers/AppKit/NSScroller.h, + * Source/NSScroller.m, + * Headers/Additions/GNUstepGUI/GSGormLoading.h, + * Source/GSGormLoading.m, + * Source/NSSearchField.m, + * Headers/Additions/GNUstepGUI/GSLayoutManager.h, + * Source/NSColor.m: Make the signatures of methods consistent + between headers and implementation files. + 2010-02-20 Fred Kiefer * Source/GSGuiPrivate.h: Include preface.h from base. @@ -4540,7 +4554,7 @@ was causing a crash due to issues in NSToolbar described in bug#24601. -2008-10-18 Riccardo Mottola > +2008-10-18 Riccardo Mottola * Source/NSWorkspace.m: Removed c99-ism diff --git a/Headers/Additions/GNUstepGUI/GSGormLoading.h b/Headers/Additions/GNUstepGUI/GSGormLoading.h index 081bb4933..354410f6c 100644 --- a/Headers/Additions/GNUstepGUI/GSGormLoading.h +++ b/Headers/Additions/GNUstepGUI/GSGormLoading.h @@ -28,14 +28,9 @@ #ifndef _GNUstep_H_GSNibTemplates #define _GNUstep_H_GSNibTemplates -#include -#include -#include -#include -#include -#include -#include -#include "GNUstepGUI/GSNibContainer.h" +#import +#import "GNUstepGUI/GSNibContainer.h" + // version of the nib container and the templates. #define GNUSTEP_NIB_VERSION 2 @@ -48,10 +43,11 @@ #define GSMENUT_VERSION 0 #define GSOBJECTT_VERSION 0 -@class NSString; -@class NSDictionary; -@class NSMutableDictionary; -@class NSMutableSet; +@class NSString; +@class NSDictionary; +@class NSMutableDictionary; +@class NSMutableSet; +@class NSWindow; /** Window template autopositioning constants */ enum { diff --git a/Headers/Additions/GNUstepGUI/GSLayoutManager.h b/Headers/Additions/GNUstepGUI/GSLayoutManager.h index 68ded77e7..ad4885b80 100644 --- a/Headers/Additions/GNUstepGUI/GSLayoutManager.h +++ b/Headers/Additions/GNUstepGUI/GSLayoutManager.h @@ -295,9 +295,9 @@ invalidation.) - (NSTextContainer *) textContainerForGlyphAtIndex: (NSUInteger)glyphIndex effectiveRange: (NSRange *)effectiveRange; -- (NSRect) lineFragmentRectForGlyphAtIndex: (unsigned int)glyphIndex +- (NSRect) lineFragmentRectForGlyphAtIndex: (NSUInteger)glyphIndex effectiveRange: (NSRange *)effectiveGlyphRange; -- (NSRect) lineFragmentUsedRectForGlyphAtIndex: (unsigned int)glyphIndex +- (NSRect) lineFragmentUsedRectForGlyphAtIndex: (NSUInteger)glyphIndex effectiveRange: (NSRange *)effectiveGlyphRange; #if OS_API_VERSION(MAC_OS_X_VERSION_10_5, GS_API_LATEST) - (NSTextContainer *) textContainerForGlyphAtIndex: (NSUInteger)glyphIndex diff --git a/Headers/AppKit/NSAttributedString.h b/Headers/AppKit/NSAttributedString.h index a9f9d185a..6f3d41830 100644 --- a/Headers/AppKit/NSAttributedString.h +++ b/Headers/AppKit/NSAttributedString.h @@ -190,10 +190,10 @@ enum - (BOOL) containsAttachments; - (NSDictionary*) fontAttributesInRange: (NSRange)range; - (NSDictionary*) rulerAttributesInRange: (NSRange)range; -- (unsigned) lineBreakBeforeIndex: (NSUInteger)location - withinRange: (NSRange)aRange; -- (NSRange) doubleClickAtIndex: (unsigned)location; -- (unsigned) nextWordFromIndex: (unsigned)location forward: (BOOL)isForward; +- (NSUInteger) lineBreakBeforeIndex: (NSUInteger)location + withinRange: (NSRange)aRange; +- (NSRange) doubleClickAtIndex: (NSUInteger)location; +- (NSUInteger) nextWordFromIndex: (NSUInteger)location forward: (BOOL)isForward; - (id) initWithRTF: (NSData*)data documentAttributes: (NSDictionary**)dict; - (id) initWithRTFD: (NSData*)data documentAttributes: (NSDictionary**)dict; @@ -232,8 +232,8 @@ enum options: (NSDictionary *)options documentAttributes: (NSDictionary **)dict; -- (unsigned) lineBreakByHyphenatingBeforeIndex: (NSUInteger)location - withinRange: (NSRange)aRange; +- (NSUInteger) lineBreakByHyphenatingBeforeIndex: (NSUInteger)location + withinRange: (NSRange)aRange; #endif #if OS_API_VERSION(MAC_OS_X_VERSION_10_4, GS_API_LATEST) - (NSData *) dataFromRange: (NSRange)range diff --git a/Headers/AppKit/NSScroller.h b/Headers/AppKit/NSScroller.h index 294ef0f3a..62f88cfb4 100644 --- a/Headers/AppKit/NSScroller.h +++ b/Headers/AppKit/NSScroller.h @@ -70,8 +70,8 @@ typedef enum _NSScrollerArrow { @interface NSScroller : NSControl { double _doubleValue; - float _knobProportion; - float _pendingKnobProportion; + CGFloat _knobProportion; + CGFloat _pendingKnobProportion; id _target; SEL _action; NSScrollerPart _hitPart; diff --git a/Source/GSGormLoading.m b/Source/GSGormLoading.m index b3001d3c8..b0e6a0ec9 100644 --- a/Source/GSGormLoading.m +++ b/Source/GSGormLoading.m @@ -26,34 +26,23 @@ Boston, MA 02110-1301, USA. */ -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include +#import +#import +#import +#import +#import +#import +#import +#import +#import "AppKit/NSApplication.h" +#import "AppKit/NSControl.h" +#import "AppKit/NSMenu.h" +#import "AppKit/NSNibLoading.h" +#import "AppKit/NSNibConnector.h" +#import "AppKit/NSTextView.h" +#import "AppKit/NSView.h" +#import "AppKit/NSWindow.h" +#import "GNUstepGUI/GSGormLoading.h" static const int currentVersion = 1; // GSNibItem version number... diff --git a/Source/GSNibLoading.m b/Source/GSNibLoading.m index 3cfd31be4..0b86719b8 100644 --- a/Source/GSNibLoading.m +++ b/Source/GSNibLoading.m @@ -2227,7 +2227,7 @@ static BOOL _isInInterfaceBuilder = NO; NSDecimalNumber *dn = nil; if ([coder allowsKeyedCoding]) { - unsigned int len = 0; + NSUInteger len = 0; short exponent = (short)[coder decodeIntForKey: @"NS.exponent"]; NSByteOrder bo = [coder decodeIntForKey: @"NS.mantissa.bo"]; BOOL negative = [coder decodeBoolForKey: @"NS.negative"]; diff --git a/Source/NSAttributedString.m b/Source/NSAttributedString.m index 83867b84d..3ce3be2f0 100644 --- a/Source/NSAttributedString.m +++ b/Source/NSAttributedString.m @@ -449,7 +449,7 @@ create_error(int code, NSString* desc) } } -- (NSRange) doubleClickAtIndex: (unsigned)location +- (NSRange) doubleClickAtIndex: (NSUInteger)location { NSString *str = [self string]; unsigned length = [str length]; @@ -555,7 +555,7 @@ create_error(int code, NSString* desc) return NSMakeRange (location, length); } -- (unsigned) nextWordFromIndex: (unsigned)location +- (NSUInteger) nextWordFromIndex: (NSUInteger)location forward: (BOOL)isForward { NSString *str = [self string]; diff --git a/Source/NSColor.m b/Source/NSColor.m index abec98011..c3f67159d 100644 --- a/Source/NSColor.m +++ b/Source/NSColor.m @@ -1405,7 +1405,7 @@ systemColorWithName(NSString *name) if ((colorSpace == 1) || (colorSpace == 2)) { - unsigned length; + NSUInteger length; const uint8_t *data; float red = 0.0; float green = 0.0; @@ -1445,7 +1445,7 @@ systemColorWithName(NSString *name) } else if ((colorSpace == 3) || (colorSpace == 4)) { - unsigned length; + NSUInteger length; const uint8_t *data; float white = 0.0; float alpha = 1.0; @@ -1477,7 +1477,7 @@ systemColorWithName(NSString *name) } else if (colorSpace == 5) { - unsigned length; + NSUInteger length; const uint8_t *data; float cyan = 0.0; float yellow = 0.0; diff --git a/Source/NSScroller.m b/Source/NSScroller.m index cd33745d7..eb51ea5db 100644 --- a/Source/NSScroller.m +++ b/Source/NSScroller.m @@ -66,7 +66,7 @@ static NSCell *horizontalKnobCell = nil; static NSCell *verticalKnobCell = nil; static NSCell *horizontalKnobSlotCell = nil; static NSCell *verticalKnobSlotCell = nil; -static float scrollerWidth = 0.0; +static CGFloat scrollerWidth = 0.0; /* This is the distance by which buttons are offset inside the scroller slot. */ @@ -107,12 +107,12 @@ static float buttonsOffset = 1.0; // buttonsWidth = sw - 2*buttonsOffset

Subclasses can override this to provide different scrollbar width. But you may need to also override -drawParts .

*/ -+ (float) scrollerWidth ++ (CGFloat) scrollerWidth { return [self scrollerWidthForControlSize: NSRegularControlSize]; } -+ (float) scrollerWidthForControlSize: (NSControlSize)controlSize ++ (CGFloat) scrollerWidthForControlSize: (NSControlSize)controlSize { // FIXME if (scrollerWidth == 0.0) @@ -159,7 +159,7 @@ static float buttonsOffset = 1.0; // buttonsWidth = sw - 2*buttonsOffset /**

Returns a float value ( between 0.0 and 1.0 ) indicating the ratio between the NSScroller length and the knob length

*/ -- (float) knobProportion +- (CGFloat) knobProportion { return _knobProportion; } @@ -1226,7 +1226,7 @@ static float buttonsOffset = 1.0; // buttonsWidth = sw - 2*buttonsOffset { case NSScrollerKnob: { - float knobHeight, knobPosition, slotHeight; + CGFloat knobHeight, knobPosition, slotHeight; if (usableParts == NSNoScrollerParts || usableParts == NSOnlyScrollerArrows) diff --git a/Source/NSSearchField.m b/Source/NSSearchField.m index 122b032c3..6e3b9a695 100644 --- a/Source/NSSearchField.m +++ b/Source/NSSearchField.m @@ -114,7 +114,7 @@ static Class usedCellClass; [[self cell] setSendsSearchStringImmediately: flag]; } -- (void) setMaximumRecents: (int)max +- (void) setMaximumRecents: (NSInteger)max { [[self cell] setMaximumRecents: max]; }