Replace some occurences of int with NSInteger

and unsigned with NSUInteger. This allows to recompile gui on 
64 bit systems after the change to NSNotFound in base.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@34312 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
fredkiefer 2011-12-17 17:16:09 +00:00
parent d648b7ca14
commit ccf59ac3ca
35 changed files with 248 additions and 214 deletions

View file

@ -1,3 +1,37 @@
2011-12-17 Fred Kiefer <FredKiefer@gmx.de>
* Headers/AppKit/NSSliderCell.h
* Headers/AppKit/NSLevelIndicator.h
* Headers/AppKit/NSButtonCell.h
* Headers/AppKit/NSButton.h
* Headers/AppKit/NSMenuItem.h
* Headers/AppKit/NSLevelIndicatorCell.h
* Headers/AppKit/NSSlider.h
* Headers/AppKit/NSTabView.h
* Headers/AppKit/NSCell.h
* Source/NSSliderCell.m
* Source/NSLevelIndicator.m
* Source/NSButtonCell.m
* Source/NSButton.m
* Source/NSMenu.m
* Source/NSMenuItem.m
* Source/NSLevelIndicatorCell.m
* Source/GSToolbarView.m
* Source/NSComboBoxCell.m
* Source/NSToolbarItem.m
* Source/NSSlider.m
* Source/NSTabView.m
* Source/NSCell.m
* Source/NSWindow.m
* Source/NSDocumentController.m
* Source/NSTableView.m
* Source/NSOutlineView.m
* Source/NSParagraphStyle.m
* Source/NSPopUpButtonCell.m
* Source/NSView.m: Replace some occurences of int with NSInteger
and unsigned with NSUInteger. This allows to recompile gui on 64
bit systems after the change in base to NSNotFound.
2011-12-16 Riccardo Mottola <rm@gnu.org> 2011-12-16 Riccardo Mottola <rm@gnu.org>
* Panels/English.lproj/GSPrintPanel.gorm * Panels/English.lproj/GSPrintPanel.gorm

View file

@ -110,7 +110,7 @@
NSColor *c = [color colorUsingColorSpaceName: NSNamedColorSpace]; NSColor *c = [color colorUsingColorSpaceName: NSNamedColorSpace];
NSString *list; NSString *list;
NSString *name; NSString *name;
unsigned int index; NSUInteger index;
if (c == nil) if (c == nil)
return; return;

View file

@ -49,15 +49,15 @@
// //
- (void)setButtonType:(NSButtonType)aType; - (void)setButtonType:(NSButtonType)aType;
#if OS_API_VERSION(GS_API_MACOSX, GS_API_LATEST) #if OS_API_VERSION(GS_API_MACOSX, GS_API_LATEST)
- (void)setHighlightsBy:(int)aType; - (void)setHighlightsBy:(NSInteger)aType;
- (void)setShowsStateBy:(int)aType; - (void)setShowsStateBy:(NSInteger)aType;
#endif #endif
// //
// Setting the State // Setting the State
// //
- (void)setState:(int)value; - (void)setState:(NSInteger)value;
- (int)state; - (NSInteger)state;
- (BOOL)allowsMixedState; - (BOOL)allowsMixedState;
- (void)setAllowsMixedState: (BOOL)flag; - (void)setAllowsMixedState: (BOOL)flag;
- (void)setNextState; - (void)setNextState;
@ -118,9 +118,9 @@
// Setting the Key Equivalent // Setting the Key Equivalent
// //
- (NSString *)keyEquivalent; - (NSString *)keyEquivalent;
- (unsigned int)keyEquivalentModifierMask; - (NSUInteger)keyEquivalentModifierMask;
- (void)setKeyEquivalent:(NSString *)aKeyEquivalent; - (void)setKeyEquivalent:(NSString *)aKeyEquivalent;
- (void)setKeyEquivalentModifierMask:(unsigned int)mask; - (void)setKeyEquivalentModifierMask:(NSUInteger)mask;
// //
// Handling Events and Action Messages // Handling Events and Action Messages

View file

@ -123,9 +123,9 @@ typedef enum _NSGradientType {
NSString *_keyEquivalent; NSString *_keyEquivalent;
NSFont *_keyEquivalentFont; NSFont *_keyEquivalentFont;
NSSound *_sound; NSSound *_sound;
unsigned int _keyEquivalentModifierMask; NSUInteger _keyEquivalentModifierMask;
unsigned int _highlightsByMask; NSInteger _highlightsByMask;
unsigned int _showAltStateMask; NSInteger _showAltStateMask;
float _delayInterval; float _delayInterval;
float _repeatInterval; float _repeatInterval;
NSBezelStyle _bezel_style; NSBezelStyle _bezel_style;
@ -154,8 +154,8 @@ typedef enum _NSGradientType {
- (void)setAttributedTitle: (NSAttributedString *)aString; - (void)setAttributedTitle: (NSAttributedString *)aString;
- (void)setTitleWithMnemonic: (NSString *)aString; - (void)setTitleWithMnemonic: (NSString *)aString;
- (NSString *)alternateMnemonic; - (NSString *)alternateMnemonic;
- (unsigned)alternateMnemonicLocation; - (NSUInteger)alternateMnemonicLocation;
- (void)setAlternateMnemonicLocation: (unsigned)location; - (void)setAlternateMnemonicLocation: (NSUInteger)location;
- (void)setAlternateTitleWithMnemonic: (NSString *)aString; - (void)setAlternateTitleWithMnemonic: (NSString *)aString;
#endif #endif
@ -184,9 +184,9 @@ typedef enum _NSGradientType {
// //
- (NSString *)keyEquivalent; - (NSString *)keyEquivalent;
- (NSFont *)keyEquivalentFont; - (NSFont *)keyEquivalentFont;
- (unsigned int)keyEquivalentModifierMask; - (NSUInteger)keyEquivalentModifierMask;
- (void)setKeyEquivalent: (NSString *)key; - (void)setKeyEquivalent: (NSString *)key;
- (void)setKeyEquivalentModifierMask: (unsigned int)mask; - (void)setKeyEquivalentModifierMask: (NSUInteger)mask;
- (void)setKeyEquivalentFont: (NSFont *)fontObj; - (void)setKeyEquivalentFont: (NSFont *)fontObj;
- (void)setKeyEquivalentFont: (NSString *)fontName - (void)setKeyEquivalentFont: (NSString *)fontName
size: (float)fontSize; size: (float)fontSize;
@ -221,11 +221,11 @@ typedef enum _NSGradientType {
// //
// Modifying Graphic Attributes // Modifying Graphic Attributes
// //
- (int)highlightsBy; - (NSInteger)highlightsBy;
- (void)setHighlightsBy: (int)mask; - (void)setHighlightsBy: (NSInteger)mask;
- (void)setShowsStateBy: (int)mask; - (void)setShowsStateBy: (NSInteger)mask;
- (void)setButtonType: (NSButtonType)buttonType; - (void)setButtonType: (NSButtonType)buttonType;
- (int)showsStateBy; - (NSInteger)showsStateBy;
// //
// Sound // Sound

View file

@ -267,11 +267,11 @@ typedef enum {
// //
// Setting the NSCell's State // Setting the NSCell's State
// //
- (void)setState:(int)value; - (void)setState:(NSInteger)value;
- (int)state; - (NSInteger)state;
- (BOOL)allowsMixedState; - (BOOL)allowsMixedState;
- (void)setAllowsMixedState:(BOOL)flag; - (void)setAllowsMixedState:(BOOL)flag;
- (int)nextState; - (NSInteger)nextState;
- (void)setNextState; - (void)setNextState;
// //
@ -378,8 +378,8 @@ typedef enum {
- (BOOL)showsFirstResponder; - (BOOL)showsFirstResponder;
- (void)setTitleWithMnemonic:(NSString *)aString; - (void)setTitleWithMnemonic:(NSString *)aString;
- (NSString *)mnemonic; - (NSString *)mnemonic;
- (void)setMnemonicLocation:(unsigned int)location; - (void)setMnemonicLocation:(NSUInteger)location;
- (unsigned int)mnemonicLocation; - (NSUInteger)mnemonicLocation;
- (BOOL)refusesFirstResponder; - (BOOL)refusesFirstResponder;
- (void)setRefusesFirstResponder:(BOOL)flag; - (void)setRefusesFirstResponder:(BOOL)flag;

View file

@ -49,14 +49,14 @@
- (double) criticalValue; - (double) criticalValue;
- (void) setCriticalValue: (double) val; - (void) setCriticalValue: (double) val;
- (int) numberOfMajorTickMarks; - (NSInteger) numberOfMajorTickMarks;
- (int) numberOfTickMarks; - (NSInteger) numberOfTickMarks;
- (NSRect) rectOfTickMarkAtIndex: (int)index; - (NSRect) rectOfTickMarkAtIndex: (NSInteger)index;
- (void) setNumberOfMajorTickMarks: (int)count; - (void) setNumberOfMajorTickMarks: (NSInteger)count;
- (void) setNumberOfTickMarks: (int)count; - (void) setNumberOfTickMarks: (NSInteger)count;
- (void) setTickMarkPosition: (NSTickMarkPosition)pos; - (void) setTickMarkPosition: (NSTickMarkPosition)pos;
- (NSTickMarkPosition) tickMarkPosition; - (NSTickMarkPosition) tickMarkPosition;
- (double) tickMarkValueAtIndex: (int)index; - (double) tickMarkValueAtIndex: (NSInteger)index;
@end @end

View file

@ -50,8 +50,8 @@ typedef enum _NSLevelIndicatorStyle
double _maxValue; double _maxValue;
double _warningValue; double _warningValue;
double _criticalValue; double _criticalValue;
int _numberOfMajorTickMarks; NSInteger _numberOfMajorTickMarks;
int _numberOfTickMarks; NSInteger _numberOfTickMarks;
NSLevelIndicatorStyle _style; NSLevelIndicatorStyle _style;
NSTickMarkPosition _tickMarkPosition; NSTickMarkPosition _tickMarkPosition;
NSRect _cellFrame; NSRect _cellFrame;
@ -72,14 +72,14 @@ typedef enum _NSLevelIndicatorStyle
- (NSLevelIndicatorStyle)style; - (NSLevelIndicatorStyle)style;
- (void)setLevelIndicatorStyle:(NSLevelIndicatorStyle)style; - (void)setLevelIndicatorStyle:(NSLevelIndicatorStyle)style;
- (int)numberOfMajorTickMarks; - (NSInteger)numberOfMajorTickMarks;
- (void)setNumberOfMajorTickMarks:(int)count; - (void)setNumberOfMajorTickMarks:(NSInteger)count;
- (int)numberOfTickMarks; - (NSInteger)numberOfTickMarks;
- (void)setNumberOfTickMarks:(int)count; - (void)setNumberOfTickMarks:(NSInteger)count;
- (NSTickMarkPosition)tickMarkPosition; - (NSTickMarkPosition)tickMarkPosition;
- (void)setTickMarkPosition:(NSTickMarkPosition) pos; - (void)setTickMarkPosition:(NSTickMarkPosition) pos;
- (double)tickMarkValueAtIndex:(int)index; - (double)tickMarkValueAtIndex:(NSInteger)index;
- (NSRect)rectOfTickMarkAtIndex:(int)index; - (NSRect)rectOfTickMarkAtIndex:(NSInteger)index;
@end @end

View file

@ -152,7 +152,7 @@
Returns the key equivalent mask. Returns the key equivalent mask.
</p> </p>
*/ */
- (unsigned int) keyEquivalentModifierMask; - (NSUInteger) keyEquivalentModifierMask;
/** /**
<p> <p>
@ -168,7 +168,7 @@
*/ */
- (NSImage*) mixedStateImage; - (NSImage*) mixedStateImage;
- (NSString*) mnemonic; - (NSString*) mnemonic;
- (unsigned) mnemonicLocation; - (NSUInteger) mnemonicLocation;
/** /**
<p> <p>
@ -235,7 +235,7 @@
key equivalent requires ALT, Control or other key modifiers. key equivalent requires ALT, Control or other key modifiers.
</p> </p>
*/ */
- (void) setKeyEquivalentModifierMask: (unsigned int)mask; - (void) setKeyEquivalentModifierMask: (NSUInteger)mask;
/** /**
<p> Sets the menu which this item belongs to. This method does not retain the <p> Sets the menu which this item belongs to. This method does not retain the
@ -250,7 +250,7 @@
</p> </p>
*/ */
- (void) setMixedStateImage: (NSImage*)image; - (void) setMixedStateImage: (NSImage*)image;
- (void) setMnemonicLocation: (unsigned) location; - (void) setMnemonicLocation: (NSUInteger) location;
/** /**
<p> <p>
@ -278,7 +278,7 @@
Sets the state of the the receiver. Sets the state of the the receiver.
</p> </p>
*/ */
- (void) setState: (int)state; - (void) setState: (NSInteger)state;
/** /**
<p> <p>
@ -319,7 +319,7 @@
Returns the state of the receiver. Returns the state of the receiver.
</p> </p>
*/ */
- (int) state; - (NSInteger) state;
/** /**
<p> <p>
Returns the attached submenu. Returns the attached submenu.
@ -357,7 +357,7 @@
Returns the user defined key equivalent modifier. Returns the user defined key equivalent modifier.
</p> </p>
*/ */
- (unsigned int) userKeyEquivalentModifierMask; - (NSUInteger) userKeyEquivalentModifierMask;
/** /**
<p> <p>
@ -373,16 +373,16 @@
NSMenu *_menu; NSMenu *_menu;
NSString *_title; NSString *_title;
NSString *_keyEquivalent; NSString *_keyEquivalent;
unsigned int _keyEquivalentModifierMask; NSUInteger _keyEquivalentModifierMask;
unsigned _mnemonicLocation; NSUInteger _mnemonicLocation;
int _state; NSInteger _state;
NSImage *_image; NSImage *_image;
NSImage *_onStateImage; NSImage *_onStateImage;
NSImage *_offStateImage; NSImage *_offStateImage;
NSImage *_mixedStateImage; NSImage *_mixedStateImage;
id _target; id _target;
SEL _action; SEL _action;
int _tag; NSInteger _tag;
id _representedObject; id _representedObject;
NSMenu *_submenu; NSMenu *_submenu;
BOOL _enabled; BOOL _enabled;

View file

@ -71,14 +71,14 @@
// ticks // ticks
- (BOOL) allowsTickMarkValuesOnly; - (BOOL) allowsTickMarkValuesOnly;
- (double) closestTickMarkValueToValue: (double)aValue; - (double) closestTickMarkValueToValue: (double)aValue;
- (int) indexOfTickMarkAtPoint: (NSPoint)point; - (NSInteger) indexOfTickMarkAtPoint: (NSPoint)point;
- (int) numberOfTickMarks; - (NSInteger) numberOfTickMarks;
- (NSRect) rectOfTickMarkAtIndex: (int)index; - (NSRect) rectOfTickMarkAtIndex: (NSInteger)index;
- (void) setAllowsTickMarkValuesOnly: (BOOL)flag; - (void) setAllowsTickMarkValuesOnly: (BOOL)flag;
- (void) setNumberOfTickMarks: (int)numberOfTickMarks; - (void) setNumberOfTickMarks: (NSInteger)numberOfTickMarks;
- (void) setTickMarkPosition: (NSTickMarkPosition)position; - (void) setTickMarkPosition: (NSTickMarkPosition)position;
- (NSTickMarkPosition) tickMarkPosition; - (NSTickMarkPosition) tickMarkPosition;
- (double) tickMarkValueAtIndex: (int)index; - (double) tickMarkValueAtIndex: (NSInteger)index;
#endif #endif
@end @end

View file

@ -59,7 +59,7 @@ typedef enum _NSSliderType
NSRect _trackRect; NSRect _trackRect;
BOOL _isVertical; BOOL _isVertical;
BOOL _allowsTickMarkValuesOnly; BOOL _allowsTickMarkValuesOnly;
int _numberOfTickMarks; NSInteger _numberOfTickMarks;
NSTickMarkPosition _tickMarkPosition; NSTickMarkPosition _tickMarkPosition;
NSSliderType _type; NSSliderType _type;
} }
@ -107,14 +107,14 @@ typedef enum _NSSliderType
// ticks // ticks
- (BOOL) allowsTickMarkValuesOnly; - (BOOL) allowsTickMarkValuesOnly;
- (double) closestTickMarkValueToValue: (double)aValue; - (double) closestTickMarkValueToValue: (double)aValue;
- (int) indexOfTickMarkAtPoint: (NSPoint)point; - (NSInteger) indexOfTickMarkAtPoint: (NSPoint)point;
- (int) numberOfTickMarks; - (NSInteger) numberOfTickMarks;
- (NSRect) rectOfTickMarkAtIndex: (int)index; - (NSRect) rectOfTickMarkAtIndex: (NSInteger)index;
- (void) setAllowsTickMarkValuesOnly: (BOOL)flag; - (void) setAllowsTickMarkValuesOnly: (BOOL)flag;
- (void) setNumberOfTickMarks: (int)numberOfTickMarks; - (void) setNumberOfTickMarks: (NSInteger)numberOfTickMarks;
- (void) setTickMarkPosition: (NSTickMarkPosition)position; - (void) setTickMarkPosition: (NSTickMarkPosition)position;
- (NSTickMarkPosition) tickMarkPosition; - (NSTickMarkPosition) tickMarkPosition;
- (double) tickMarkValueAtIndex: (int)index; - (double) tickMarkValueAtIndex: (NSInteger)index;
#endif #endif
@end @end

View file

@ -54,17 +54,17 @@ typedef enum {
BOOL _draws_background; BOOL _draws_background;
BOOL _truncated_label; BOOL _truncated_label;
id _delegate; id _delegate;
int _selected_item; NSInteger _selected_item;
} }
- (void)addTabViewItem:(NSTabViewItem *)tabViewItem; - (void)addTabViewItem:(NSTabViewItem *)tabViewItem;
- (void)insertTabViewItem:(NSTabViewItem *)tabViewItem - (void)insertTabViewItem:(NSTabViewItem *)tabViewItem
atIndex:(int)index; atIndex:(NSInteger)index;
- (void)removeTabViewItem:(NSTabViewItem *)tabViewItem; - (void)removeTabViewItem:(NSTabViewItem *)tabViewItem;
- (int)indexOfTabViewItem:(NSTabViewItem *)tabViewItem; - (NSInteger)indexOfTabViewItem:(NSTabViewItem *)tabViewItem;
- (int)indexOfTabViewItemWithIdentifier:(id)identifier; - (NSInteger)indexOfTabViewItemWithIdentifier:(id)identifier;
- (int)numberOfTabViewItems; - (NSInteger)numberOfTabViewItems;
- (NSTabViewItem *)tabViewItemAtIndex:(int)index; - (NSTabViewItem *)tabViewItemAtIndex:(NSInteger)index;
- (NSArray *)tabViewItems; - (NSArray *)tabViewItems;
- (void)selectFirstTabViewItem:(id)sender; - (void)selectFirstTabViewItem:(id)sender;
@ -72,7 +72,7 @@ typedef enum {
- (void)selectNextTabViewItem:(id)sender; - (void)selectNextTabViewItem:(id)sender;
- (void)selectPreviousTabViewItem:(id)sender; - (void)selectPreviousTabViewItem:(id)sender;
- (void)selectTabViewItem:(NSTabViewItem *)tabViewItem; - (void)selectTabViewItem:(NSTabViewItem *)tabViewItem;
- (void)selectTabViewItemAtIndex:(int)index; - (void)selectTabViewItemAtIndex:(NSInteger)index;
- (void)selectTabViewItemWithIdentifier:(id)identifier; - (void)selectTabViewItemWithIdentifier:(id)identifier;
- (void)takeSelectedTabViewItemFromSender:(id)sender; - (void)takeSelectedTabViewItemFromSender:(id)sender;
- (NSTabViewItem*) selectedTabViewItem; - (NSTabViewItem*) selectedTabViewItem;

View file

@ -1604,7 +1604,7 @@ static BOOL _isInInterfaceBuilder = NO;
- (void) instantiateWithInstantiator: (id<GSInstantiator>)instantiator - (void) instantiateWithInstantiator: (id<GSInstantiator>)instantiator
{ {
NSRange colonRange = [_tag rangeOfString: @":"]; NSRange colonRange = [_tag rangeOfString: @":"];
unsigned int location = colonRange.location; NSUInteger location = colonRange.location;
if (location == NSNotFound) if (location == NSNotFound)
{ {
@ -2024,7 +2024,7 @@ static BOOL _isInInterfaceBuilder = NO;
{ {
NSArray *nameKeys = (NSArray *)NSAllMapTableKeys(_names); NSArray *nameKeys = (NSArray *)NSAllMapTableKeys(_names);
NSArray *nameValues = (NSArray *)NSAllMapTableValues(_names); NSArray *nameValues = (NSArray *)NSAllMapTableValues(_names);
int i = [nameValues indexOfObject: name]; NSUInteger i = [nameValues indexOfObject: name];
id result = nil; id result = nil;
if (i != NSNotFound) if (i != NSNotFound)

View file

@ -556,7 +556,7 @@ typedef struct {
forName: @"GSThemeDomain"]; forName: @"GSThemeDomain"];
if ([searchList containsObject: @"GSThemeDomain"] == NO) if ([searchList containsObject: @"GSThemeDomain"] == NO)
{ {
unsigned index; NSUInteger index;
/* /*
* Higher priority than GSConfigDomain and NSRegistrationDomain, * Higher priority than GSConfigDomain and NSRegistrationDomain,

View file

@ -2498,9 +2498,9 @@ static NSDictionary *titleTextAttributes[3] = {nil, nil, nil};
if (selectingColumns == NO) if (selectingColumns == NO)
{ {
int selectedRowsCount; NSInteger selectedRowsCount;
int row; NSUInteger row;
int startingRow, endingRow; NSInteger startingRow, endingRow;
selectedRowsCount = [selectedRows count]; selectedRowsCount = [selectedRows count];
if (selectedRowsCount == 0) if (selectedRowsCount == 0)
@ -2542,9 +2542,9 @@ static NSDictionary *titleTextAttributes[3] = {nil, nil, nil};
} }
else // Selecting columns else // Selecting columns
{ {
unsigned int selectedColumnsCount; NSUInteger selectedColumnsCount;
unsigned int column; NSUInteger column;
int startingColumn, endingColumn; NSInteger startingColumn, endingColumn;
selectedColumnsCount = [selectedColumns count]; selectedColumnsCount = [selectedColumns count];

View file

@ -66,7 +66,7 @@ static const int ClippedItemsViewWidth = 28;
// Internal // Internal
static const int current_version = 1; static const int current_version = 1;
static int draggedItemIndex = NSNotFound; static NSInteger draggedItemIndex = NSNotFound;
/* /*
* Toolbar related code * Toolbar related code
@ -341,7 +341,7 @@ static int draggedItemIndex = NSNotFound;
if (![item allowsDuplicatesInToolbar]) if (![item allowsDuplicatesInToolbar])
{ {
NSArray *items = [toolbar items]; NSArray *items = [toolbar items];
int index; NSInteger index;
for (index=0; index<[items count]; index++) for (index=0; index<[items count]; index++)
{ {
NSToolbarItem *anItem = [items objectAtIndex:index]; NSToolbarItem *anItem = [items objectAtIndex:index];

View file

@ -234,10 +234,10 @@
{ {
NSString *tag = [self label]; NSString *tag = [self label];
NSRange colonRange = [tag rangeOfString: @":"]; NSRange colonRange = [tag rangeOfString: @":"];
unsigned int location = colonRange.location; NSUInteger location = colonRange.location;
NSNibConnector *result = nil; NSNibConnector *result = nil;
if(location == NSNotFound) if (location == NSNotFound)
{ {
result = [[NSNibOutletConnector alloc] init]; result = [[NSNibOutletConnector alloc] init];
} }

View file

@ -99,12 +99,12 @@ static id buttonCellClass = nil;
[self setNeedsDisplay: YES]; [self setNeedsDisplay: YES];
} }
- (void)setHighlightsBy:(int)aType - (void)setHighlightsBy:(NSInteger)aType
{ {
[_cell setHighlightsBy:aType]; [_cell setHighlightsBy:aType];
} }
- (void)setShowsStateBy:(int)aType - (void)setShowsStateBy:(NSInteger)aType
{ {
[_cell setShowsStateBy:aType]; [_cell setShowsStateBy:aType];
} }
@ -130,7 +130,7 @@ static id buttonCellClass = nil;
/**<p>Sets the NSButtonCell's state to <var>value</var> and marks /**<p>Sets the NSButtonCell's state to <var>value</var> and marks
self for display.</p><p>See Also: -state [NSButtonCell-setState:]</p> self for display.</p><p>See Also: -state [NSButtonCell-setState:]</p>
*/ */
- (void) setState: (int)value - (void) setState: (NSInteger)value
{ {
[_cell setState: value]; [_cell setState: value];
[self setNeedsDisplay: YES]; [self setNeedsDisplay: YES];
@ -139,7 +139,7 @@ static id buttonCellClass = nil;
/** <p>Returns the NSButtonCell's state.</p> /** <p>Returns the NSButtonCell's state.</p>
<p>See Also: -setState: [NSButtonCell-state]</p> <p>See Also: -setState: [NSButtonCell-state]</p>
*/ */
- (int) state - (NSInteger) state
{ {
return [_cell state]; return [_cell state];
} }
@ -410,7 +410,7 @@ static id buttonCellClass = nil;
NSCommandKeyMask.</p><p>See Also: -setKeyEquivalentModifierMask: NSCommandKeyMask.</p><p>See Also: -setKeyEquivalentModifierMask:
-keyEquivalent [NSButtonCell-setKeyEquivalentModifierMask:]</p> -keyEquivalent [NSButtonCell-setKeyEquivalentModifierMask:]</p>
*/ */
- (unsigned int) keyEquivalentModifierMask - (NSUInteger) keyEquivalentModifierMask
{ {
return [_cell keyEquivalentModifierMask]; return [_cell keyEquivalentModifierMask];
} }
@ -434,7 +434,7 @@ static id buttonCellClass = nil;
-setKeyEquivalent: -performKeyEquivalent: -setKeyEquivalent: -performKeyEquivalent:
[NSButtonCell-setKeyEquivalentModifierMask:]</p> [NSButtonCell-setKeyEquivalentModifierMask:]</p>
*/ */
- (void) setKeyEquivalentModifierMask: (unsigned int)mask - (void) setKeyEquivalentModifierMask: (NSUInteger)mask
{ {
[_cell setKeyEquivalentModifierMask: mask]; [_cell setKeyEquivalentModifierMask: mask];
} }
@ -515,9 +515,9 @@ static id buttonCellClass = nil;
if ([keyEquivalent length] > 0 && [keyEquivalent isEqualToString: [anEvent charactersIgnoringModifiers]]) if ([keyEquivalent length] > 0 && [keyEquivalent isEqualToString: [anEvent charactersIgnoringModifiers]])
{ {
unsigned int mask = [self keyEquivalentModifierMask]; NSUInteger mask = [self keyEquivalentModifierMask];
unsigned int modifiers = [anEvent modifierFlags]; NSUInteger modifiers = [anEvent modifierFlags];
unsigned int relevantModifiersMask = NSCommandKeyMask | NSAlternateKeyMask | NSControlKeyMask; NSUInteger relevantModifiersMask = NSCommandKeyMask | NSAlternateKeyMask | NSControlKeyMask;
/* Take shift key into account only for control keys and arrow and function keys */ /* Take shift key into account only for control keys and arrow and function keys */
if ((modifiers & NSFunctionKeyMask) if ((modifiers & NSFunctionKeyMask)
|| [[NSCharacterSet controlCharacterSet] characterIsMember:[keyEquivalent characterAtIndex:0]]) || [[NSCharacterSet controlCharacterSet] characterIsMember:[keyEquivalent characterAtIndex:0]])

View file

@ -449,20 +449,20 @@ typedef struct _GSButtonCellFlags
return @""; return @"";
} }
- (unsigned)alternateMnemonicLocation - (NSUInteger)alternateMnemonicLocation
{ {
// TODO // TODO
return NSNotFound; return NSNotFound;
} }
- (void)setAlternateMnemonicLocation:(unsigned)location - (void)setAlternateMnemonicLocation:(NSUInteger)location
{ {
// TODO // TODO
} }
- (void)setAlternateTitleWithMnemonic:(NSString *)aString - (void)setAlternateTitleWithMnemonic:(NSString *)aString
{ {
unsigned int location = [aString rangeOfString: @"&"].location; NSUInteger location = [aString rangeOfString: @"&"].location;
[self setAlternateTitle: [aString stringByReplacingString: @"&" [self setAlternateTitle: [aString stringByReplacingString: @"&"
withString: @""]]; withString: @""]];
@ -616,7 +616,7 @@ typedef struct _GSButtonCellFlags
0.</p><p>See Also: -setKeyEquivalentModifierMask: 0.</p><p>See Also: -setKeyEquivalentModifierMask:
-keyEquivalent [NSButton-performKeyEquivalent:]</p> -keyEquivalent [NSButton-performKeyEquivalent:]</p>
*/ */
- (unsigned int) keyEquivalentModifierMask - (NSUInteger) keyEquivalentModifierMask
{ {
return _keyEquivalentModifierMask; return _keyEquivalentModifierMask;
} }
@ -639,7 +639,7 @@ typedef struct _GSButtonCellFlags
<p>See Also: -keyEquivalentModifierMask <p>See Also: -keyEquivalentModifierMask
-setKeyEquivalent: [NSButton-performKeyEquivalent:]</p> -setKeyEquivalent: [NSButton-performKeyEquivalent:]</p>
*/ */
- (void) setKeyEquivalentModifierMask: (unsigned int)mask - (void) setKeyEquivalentModifierMask: (NSUInteger)mask
{ {
_keyEquivalentModifierMask = mask; _keyEquivalentModifierMask = mask;
} }
@ -738,7 +738,7 @@ typedef struct _GSButtonCellFlags
NSChangeBackgroundCellMask</p> NSChangeBackgroundCellMask</p>
<p>See Also : -setHighlightsBy:</p> <p>See Also : -setHighlightsBy:</p>
*/ */
- (int) highlightsBy - (NSInteger) highlightsBy
{ {
return _highlightsByMask; return _highlightsByMask;
} }
@ -748,12 +748,12 @@ typedef struct _GSButtonCellFlags
NSChangeBackgroundCellMask</p> NSChangeBackgroundCellMask</p>
<p>See Also : -highlightsBy</p> <p>See Also : -highlightsBy</p>
*/ */
- (void) setHighlightsBy: (int)mask - (void) setHighlightsBy: (NSInteger)mask
{ {
_highlightsByMask = mask; _highlightsByMask = mask;
} }
- (void) setShowsStateBy: (int)mask - (void) setShowsStateBy: (NSInteger)mask
{ {
_showAltStateMask = mask; _showAltStateMask = mask;
} }
@ -819,7 +819,7 @@ typedef struct _GSButtonCellFlags
} }
} }
- (int) showsStateBy - (NSInteger) showsStateBy
{ {
return _showAltStateMask; return _showAltStateMask;
} }

View file

@ -779,7 +779,7 @@ static NSColor *dtxtCol;
implementation. (Currently they match the Cocoa values but they are implementation. (Currently they match the Cocoa values but they are
quite strange)</p> <p>See Also: -state</p> quite strange)</p> <p>See Also: -state</p>
*/ */
- (void) setState: (int)value - (void) setState: (NSInteger)value
{ {
/* We do exactly as in macosx when value is not NSOnState, /* We do exactly as in macosx when value is not NSOnState,
* NSOffState, NSMixedState, even if their behaviour (value < 0 ==> * NSOffState, NSMixedState, even if their behaviour (value < 0 ==>
@ -804,7 +804,7 @@ static NSColor *dtxtCol;
/**<p>Returns the NSCell's state</p> /**<p>Returns the NSCell's state</p>
<p>See Also: -setState: </p> <p>See Also: -setState: </p>
*/ */
- (int) state - (NSInteger) state
{ {
return _cell.state; return _cell.state;
} }
@ -823,7 +823,7 @@ static NSColor *dtxtCol;
} }
} }
- (int) nextState - (NSInteger) nextState
{ {
switch (_cell.state) switch (_cell.state)
{ {
@ -1390,7 +1390,7 @@ static NSColor *dtxtCol;
- (NSString*) mnemonic - (NSString*) mnemonic
{ {
unsigned int location = [self mnemonicLocation]; NSUInteger location = [self mnemonicLocation];
NSString *c = [self title]; NSString *c = [self title];
if ((location == NSNotFound) || location >= [c length]) if ((location == NSNotFound) || location >= [c length])
@ -1399,12 +1399,12 @@ static NSColor *dtxtCol;
return [c substringWithRange: NSMakeRange (location, 1)]; return [c substringWithRange: NSMakeRange (location, 1)];
} }
- (void) setMnemonicLocation: (unsigned int)location - (void) setMnemonicLocation: (NSUInteger)location
{ {
_cell.mnemonic_location = location; _cell.mnemonic_location = location;
} }
- (unsigned int) mnemonicLocation - (NSUInteger) mnemonicLocation
{ {
return _cell.mnemonic_location; return _cell.mnemonic_location;
} }

View file

@ -1095,7 +1095,7 @@ static GSComboWindow *gsWindow = nil;
} }
else else
{ {
int i = [_popUpList indexOfObject: object]; NSInteger i = [_popUpList indexOfObject: object];
if (i == NSNotFound) if (i == NSNotFound)
i = -1; i = -1;
@ -1850,7 +1850,7 @@ static inline NSRect buttonCellFrameFromRect(NSRect cellRect)
- (void) _selectCompleted - (void) _selectCompleted
{ {
NSString *more; NSString *more;
unsigned int index = NSNotFound; NSUInteger index = NSNotFound;
more = [self completedString: [self stringValue]]; more = [self completedString: [self stringValue]];
if (_usesDataSource) if (_usesDataSource)

View file

@ -1346,7 +1346,7 @@ static BOOL _shouldClose = YES;
- (void) noteNewRecentDocumentURL: (NSURL *)anURL - (void) noteNewRecentDocumentURL: (NSURL *)anURL
{ {
unsigned index = [_recent_documents indexOfObject: anURL]; NSUInteger index = [_recent_documents indexOfObject: anURL];
NSMutableArray *a; NSMutableArray *a;
if (index != NSNotFound) if (index != NSNotFound)

View file

@ -103,22 +103,22 @@ static Class cellClass;
[_cell setCriticalValue: val]; [_cell setCriticalValue: val];
} }
- (int) numberOfMajorTickMarks - (NSInteger) numberOfMajorTickMarks
{ {
return [_cell numberOfMajorTickMarks]; return [_cell numberOfMajorTickMarks];
} }
- (void) setNumberOfMajorTickMarks: (int)count - (void) setNumberOfMajorTickMarks: (NSInteger)count
{ {
[_cell setNumberOfMajorTickMarks: count]; [_cell setNumberOfMajorTickMarks: count];
} }
- (int) numberOfTickMarks - (NSInteger) numberOfTickMarks
{ {
return [_cell numberOfTickMarks]; return [_cell numberOfTickMarks];
} }
- (void) setNumberOfTickMarks: (int)count - (void) setNumberOfTickMarks: (NSInteger)count
{ {
[_cell setNumberOfTickMarks: count]; [_cell setNumberOfTickMarks: count];
} }
@ -133,12 +133,12 @@ static Class cellClass;
[_cell setTickMarkPosition:pos]; [_cell setTickMarkPosition:pos];
} }
- (double) tickMarkValueAtIndex: (int)index - (double) tickMarkValueAtIndex: (NSInteger)index
{ {
return [_cell tickMarkValueAtIndex:index]; return [_cell tickMarkValueAtIndex:index];
} }
- (NSRect) rectOfTickMarkAtIndex: (int)index - (NSRect) rectOfTickMarkAtIndex: (NSInteger)index
{ {
return [_cell rectOfTickMarkAtIndex:index]; return [_cell rectOfTickMarkAtIndex:index];
} }

View file

@ -127,22 +127,22 @@
_style = style; _style = style;
} }
- (int) numberOfMajorTickMarks - (NSInteger) numberOfMajorTickMarks
{ {
return _numberOfMajorTickMarks; return _numberOfMajorTickMarks;
} }
- (void) setNumberOfMajorTickMarks: (int)count - (void) setNumberOfMajorTickMarks: (NSInteger)count
{ {
_numberOfMajorTickMarks = count; _numberOfMajorTickMarks = count;
} }
- (int) numberOfTickMarks - (NSInteger) numberOfTickMarks
{ {
return _numberOfTickMarks; return _numberOfTickMarks;
} }
- (void) setNumberOfTickMarks: (int)count - (void) setNumberOfTickMarks: (NSInteger)count
{ {
_numberOfTickMarks = count; _numberOfTickMarks = count;
} }
@ -157,7 +157,7 @@
_tickMarkPosition = pos; _tickMarkPosition = pos;
} }
- (double) tickMarkValueAtIndex: (int)index - (double) tickMarkValueAtIndex: (NSInteger)index
{ {
if ((index < 0) || (index >= _numberOfTickMarks)) if ((index < 0) || (index >= _numberOfTickMarks))
{ {
@ -168,7 +168,7 @@
return _minValue + index * (_maxValue - _minValue) / _numberOfTickMarks; return _minValue + index * (_maxValue - _minValue) / _numberOfTickMarks;
} }
- (NSRect) rectOfTickMarkAtIndex: (int)index - (NSRect) rectOfTickMarkAtIndex: (NSInteger)index
{ {
NSRect cellRect = NSZeroRect; NSRect cellRect = NSZeroRect;
float frameWidth = _cellFrame.size.width; float frameWidth = _cellFrame.size.width;
@ -193,7 +193,7 @@
// If major tick marks fit with even spacing // If major tick marks fit with even spacing
else if ((_numberOfTickMarks -1) % (_numberOfMajorTickMarks - 1) == 0) else if ((_numberOfTickMarks -1) % (_numberOfMajorTickMarks - 1) == 0)
{ {
int minorTicksPerMajor = (_numberOfTickMarks - 1) / (_numberOfMajorTickMarks - 1); NSInteger minorTicksPerMajor = (_numberOfTickMarks - 1) / (_numberOfMajorTickMarks - 1);
// If index is a major tick mark // If index is a major tick mark
if (index % minorTicksPerMajor == 0) if (index % minorTicksPerMajor == 0)

View file

@ -909,7 +909,7 @@ static BOOL menuBarVisible = YES;
*/ */
- (int) indexOfItem: (id <NSMenuItem>)anObject - (int) indexOfItem: (id <NSMenuItem>)anObject
{ {
int index; NSUInteger index;
index = [_items indexOfObjectIdenticalTo: anObject]; index = [_items indexOfObjectIdenticalTo: anObject];

View file

@ -163,7 +163,7 @@ static Class imageClass;
if (userKeyEquivalent) if (userKeyEquivalent)
{ {
// check for leading symbols representing modifier flags: @, ~, $, ^ // check for leading symbols representing modifier flags: @, ~, $, ^
unsigned int modifierMask = 0; NSUInteger modifierMask = 0;
while ([userKeyEquivalent length] > 1) while ([userKeyEquivalent length] > 1)
{ {
if ([userKeyEquivalent hasPrefix:@"@"]) if ([userKeyEquivalent hasPrefix:@"@"])
@ -292,7 +292,7 @@ static Class imageClass;
return _keyEquivalent; return _keyEquivalent;
} }
- (void) setKeyEquivalentModifierMask: (unsigned int)mask - (void) setKeyEquivalentModifierMask: (NSUInteger)mask
{ {
if (_keyEquivalentModifierMask == mask) if (_keyEquivalentModifierMask == mask)
return; // no change return; // no change
@ -300,7 +300,7 @@ static Class imageClass;
[_menu itemChanged: self]; [_menu itemChanged: self];
} }
- (unsigned int) keyEquivalentModifierMask - (NSUInteger) keyEquivalentModifierMask
{ {
return _keyEquivalentModifierMask; return _keyEquivalentModifierMask;
} }
@ -318,13 +318,13 @@ static Class imageClass;
return userKeyEquivalent; return userKeyEquivalent;
} }
- (unsigned int) userKeyEquivalentModifierMask - (NSUInteger) userKeyEquivalentModifierMask
{ {
// FIXME // FIXME
return NSCommandKeyMask; return NSCommandKeyMask;
} }
- (void) setMnemonicLocation: (unsigned)location - (void) setMnemonicLocation: (NSUInteger)location
{ {
if (_mnemonicLocation == location) if (_mnemonicLocation == location)
return; // no change return; // no change
@ -333,7 +333,7 @@ static Class imageClass;
[_menu itemChanged: self]; [_menu itemChanged: self];
} }
- (unsigned) mnemonicLocation - (NSUInteger) mnemonicLocation
{ {
if (_mnemonicLocation != 255) if (_mnemonicLocation != 255)
return _mnemonicLocation; return _mnemonicLocation;
@ -351,7 +351,7 @@ static Class imageClass;
- (void) setTitleWithMnemonic: (NSString*)stringWithAmpersand - (void) setTitleWithMnemonic: (NSString*)stringWithAmpersand
{ {
unsigned int location = [stringWithAmpersand rangeOfString: @"&"].location; NSUInteger location = [stringWithAmpersand rangeOfString: @"&"].location;
[self setTitle: [stringWithAmpersand stringByReplacingString: @"&" [self setTitle: [stringWithAmpersand stringByReplacingString: @"&"
withString: @""]]; withString: @""]];
@ -375,7 +375,7 @@ static Class imageClass;
return _image; return _image;
} }
- (void) setState: (int)state - (void) setState: (NSInteger)state
{ {
if (_state == state) if (_state == state)
return; return;
@ -385,7 +385,7 @@ static Class imageClass;
[_menu itemChanged: self]; [_menu itemChanged: self];
} }
- (int) state - (NSInteger) state
{ {
return _state; return _state;
} }

View file

@ -1497,9 +1497,9 @@ Also returns the child index relative to this parent. */
if ([_dataSource respondsToSelector: if ([_dataSource respondsToSelector:
@selector(outlineView:namesOfPromisedFilesDroppedAtDestination:forDraggedItems:)]) @selector(outlineView:namesOfPromisedFilesDroppedAtDestination:forDraggedItems:)])
{ {
int count = [_selectedRows count]; NSUInteger count = [_selectedRows count];
NSMutableArray *itemArray = [NSMutableArray arrayWithCapacity: count]; NSMutableArray *itemArray = [NSMutableArray arrayWithCapacity: count];
unsigned int index = [_selectedRows firstIndex]; NSUInteger index = [_selectedRows firstIndex];
while (index != NSNotFound) while (index != NSNotFound)
{ {
@ -1838,9 +1838,9 @@ Also returns the child index relative to this parent. */
- (BOOL) _writeRows: (NSIndexSet *)rows - (BOOL) _writeRows: (NSIndexSet *)rows
toPasteboard: (NSPasteboard *)pboard toPasteboard: (NSPasteboard *)pboard
{ {
int count = [rows count]; NSUInteger count = [rows count];
NSMutableArray *itemArray = [NSMutableArray arrayWithCapacity: count]; NSMutableArray *itemArray = [NSMutableArray arrayWithCapacity: count];
unsigned int index = [rows firstIndex]; NSUInteger index = [rows firstIndex];
while (index != NSNotFound) while (index != NSNotFound)
{ {
@ -2049,7 +2049,7 @@ Also returns the child index relative to this parent. */
- (void)_closeItem: (id)item - (void)_closeItem: (id)item
{ {
int i, numChildren; NSUInteger i, numChildren;
NSMutableArray *removeAll = [NSMutableArray array]; NSMutableArray *removeAll = [NSMutableArray array];
[self _collectItemsStartingWith: item into: removeAll]; [self _collectItemsStartingWith: item into: removeAll];
@ -2073,7 +2073,7 @@ Also returns the child index relative to this parent. */
- (void)_openItem: (id)item - (void)_openItem: (id)item
{ {
int i, insertionPoint, numChildren, numDescendants; NSUInteger i, insertionPoint, numChildren, numDescendants;
id object; id object;
id sitem = (item == nil) ? (id)[NSNull null] : (id)item; id sitem = (item == nil) ? (id)[NSNull null] : (id)item;
@ -2110,7 +2110,7 @@ Also returns the child index relative to this parent. */
// Add all of the children... // Add all of the children...
if ([self isItemExpanded: child]) if ([self isItemExpanded: child])
{ {
int i, numItems; NSUInteger i, numItems;
NSMutableArray *insertAll = [NSMutableArray array]; NSMutableArray *insertAll = [NSMutableArray array];
[self _collectItemsStartingWith: child into: insertAll]; [self _collectItemsStartingWith: child into: insertAll];
@ -2132,7 +2132,7 @@ Also returns the child index relative to this parent. */
- (void) _removeChildren: (id)startitem - (void) _removeChildren: (id)startitem
{ {
int i, numChildren; NSUInteger i, numChildren;
id sitem = (startitem == nil) ? (id)[NSNull null] : (id)startitem; id sitem = (startitem == nil) ? (id)[NSNull null] : (id)startitem;
NSMutableArray *anarray; NSMutableArray *anarray;
@ -2154,7 +2154,7 @@ Also returns the child index relative to this parent. */
- (void) _noteNumberOfRowsChangedBelowItem: (id)item by: (int)numItems - (void) _noteNumberOfRowsChangedBelowItem: (id)item by: (int)numItems
{ {
BOOL selectionDidChange = NO; BOOL selectionDidChange = NO;
int rowIndex, nextIndex; NSUInteger rowIndex, nextIndex;
// check for trivial case // check for trivial case
if (numItems == 0) if (numItems == 0)
@ -2206,8 +2206,8 @@ Also returns the child index relative to this parent. */
/* If the item at _selectedRow was removed, we arbitrarily choose /* If the item at _selectedRow was removed, we arbitrarily choose
* another selected item (if there is still any). The policy * another selected item (if there is still any). The policy
* implemented below chooses the index most close to item. */ * implemented below chooses the index most close to item. */
int r1 = [_selectedRows indexLessThanIndex: rowIndex]; NSUInteger r1 = [_selectedRows indexLessThanIndex: rowIndex];
int r2 = [_selectedRows indexGreaterThanOrEqualToIndex: rowIndex]; NSUInteger r2 = [_selectedRows indexGreaterThanOrEqualToIndex: rowIndex];
if (r1 != NSNotFound && r2 != NSNotFound) if (r1 != NSNotFound && r2 != NSNotFound)
{ {
_selectedRow = (rowIndex - r1) <= (r2 - rowIndex) ? r1 : r2; _selectedRow = (rowIndex - r1) <= (r2 - rowIndex) ? r1 : r2;

View file

@ -749,7 +749,7 @@ static NSParagraphStyle *defaultStyle = nil;
- (void) removeTabStop: (NSTextTab*)anObject - (void) removeTabStop: (NSTextTab*)anObject
{ {
unsigned i = [_tabStops indexOfObject: anObject]; NSUInteger i = [_tabStops indexOfObject: anObject];
if (i != NSNotFound) if (i != NSNotFound)
[_tabStops removeObjectAtIndex: i]; [_tabStops removeObjectAtIndex: i];

View file

@ -1342,7 +1342,7 @@ static NSImage *_pbc_image[5];
- (void) _popUpItemAction: (id)sender - (void) _popUpItemAction: (id)sender
{ {
// first, if sender is one of our items, set it as our selected item // first, if sender is one of our items, set it as our selected item
int index = [_menu indexOfItem: sender]; NSUInteger index = [_menu indexOfItem: sender];
if (index != NSNotFound) if (index != NSNotFound)
[self selectItemAtIndex: index]; [self selectItemAtIndex: index];

View file

@ -365,17 +365,17 @@ static Class cellClass;
return [_cell closestTickMarkValueToValue: aValue]; return [_cell closestTickMarkValueToValue: aValue];
} }
- (int) indexOfTickMarkAtPoint: (NSPoint)point - (NSInteger) indexOfTickMarkAtPoint: (NSPoint)point
{ {
return [_cell indexOfTickMarkAtPoint: point]; return [_cell indexOfTickMarkAtPoint: point];
} }
- (int) numberOfTickMarks - (NSInteger) numberOfTickMarks
{ {
return [_cell numberOfTickMarks]; return [_cell numberOfTickMarks];
} }
- (NSRect) rectOfTickMarkAtIndex: (int)index - (NSRect) rectOfTickMarkAtIndex: (NSInteger)index
{ {
return [_cell rectOfTickMarkAtIndex: index]; return [_cell rectOfTickMarkAtIndex: index];
} }
@ -385,7 +385,7 @@ static Class cellClass;
[_cell setAllowsTickMarkValuesOnly: flag]; [_cell setAllowsTickMarkValuesOnly: flag];
} }
- (void) setNumberOfTickMarks: (int)numberOfTickMarks - (void) setNumberOfTickMarks: (NSInteger)numberOfTickMarks
{ {
[_cell setNumberOfTickMarks: numberOfTickMarks]; [_cell setNumberOfTickMarks: numberOfTickMarks];
} }
@ -400,7 +400,7 @@ static Class cellClass;
return [_cell tickMarkPosition]; return [_cell tickMarkPosition];
} }
- (double) tickMarkValueAtIndex: (int)index - (double) tickMarkValueAtIndex: (NSInteger)index
{ {
return [_cell tickMarkValueAtIndex: index]; return [_cell tickMarkValueAtIndex: index];
} }

View file

@ -699,9 +699,9 @@ float _floatValueForMousePoint (NSPoint point, NSRect knobRect,
return f; return f;
} }
- (int) indexOfTickMarkAtPoint: (NSPoint)point - (NSInteger) indexOfTickMarkAtPoint: (NSPoint)point
{ {
int i; NSInteger i;
for (i = 0; i < _numberOfTickMarks; i++) for (i = 0; i < _numberOfTickMarks; i++)
{ {
@ -714,12 +714,12 @@ float _floatValueForMousePoint (NSPoint point, NSRect knobRect,
return NSNotFound; return NSNotFound;
} }
- (int) numberOfTickMarks - (NSInteger) numberOfTickMarks
{ {
return _numberOfTickMarks; return _numberOfTickMarks;
} }
- (NSRect) rectOfTickMarkAtIndex: (int)index - (NSRect) rectOfTickMarkAtIndex: (NSInteger)index
{ {
NSRect rect = _trackRect; NSRect rect = _trackRect;
float d; float d;
@ -754,7 +754,7 @@ float _floatValueForMousePoint (NSPoint point, NSRect knobRect,
_allowsTickMarkValuesOnly = flag; _allowsTickMarkValuesOnly = flag;
} }
- (void) setNumberOfTickMarks: (int)numberOfTickMarks - (void) setNumberOfTickMarks: (NSInteger)numberOfTickMarks
{ {
_numberOfTickMarks = numberOfTickMarks; _numberOfTickMarks = numberOfTickMarks;
if ((_control_view != nil) && if ((_control_view != nil) &&
@ -779,7 +779,7 @@ float _floatValueForMousePoint (NSPoint point, NSRect knobRect,
return _tickMarkPosition; return _tickMarkPosition;
} }
- (double) tickMarkValueAtIndex: (int)index - (double) tickMarkValueAtIndex: (NSInteger)index
{ {
if ((index < 0) || (index >= _numberOfTickMarks)) if ((index < 0) || (index >= _numberOfTickMarks))
{ {

View file

@ -101,7 +101,7 @@
} }
- (void) insertTabViewItem: (NSTabViewItem*)tabViewItem - (void) insertTabViewItem: (NSTabViewItem*)tabViewItem
atIndex: (int)index atIndex: (NSInteger)index
{ {
[tabViewItem _setTabView: self]; [tabViewItem _setTabView: self];
[_items insertObject: tabViewItem atIndex: index]; [_items insertObject: tabViewItem atIndex: index];
@ -154,15 +154,15 @@
[self setNeedsDisplay: YES]; [self setNeedsDisplay: YES];
} }
- (int) indexOfTabViewItem: (NSTabViewItem*)tabViewItem - (NSInteger) indexOfTabViewItem: (NSTabViewItem*)tabViewItem
{ {
return [_items indexOfObject: tabViewItem]; return [_items indexOfObject: tabViewItem];
} }
- (int) indexOfTabViewItemWithIdentifier: (id)identifier - (NSInteger) indexOfTabViewItemWithIdentifier: (id)identifier
{ {
unsigned howMany = [_items count]; NSUInteger howMany = [_items count];
unsigned i; NSUInteger i;
for (i = 0; i < howMany; i++) for (i = 0; i < howMany; i++)
{ {
@ -175,12 +175,12 @@
return NSNotFound; return NSNotFound;
} }
- (int) numberOfTabViewItems - (NSInteger) numberOfTabViewItems
{ {
return [_items count]; return [_items count];
} }
- (NSTabViewItem*) tabViewItemAtIndex: (int)index - (NSTabViewItem*) tabViewItemAtIndex: (NSInteger)index
{ {
return [_items objectAtIndex: index]; return [_items objectAtIndex: index];
} }
@ -280,7 +280,7 @@
} }
} }
- (void) selectTabViewItemAtIndex: (int)index - (void) selectTabViewItemAtIndex: (NSInteger)index
{ {
if (index < 0 || index >= [_items count]) if (index < 0 || index >= [_items count])
[self selectTabViewItem: nil]; [self selectTabViewItem: nil];
@ -290,14 +290,14 @@
- (void) selectTabViewItemWithIdentifier: (id)identifier - (void) selectTabViewItemWithIdentifier: (id)identifier
{ {
int index = [self indexOfTabViewItemWithIdentifier: identifier]; NSInteger index = [self indexOfTabViewItemWithIdentifier: identifier];
[self selectTabViewItemAtIndex: index]; [self selectTabViewItemAtIndex: index];
} }
- (void) takeSelectedTabViewItemFromSender: (id)sender - (void) takeSelectedTabViewItemFromSender: (id)sender
{ {
int index = -1; NSInteger index = -1;
if ([sender respondsToSelector: @selector(indexOfSelectedItem)] == YES) if ([sender respondsToSelector: @selector(indexOfSelectedItem)] == YES)
{ {
@ -305,9 +305,9 @@
} }
else if ([sender isKindOfClass: [NSMatrix class]] == YES) else if ([sender isKindOfClass: [NSMatrix class]] == YES)
{ {
int cols = [sender numberOfColumns]; NSInteger cols = [sender numberOfColumns];
int row = [sender selectedRow]; NSInteger row = [sender selectedRow];
int col = [sender selectedColumn]; NSInteger col = [sender selectedColumn];
if (row >= 0 && col >= 0) if (row >= 0 && col >= 0)
{ {
@ -464,8 +464,8 @@
*/ */
- (NSTabViewItem*) tabViewItemAtPoint: (NSPoint)point - (NSTabViewItem*) tabViewItemAtPoint: (NSPoint)point
{ {
int howMany = [_items count]; NSInteger howMany = [_items count];
int i; NSInteger i;
for (i = 0; i < howMany; i++) for (i = 0; i < howMany; i++)
{ {

View file

@ -447,7 +447,7 @@ static void computeNewSelection
} }
if (*_selectedRow == -1) if (*_selectedRow == -1)
{ {
unsigned int last = [_selectedRows lastIndex]; NSUInteger last = [_selectedRows lastIndex];
if (last == NSNotFound) if (last == NSNotFound)
{ {
@ -505,7 +505,7 @@ static void computeNewSelection
} }
if (*_selectedRow == -1) if (*_selectedRow == -1)
{ {
unsigned int first = [_selectedRows firstIndex]; NSUInteger first = [_selectedRows firstIndex];
if (first == NSNotFound) if (first == NSNotFound)
{ {
@ -556,7 +556,7 @@ static void computeNewSelection
if (*_selectedRow == -1) if (*_selectedRow == -1)
{ {
unsigned int first = [_selectedRows firstIndex]; NSUInteger first = [_selectedRows firstIndex];
if (first == NSNotFound) if (first == NSNotFound)
{ {
@ -604,7 +604,7 @@ static void computeNewSelection
if (*_selectedRow == -1) if (*_selectedRow == -1)
{ {
unsigned int last = [_selectedRows lastIndex]; NSUInteger last = [_selectedRows lastIndex];
if (last == NSNotFound) if (last == NSNotFound)
{ {
@ -707,7 +707,7 @@ static void computeNewSelection
} }
if (*_selectedRow == -1) if (*_selectedRow == -1)
{ {
unsigned int last = [_selectedRows lastIndex]; NSUInteger last = [_selectedRows lastIndex];
if (last == NSNotFound) if (last == NSNotFound)
{ {
@ -757,7 +757,7 @@ static void computeNewSelection
} }
if (*_selectedRow == -1) if (*_selectedRow == -1)
{ {
unsigned int first = [_selectedRows firstIndex]; NSUInteger first = [_selectedRows firstIndex];
if (first == NSNotFound) if (first == NSNotFound)
{ {
@ -797,7 +797,7 @@ static void computeNewSelection
if (*_selectedRow == -1) if (*_selectedRow == -1)
{ {
unsigned int first = [_selectedRows firstIndex]; NSUInteger first = [_selectedRows firstIndex];
if (first == NSNotFound) if (first == NSNotFound)
{ {
@ -836,7 +836,7 @@ static void computeNewSelection
if (*_selectedRow == -1) if (*_selectedRow == -1)
{ {
unsigned int last = [_selectedRows lastIndex]; NSUInteger last = [_selectedRows lastIndex];
if (last == NSNotFound) if (last == NSNotFound)
{ {
@ -994,7 +994,7 @@ static void computeNewSelection
} }
if (*_selectedRow == -1) if (*_selectedRow == -1)
{ {
unsigned int last = [_selectedRows lastIndex]; NSUInteger last = [_selectedRows lastIndex];
if (last == NSNotFound) if (last == NSNotFound)
{ {
@ -1045,7 +1045,7 @@ static void computeNewSelection
if (*_selectedRow == -1) if (*_selectedRow == -1)
{ {
unsigned int first = [_selectedRows firstIndex]; NSUInteger first = [_selectedRows firstIndex];
if (first == NSNotFound) if (first == NSNotFound)
{ {
@ -1085,7 +1085,7 @@ static void computeNewSelection
if (*_selectedRow == -1) if (*_selectedRow == -1)
{ {
unsigned int first = [_selectedRows firstIndex]; NSUInteger first = [_selectedRows firstIndex];
if (first == NSNotFound) if (first == NSNotFound)
{ {
@ -1124,7 +1124,7 @@ static void computeNewSelection
if (*_selectedRow == -1) if (*_selectedRow == -1)
{ {
unsigned int last = [_selectedRows lastIndex]; NSUInteger last = [_selectedRows lastIndex];
if (last == NSNotFound) if (last == NSNotFound)
{ {
@ -1193,7 +1193,7 @@ static void computeNewSelection
if (*_selectedRow == -1) if (*_selectedRow == -1)
{ {
unsigned int last = [_selectedRows lastIndex]; NSUInteger last = [_selectedRows lastIndex];
if (last == NSNotFound) if (last == NSNotFound)
{ {
@ -1251,7 +1251,7 @@ static void computeNewSelection
} }
if (*_selectedRow == -1) if (*_selectedRow == -1)
{ {
unsigned int first = [_selectedRows firstIndex]; NSUInteger first = [_selectedRows firstIndex];
if (first == NSNotFound) if (first == NSNotFound)
{ {
@ -1299,7 +1299,7 @@ static void computeNewSelection
if (*_selectedRow == -1) if (*_selectedRow == -1)
{ {
unsigned int first = [_selectedRows firstIndex]; NSUInteger first = [_selectedRows firstIndex];
if (first == NSNotFound) if (first == NSNotFound)
{ {
@ -1348,7 +1348,7 @@ static void computeNewSelection
if (*_selectedRow == -1) if (*_selectedRow == -1)
{ {
unsigned int last = [_selectedRows lastIndex]; NSUInteger last = [_selectedRows lastIndex];
if (last == NSNotFound) if (last == NSNotFound)
{ {
@ -1390,7 +1390,7 @@ static void computeNewSelection
} }
if (*_selectedRow == -1) if (*_selectedRow == -1)
{ {
unsigned int first = [_selectedRows firstIndex]; NSUInteger first = [_selectedRows firstIndex];
if (first == NSNotFound) if (first == NSNotFound)
{ {
@ -1414,7 +1414,7 @@ static void computeNewSelection
} }
if (*_selectedRow == -1) if (*_selectedRow == -1)
{ {
unsigned int first = [_selectedRows firstIndex]; NSUInteger first = [_selectedRows firstIndex];
if (first == NSNotFound) if (first == NSNotFound)
{ {
@ -1453,7 +1453,7 @@ static void computeNewSelection
if (*_selectedRow == -1) if (*_selectedRow == -1)
{ {
unsigned int first = [_selectedRows firstIndex]; NSUInteger first = [_selectedRows firstIndex];
if (first == NSNotFound) if (first == NSNotFound)
{ {
@ -1509,7 +1509,7 @@ static void computeNewSelection
if (*_selectedRow == -1) if (*_selectedRow == -1)
{ {
unsigned int first = [_selectedRows firstIndex]; NSUInteger first = [_selectedRows firstIndex];
if (first == NSNotFound) if (first == NSNotFound)
{ {
@ -1584,7 +1584,7 @@ static void computeNewSelection
if (*_selectedRow == -1) if (*_selectedRow == -1)
{ {
unsigned int first = [_selectedRows firstIndex]; NSUInteger first = [_selectedRows firstIndex];
if (first == NSNotFound) if (first == NSNotFound)
{ {
@ -1634,7 +1634,7 @@ static void computeNewSelection
if (*_selectedRow == -1) if (*_selectedRow == -1)
{ {
unsigned int first = [_selectedRows firstIndex]; NSUInteger first = [_selectedRows firstIndex];
if (first == NSNotFound) if (first == NSNotFound)
{ {
@ -1678,7 +1678,7 @@ static void computeNewSelection
} }
if (*_selectedRow == -1) if (*_selectedRow == -1)
{ {
unsigned int first = [_selectedRows firstIndex]; NSUInteger first = [_selectedRows firstIndex];
if (first == NSNotFound) if (first == NSNotFound)
{ {
@ -1704,7 +1704,7 @@ static void computeNewSelection
} }
if (*_selectedRow == -1) if (*_selectedRow == -1)
{ {
unsigned int first = [_selectedRows firstIndex]; NSUInteger first = [_selectedRows firstIndex];
if (first == NSNotFound) if (first == NSNotFound)
{ {
@ -1745,7 +1745,7 @@ static void computeNewSelection
if (*_selectedRow == -1) if (*_selectedRow == -1)
{ {
unsigned int first = [_selectedRows firstIndex]; NSUInteger first = [_selectedRows firstIndex];
if (first == NSNotFound) if (first == NSNotFound)
{ {
@ -1803,7 +1803,7 @@ static void computeNewSelection
if (*_selectedRow == -1) if (*_selectedRow == -1)
{ {
unsigned int first = [_selectedRows firstIndex]; NSUInteger first = [_selectedRows firstIndex];
if (first == NSNotFound) if (first == NSNotFound)
{ {
@ -1879,7 +1879,7 @@ static void computeNewSelection
if (*_selectedRow == -1) if (*_selectedRow == -1)
{ {
unsigned int first = [_selectedRows firstIndex]; NSUInteger first = [_selectedRows firstIndex];
if (first == NSNotFound) if (first == NSNotFound)
{ {
@ -1930,7 +1930,7 @@ static void computeNewSelection
if (*_selectedRow == -1) if (*_selectedRow == -1)
{ {
unsigned int first = [_selectedRows firstIndex]; NSUInteger first = [_selectedRows firstIndex];
if (first == NSNotFound) if (first == NSNotFound)
{ {
@ -2705,7 +2705,7 @@ byExtendingSelection: (BOOL)flag
{ {
BOOL empty = ([indexes firstIndex] == NSNotFound); BOOL empty = ([indexes firstIndex] == NSNotFound);
BOOL changed = NO; BOOL changed = NO;
unsigned int col; NSUInteger col;
if (!_selectingColumns) if (!_selectingColumns)
{ {
@ -2788,7 +2788,7 @@ byExtendingSelection: (BOOL)flag
{ {
BOOL empty = ([indexes firstIndex] == NSNotFound); BOOL empty = ([indexes firstIndex] == NSNotFound);
BOOL changed = NO; BOOL changed = NO;
unsigned int row; NSUInteger row;
if (_selectingColumns) if (_selectingColumns)
{ {
@ -2894,8 +2894,8 @@ byExtendingSelection: (BOOL)flag
if (_selectedColumn == columnIndex) if (_selectedColumn == columnIndex)
{ {
unsigned int less = [_selectedColumns indexLessThanIndex: columnIndex]; NSUInteger less = [_selectedColumns indexLessThanIndex: columnIndex];
unsigned int greater = [_selectedColumns indexGreaterThanIndex: columnIndex]; NSUInteger greater = [_selectedColumns indexGreaterThanIndex: columnIndex];
if (less == NSNotFound) if (less == NSNotFound)
{ {
@ -2951,8 +2951,8 @@ byExtendingSelection: (BOOL)flag
if (_selectedRow == rowIndex) if (_selectedRow == rowIndex)
{ {
unsigned int less = [_selectedRows indexLessThanIndex: rowIndex]; NSUInteger less = [_selectedRows indexLessThanIndex: rowIndex];
unsigned int greater = [_selectedRows indexGreaterThanIndex: rowIndex]; NSUInteger greater = [_selectedRows indexGreaterThanIndex: rowIndex];
if (less == NSNotFound) if (less == NSNotFound)
{ {
@ -4814,7 +4814,7 @@ This method is deprecated, use -columnIndexesInRect:. */
selected rows below the new end of the table */ selected rows below the new end of the table */
if (!_selectingColumns) if (!_selectingColumns)
{ {
int row = [_selectedRows lastIndex]; NSUInteger row = [_selectedRows lastIndex];
if (row == NSNotFound) if (row == NSNotFound)
{ {
@ -4822,7 +4822,7 @@ This method is deprecated, use -columnIndexesInRect:. */
{ {
/* We shouldn't allow empty selection - try /* We shouldn't allow empty selection - try
selecting the last row */ selecting the last row */
int lastRow = _numberOfRows - 1; NSInteger lastRow = _numberOfRows - 1;
if (lastRow > -1) if (lastRow > -1)
{ {
@ -5278,7 +5278,7 @@ This method is deprecated, use -columnIndexesInRect:. */
- (void) setHighlightedTableColumn: (NSTableColumn *)aTableColumn - (void) setHighlightedTableColumn: (NSTableColumn *)aTableColumn
{ {
int tableColumnIndex; NSUInteger tableColumnIndex;
tableColumnIndex = [_tableColumns indexOfObject: aTableColumn]; tableColumnIndex = [_tableColumns indexOfObject: aTableColumn];
@ -6650,7 +6650,7 @@ For a more detailed explanation, -setSortDescriptors:. */
- (NSArray *) _indexSetToArray: (NSIndexSet*)indexSet - (NSArray *) _indexSetToArray: (NSIndexSet*)indexSet
{ {
NSMutableArray *array = [NSMutableArray array]; NSMutableArray *array = [NSMutableArray array];
unsigned int index = [indexSet firstIndex]; NSUInteger index = [indexSet firstIndex];
while (index != NSNotFound) while (index != NSNotFound)
{ {
@ -6715,7 +6715,7 @@ For a more detailed explanation, -setSortDescriptors:. */
- (void) _unselectAllRows - (void) _unselectAllRows
{ {
/* Compute rect to redraw to clear the old row selection */ /* Compute rect to redraw to clear the old row selection */
unsigned int row = [_selectedRows firstIndex]; NSUInteger row = [_selectedRows firstIndex];
while (row != NSNotFound) while (row != NSNotFound)
{ {
@ -6734,7 +6734,7 @@ For a more detailed explanation, -setSortDescriptors:. */
- (void) _unselectAllColumns - (void) _unselectAllColumns
{ {
/* Compute rect to redraw to clear the old column selection */ /* Compute rect to redraw to clear the old column selection */
unsigned int column = [_selectedColumns firstIndex]; NSUInteger column = [_selectedColumns firstIndex];
while (column != NSNotFound) while (column != NSNotFound)
{ {

View file

@ -261,7 +261,7 @@ NSString *GSMovableToolbarItemPboardType = @"GSMovableToolbarItemPboardType";
NSImage *image = [[NSImage alloc] initWithSize: viewSize]; NSImage *image = [[NSImage alloc] initWithSize: viewSize];
NSCell *cell = [self cell]; NSCell *cell = [self cell];
NSPasteboard *pboard; NSPasteboard *pboard;
int index = NSNotFound; NSInteger index = NSNotFound;
// Prepare the drag // Prepare the drag
@ -753,7 +753,7 @@ NSString *GSMovableToolbarItemPboardType = @"GSMovableToolbarItemPboardType";
NSSize viewSize = [self frame].size; NSSize viewSize = [self frame].size;
NSImage *image = [[NSImage alloc] initWithSize: viewSize]; NSImage *image = [[NSImage alloc] initWithSize: viewSize];
NSPasteboard *pboard; NSPasteboard *pboard;
int index = NSNotFound; NSInteger index = NSNotFound;
// Prepare the drag // Prepare the drag

View file

@ -777,7 +777,7 @@ GSSetDragTypes(NSView* obj, NSArray *types)
positioned: (NSWindowOrderingMode)place positioned: (NSWindowOrderingMode)place
relativeTo: (NSView*)otherView relativeTo: (NSView*)otherView
{ {
unsigned index; NSUInteger index;
if (aView == nil) if (aView == nil)
{ {

View file

@ -278,9 +278,9 @@ has blocked and waited for events.
- (void) _lossOfKeyOrMainWindow - (void) _lossOfKeyOrMainWindow
{ {
NSArray *windowList = GSOrderedWindows(); NSArray *windowList = GSOrderedWindows();
unsigned pos = [windowList indexOfObjectIdenticalTo: self]; NSUInteger pos = [windowList indexOfObjectIdenticalTo: self];
unsigned c = [windowList count]; NSUInteger c = [windowList count];
unsigned i; NSUInteger i;
// Don't bother when application is closing. // Don't bother when application is closing.
if ([NSApp isRunning] == NO) if ([NSApp isRunning] == NO)