diff --git a/ColorPickers/GSNamedColorPicker.m b/ColorPickers/GSNamedColorPicker.m index fe4451bce..e031068a1 100644 --- a/ColorPickers/GSNamedColorPicker.m +++ b/ColorPickers/GSNamedColorPicker.m @@ -228,18 +228,18 @@ createRowsForColumn: (NSInteger)column { } -- (int) numberOfItemsInComboBox: (NSComboBox *)aComboBox +- (NSInteger) numberOfItemsInComboBox: (NSComboBox *)aComboBox { return [lists count]; } - (id) comboBox: (NSComboBox *)aComboBox -objectValueForItemAtIndex: (int)index +objectValueForItemAtIndex: (NSInteger)index { return [(NSColorList*)[lists objectAtIndex: index] name]; } -- (unsigned int) comboBox: (NSComboBox *)aComboBox +- (NSUInteger) comboBox: (NSComboBox *)aComboBox indexOfItemWithStringValue: (NSString *)string { return [lists indexOfObject: [NSColorList colorListNamed: string]]; diff --git a/Headers/AppKit/NSComboBox.h b/Headers/AppKit/NSComboBox.h index 82fd8c8cc..5b769a4d7 100644 --- a/Headers/AppKit/NSComboBox.h +++ b/Headers/AppKit/NSComboBox.h @@ -48,8 +48,8 @@ - (float) itemHeight; - (void) setItemHeight: (float)itemHeight; -- (int) numberOfVisibleItems; -- (void) setNumberOfVisibleItems: (int)visibleItems; +- (NSInteger) numberOfVisibleItems; +- (void) setNumberOfVisibleItems: (NSInteger)visibleItems; - (void) reloadData; - (void) noteNumberOfItemsChanged; @@ -57,13 +57,13 @@ - (BOOL) usesDataSource; - (void) setUsesDataSource: (BOOL)flag; -- (void) scrollItemAtIndexToTop: (int)index; -- (void) scrollItemAtIndexToVisible: (int)index; +- (void) scrollItemAtIndexToTop: (NSInteger)index; +- (void) scrollItemAtIndexToVisible: (NSInteger)index; -- (void) selectItemAtIndex: (int)index; -- (void) deselectItemAtIndex: (int)index; -- (int) indexOfSelectedItem; -- (int) numberOfItems; +- (void) selectItemAtIndex: (NSInteger)index; +- (void) deselectItemAtIndex: (NSInteger)index; +- (NSInteger) indexOfSelectedItem; +- (NSInteger) numberOfItems; /* These two methods can only be used when usesDataSource is YES */ - (id) dataSource; @@ -72,14 +72,14 @@ /* These methods can only be used when usesDataSource is NO */ - (void) addItemWithObjectValue: (id)object; - (void) addItemsWithObjectValues: (NSArray *)objects; -- (void) insertItemWithObjectValue: (id)object atIndex:(int)index; +- (void) insertItemWithObjectValue: (id)object atIndex:(NSInteger)index; - (void) removeItemWithObjectValue: (id)object; -- (void) removeItemAtIndex: (int)index; +- (void) removeItemAtIndex: (NSInteger)index; - (void) removeAllItems; - (void) selectItemWithObjectValue: (id)object; -- (id) itemObjectValueAtIndex: (int)index; +- (id) itemObjectValueAtIndex: (NSInteger)index; - (id) objectValueOfSelectedItem; -- (int) indexOfItemWithObjectValue: (id)object; +- (NSInteger) indexOfItemWithObjectValue: (id)object; - (NSArray *) objectValues; #if OS_API_VERSION(GS_API_MACOSX, GS_API_LATEST) @@ -95,9 +95,9 @@ @end @interface NSObject (NSComboBoxDataSource) -- (int) numberOfItemsInComboBox: (NSComboBox *)aComboBox; -- (id) comboBox: (NSComboBox *)aComboBox objectValueForItemAtIndex:(int)index; -- (unsigned int) comboBox: (NSComboBox *)aComboBox +- (NSInteger) numberOfItemsInComboBox: (NSComboBox *)aComboBox; +- (id) comboBox: (NSComboBox *)aComboBox objectValueForItemAtIndex:(NSInteger)index; +- (NSUInteger) comboBox: (NSComboBox *)aComboBox indexOfItemWithStringValue: (NSString *)string; #if OS_API_VERSION(GS_API_MACOSX, GS_API_LATEST) /* text completion */ diff --git a/Headers/AppKit/NSComboBoxCell.h b/Headers/AppKit/NSComboBoxCell.h index 2b8785e63..3735ec526 100644 --- a/Headers/AppKit/NSComboBoxCell.h +++ b/Headers/AppKit/NSComboBoxCell.h @@ -65,8 +65,8 @@ - (float)itemHeight; - (void)setItemHeight:(float)itemHeight; -- (int)numberOfVisibleItems; -- (void)setNumberOfVisibleItems:(int)visibleItems; +- (NSInteger)numberOfVisibleItems; +- (void)setNumberOfVisibleItems:(NSInteger)visibleItems; - (void)reloadData; - (void)noteNumberOfItemsChanged; @@ -74,13 +74,13 @@ - (BOOL)usesDataSource; - (void)setUsesDataSource:(BOOL)flag; -- (void)scrollItemAtIndexToTop:(int)index; -- (void)scrollItemAtIndexToVisible:(int)index; +- (void)scrollItemAtIndexToTop:(NSInteger)index; +- (void)scrollItemAtIndexToVisible:(NSInteger)index; -- (void)selectItemAtIndex:(int)index; -- (void)deselectItemAtIndex:(int)index; -- (int)indexOfSelectedItem; -- (int)numberOfItems; +- (void)selectItemAtIndex:(NSInteger)index; +- (void)deselectItemAtIndex:(NSInteger)index; +- (NSInteger)indexOfSelectedItem; +- (NSInteger)numberOfItems; /* These two methods can only be used when usesDataSource is YES */ - (id)dataSource; @@ -89,14 +89,14 @@ /* These methods can only be used when usesDataSource is NO */ - (void)addItemWithObjectValue:(id)object; - (void)addItemsWithObjectValues:(NSArray *)objects; -- (void)insertItemWithObjectValue:(id)object atIndex:(int)index; +- (void)insertItemWithObjectValue:(id)object atIndex:(NSInteger)index; - (void)removeItemWithObjectValue:(id)object; -- (void)removeItemAtIndex:(int)index; +- (void)removeItemAtIndex:(NSInteger)index; - (void)removeAllItems; - (void)selectItemWithObjectValue:(id)object; -- (id)itemObjectValueAtIndex:(int)index; +- (id)itemObjectValueAtIndex:(NSInteger)index; - (id)objectValueOfSelectedItem; -- (int)indexOfItemWithObjectValue:(id)object; +- (NSInteger)indexOfItemWithObjectValue:(id)object; - (NSArray *)objectValues; - (BOOL) trackMouse: (NSEvent *)theEvent @@ -118,10 +118,10 @@ @end @interface NSObject (NSComboBoxCellDataSource) -- (int)numberOfItemsInComboBoxCell:(NSComboBoxCell *)comboBoxCell; +- (NSInteger)numberOfItemsInComboBoxCell:(NSComboBoxCell *)comboBoxCell; - (id)comboBoxCell:(NSComboBoxCell *)aComboBoxCell - objectValueForItemAtIndex:(int)index; -- (unsigned int)comboBoxCell:(NSComboBoxCell *)aComboBoxCell + objectValueForItemAtIndex:(NSInteger)index; +- (NSUInteger)comboBoxCell:(NSComboBoxCell *)aComboBoxCell indexOfItemWithStringValue:(NSString *)string; #if OS_API_VERSION(GS_API_MACOSX, GS_API_LATEST) /* text completion */ diff --git a/Headers/AppKit/NSForm.h b/Headers/AppKit/NSForm.h index 56c3b174d..e2e0b8f6c 100644 --- a/Headers/AppKit/NSForm.h +++ b/Headers/AppKit/NSForm.h @@ -45,15 +45,15 @@ // - (NSFormCell*)addEntry:(NSString*)title; - (NSFormCell*)insertEntry:(NSString*)title - atIndex:(int)index; -- (void)removeEntryAtIndex:(int)index; + atIndex:(NSInteger)index; +- (void)removeEntryAtIndex:(NSInteger)index; - (void)setInterlineSpacing:(float)spacing; // // Finding Indices // -- (int)indexOfCellWithTag:(int)aTag; -- (int)indexOfSelectedItem; +- (NSInteger)indexOfCellWithTag:(NSInteger)aTag; +- (NSInteger)indexOfSelectedItem; // // Modifying Graphic Attributes @@ -72,17 +72,17 @@ // // Getting a Cell // -- (id)cellAtIndex:(int)index; +- (id)cellAtIndex:(NSInteger)index; // // Displaying a Cell // -- (void)drawCellAtIndex:(int)index; +- (void)drawCellAtIndex:(NSInteger)index; // // Editing Text // -- (void)selectTextAtIndex:(int)index; +- (void)selectTextAtIndex:(NSInteger)index; // // Resizing the Form diff --git a/Headers/AppKit/NSMatrix.h b/Headers/AppKit/NSMatrix.h index 1f7c42d66..dec1caa08 100644 --- a/Headers/AppKit/NSMatrix.h +++ b/Headers/AppKit/NSMatrix.h @@ -101,13 +101,13 @@ typedef enum _NSMatrixMode { - (id) initWithFrame: (NSRect)frameRect mode: (int)aMode cellClass: (Class)classId - numberOfRows: (int)rowsHigh - numberOfColumns: (int)colsWide; + numberOfRows: (NSInteger)rowsHigh + numberOfColumns: (NSInteger)colsWide; - (id) initWithFrame: (NSRect)frameRect mode: (int)aMode prototype: (NSCell *)aCell - numberOfRows: (int)rowsHigh - numberOfColumns: (int)colsWide; + numberOfRows: (NSInteger)rowsHigh + numberOfColumns: (NSInteger)colsWide; /* * Setting the Selection Mode @@ -138,49 +138,49 @@ typedef enum _NSMatrixMode { - (void) addColumnWithCells: (NSArray *)cellArray; - (void) addRow; - (void) addRowWithCells: (NSArray *)cellArray; -- (NSRect) cellFrameAtRow: (int)row - column: (int)column; +- (NSRect) cellFrameAtRow: (NSInteger)row + column: (NSInteger)column; - (NSSize) cellSize; -- (void) getNumberOfRows: (int *)rowCount - columns: (int *)columnCount; -- (void) insertColumn: (int)column; -- (void) insertColumn: (int)column withCells: (NSArray *)cellArray; -- (void) insertRow: (int)row; -- (void) insertRow: (int)row withCells: (NSArray *)cellArray; +- (void) getNumberOfRows: (NSInteger *)rowCount + columns: (NSInteger *)columnCount; +- (void) insertColumn: (NSInteger)column; +- (void) insertColumn: (NSInteger)column withCells: (NSArray *)cellArray; +- (void) insertRow: (NSInteger)row; +- (void) insertRow: (NSInteger)row withCells: (NSArray *)cellArray; - (NSSize) intercellSpacing; -- (NSCell *) makeCellAtRow: (int)row - column: (int)column; +- (NSCell *) makeCellAtRow: (NSInteger)row + column: (NSInteger)column; - (void) putCell: (NSCell *)newCell - atRow: (int)row - column: (int)column; -- (void) removeColumn: (int)column; -- (void) removeRow: (int)row; -- (void) renewRows: (int)newRows - columns: (int)newColumns; + atRow: (NSInteger)row + column: (NSInteger)column; +- (void) removeColumn: (NSInteger)column; +- (void) removeRow: (NSInteger)row; +- (void) renewRows: (NSInteger)newRows + columns: (NSInteger)newColumns; - (void) setCellSize: (NSSize)aSize; - (void) setIntercellSpacing: (NSSize)aSize; -- (void) sortUsingFunction: (int (*)(id element1, id element2, void *userData))comparator +- (void) sortUsingFunction: (NSComparisonResult (*)(id element1, id element2, void *userData))comparator context: (void *)context; - (void) sortUsingSelector: (SEL)comparator; -- (int) numberOfColumns; -- (int) numberOfRows; +- (NSInteger) numberOfColumns; +- (NSInteger) numberOfRows; /* * Finding Matrix Coordinates */ -- (BOOL) getRow: (int *)row - column: (int *)column +- (BOOL) getRow: (NSInteger *)row + column: (NSInteger *)column forPoint: (NSPoint)aPoint; -- (BOOL) getRow: (int *)row - column: (int *)column +- (BOOL) getRow: (NSInteger *)row + column: (NSInteger *)column ofCell: (NSCell *)aCell; /* * Modifying Individual Cells */ -- (void) setState: (int)value - atRow: (int)row - column: (int)column; +- (void) setState: (NSInteger)value + atRow: (NSInteger)row + column: (NSInteger)column; /* * Selecting Cells @@ -188,24 +188,24 @@ typedef enum _NSMatrixMode { - (void) deselectAllCells; - (void) deselectSelectedCell; - (void) selectAll: (id)sender; -- (void) selectCellAtRow: (int)row - column: (int)column; -- (BOOL) selectCellWithTag: (int)anInt; +- (void) selectCellAtRow: (NSInteger)row + column: (NSInteger)column; +- (BOOL) selectCellWithTag: (NSInteger)anInt; - (id) selectedCell; - (NSArray *) selectedCells; - (NSInteger) selectedColumn; - (NSInteger) selectedRow; -- (void) setSelectionFrom: (int)startPos - to: (int)endPos - anchor: (int)anchorPos +- (void) setSelectionFrom: (NSInteger)startPos + to: (NSInteger)endPos + anchor: (NSInteger)anchorPos highlight: (BOOL)flag; /* * Finding Cells */ -- (id) cellAtRow: (int)row - column: (int)column; -- (id) cellWithTag: (int)anInt; +- (id) cellAtRow: (NSInteger)row + column: (NSInteger)column; +- (id) cellWithTag: (NSInteger)anInt; - (NSArray *) cells; /* @@ -224,8 +224,8 @@ typedef enum _NSMatrixMode { * Editing Text in Cells */ - (void) selectText: (id)sender; -- (id) selectTextAtRow: (int)row - column: (int)column; +- (id) selectTextAtRow: (NSInteger)row + column: (NSInteger)column; - (void) textDidBeginEditing: (NSNotification *)aNotification; - (void) textDidChange: (NSNotification *)aNotification; - (void) textDidEndEditing: (NSNotification *)aNotification; @@ -262,19 +262,19 @@ typedef enum _NSMatrixMode { * Scrolling */ - (BOOL) isAutoscroll; -- (void) scrollCellToVisibleAtRow: (int)row - column: (int)column; +- (void) scrollCellToVisibleAtRow: (NSInteger)row + column: (NSInteger)column; - (void) setAutoscroll: (BOOL)flag; - (void) setScrollable: (BOOL)flag; /* * Displaying */ -- (void) drawCellAtRow: (int)row - column: (int)column; +- (void) drawCellAtRow: (NSInteger)row + column: (NSInteger)column; - (void) highlightCell: (BOOL)flag - atRow: (int)row - column: (int)column; + atRow: (NSInteger)row + column: (NSInteger)column; /* *Target and Action @@ -296,7 +296,7 @@ typedef enum _NSMatrixMode { */ - (BOOL) acceptsFirstMouse: (NSEvent *)theEvent; - (void) mouseDown: (NSEvent *)theEvent; -- (int) mouseDownFlags; +- (NSInteger) mouseDownFlags; - (BOOL) performKeyEquivalent: (NSEvent *)theEvent; /* diff --git a/Headers/AppKit/NSMenu.h b/Headers/AppKit/NSMenu.h index 49b9adb61..b499c116e 100644 --- a/Headers/AppKit/NSMenu.h +++ b/Headers/AppKit/NSMenu.h @@ -65,12 +65,12 @@ * version and the transient version are on the screen. * A value of -1 means that no item will be highlighted. */ -- (void) setHighlightedItemIndex: (int)index; +- (void) setHighlightedItemIndex: (NSInteger)index; /** Returns the currently highlighted item. Returns -1 * if no item is highlighted. */ -- (int) highlightedItemIndex; +- (NSInteger) highlightedItemIndex; /** This should ensure that if there is an attached * submenu this submenu will be detached. @@ -122,7 +122,7 @@ */ - (NSPoint) locationForSubmenu: (NSMenu *)aSubmenu; -- (void) performActionWithHighlightingForItemAtIndex: (int)index; //???? +- (void) performActionWithHighlightingForItemAtIndex: (NSInteger)index; //???? /**
This is method is responsible for handling all events while
* the user is interacting with this menu. It should pass on this
@@ -434,29 +434,29 @@
/** Returns the index of item anObject.
*/
-- (int) indexOfItem: (id See Also:
@@ -477,7 +477,7 @@
- (id See Also:
@@ -553,7 +553,7 @@
* See Also: -addEntry: -removeEntryAtIndex: Removes the entry at index index. See Also: -insertEntry:atIndex: -addEntry: Returns the index of the entry specified by aTag or -1 if aTag is not
found in entries. See Also: [NSMatrix-cellAtRow:column:] Returns the index of the current selected entry. [NSMatrix-selectedRow] Returns the NSFormCell at index index See Also: [NSMatrix-cellAtRow:column:] See Also: -cellAtIndex: [NSCell-drawWithFrame:inView:]
[NSMatrix-cellFrameAtRow:column:] Selects the text in the entry specified by index. [NSMatrix-selectTextAtRow:column:] Inserts a new column at the specified column column. See Also: -insertColumn:withCells: See Also: -insertColumn: Inserts a new row at index row. See Also: -insertRow:withCells: See Also: -insertColumn: Makes and returns new cell at row row and
column column. Returns the rectangle of the cell at row row and column
column Gets the number of rows and columns of the NSMatrix See Also: -numberOfColumns -numberOfRowsusesDataSource
returns YES else to the
* default items list.
*/
-- (int)indexOfSelectedItem
+- (NSInteger)indexOfSelectedItem
{
return [_cell indexOfSelectedItem];
}
@@ -276,7 +276,7 @@ static NSNotificationCenter *nc;
* items can be be related to the data source object in the case
* usesDataSource
returns YES else to the default items list.
*/
-- (int)numberOfItems
+- (NSInteger)numberOfItems
{
return [_cell numberOfItems];
}
@@ -332,7 +332,7 @@ static NSNotificationCenter *nc;
* is used when usesDataSource
returns NO. In the case
* usesDataSource
returns YES, this method logs a warning.
*/
-- (void)insertItemWithObjectValue:(id)object atIndex:(int)index
+- (void)insertItemWithObjectValue:(id)object atIndex:(NSInteger)index
{
[_cell insertItemWithObjectValue:object atIndex:index];
}
@@ -352,7 +352,7 @@ static NSNotificationCenter *nc;
* default items list which is used when usesDataSource
returns NO.
* In the case usesDataSource
returns YES, this method logs a warning.
*/
-- (void)removeItemAtIndex:(int)index
+- (void)removeItemAtIndex:(NSInteger)index
{
[_cell removeItemAtIndex:index];
}
@@ -387,7 +387,7 @@ static NSNotificationCenter *nc;
* raised. In the case usesDataSource
returns YES, this method logs
* a warning.
*/
-- (id)itemObjectValueAtIndex:(int)index
+- (id)itemObjectValueAtIndex:(NSInteger)index
{
return [_cell itemObjectValueAtIndex:index];
}
@@ -408,7 +408,7 @@ static NSNotificationCenter *nc;
* NSNotFound when there is no such value. In the case
* usesDataSource
returns YES, this method logs a warning.
*/
-- (int)indexOfItemWithObjectValue:(id)object
+- (NSInteger)indexOfItemWithObjectValue:(id)object
{
return [_cell indexOfItemWithObjectValue:object];
}
diff --git a/Source/NSComboBoxCell.m b/Source/NSComboBoxCell.m
index 898c10c7a..90c665ef2 100644
--- a/Source/NSComboBoxCell.m
+++ b/Source/NSComboBoxCell.m
@@ -87,10 +87,10 @@ static NSNotificationCenter *nc;
- (void) clickItem: (id)sender;
- (void) reloadData;
- (void) noteNumberOfItemsChanged;
-- (void) scrollItemAtIndexToTop: (int)index;
-- (void) scrollItemAtIndexToVisible: (int)index;
-- (void) selectItemAtIndex: (int)index;
-- (void) deselectItemAtIndex: (int)index;
+- (void) scrollItemAtIndexToTop: (NSInteger)index;
+- (void) scrollItemAtIndexToVisible: (NSInteger)index;
+- (void) selectItemAtIndex: (NSInteger)index;
+- (void) deselectItemAtIndex: (NSInteger)index;
- (void) moveUpSelection;
- (void) moveDownSelection;
- (void) validateSelection;
@@ -463,7 +463,7 @@ static GSComboWindow *gsWindow = nil;
[self reloadData];
}
-- (void) scrollItemAtIndexToTop: (int)index
+- (void) scrollItemAtIndexToTop: (NSInteger)index
{
NSRect rect;
@@ -471,12 +471,12 @@ static GSComboWindow *gsWindow = nil;
[_tableView scrollPoint: rect.origin];
}
-- (void) scrollItemAtIndexToVisible: (int)index
+- (void) scrollItemAtIndexToVisible: (NSInteger)index
{
[_tableView scrollRowToVisible: index];
}
-- (void) selectItemAtIndex: (int)index
+- (void) selectItemAtIndex: (NSInteger)index
{
if (index < 0)
return;
@@ -487,7 +487,7 @@ static GSComboWindow *gsWindow = nil;
[_tableView selectRow: index byExtendingSelection: NO];
}
-- (void) deselectItemAtIndex: (int)index
+- (void) deselectItemAtIndex: (NSInteger)index
{
[_tableView deselectAll: self];
}
@@ -750,7 +750,7 @@ static GSComboWindow *gsWindow = nil;
* Returns the maximum number of allowed items to be displayed in the combo box
* cell list.
*/
-- (int) numberOfVisibleItems
+- (NSInteger) numberOfVisibleItems
{
return _visibleItems;
}
@@ -759,7 +759,7 @@ static GSComboWindow *gsWindow = nil;
* Sets the maximum number of allowed items to be displayed in the combo box
* cell list.
*/
-- (void) setNumberOfVisibleItems: (int)visibleItems
+- (void) setNumberOfVisibleItems: (NSInteger)visibleItems
{
if (visibleItems > 10)
_visibleItems = visibleItems;
@@ -814,7 +814,7 @@ static GSComboWindow *gsWindow = nil;
* index in the closest position relative to the top. There is no
* need to have the list displayed when this method is invoked.
*/
-- (void) scrollItemAtIndexToTop: (int)index
+- (void) scrollItemAtIndexToTop: (NSInteger)index
{
[_popup scrollItemAtIndexToTop: index];
}
@@ -824,7 +824,7 @@ static GSComboWindow *gsWindow = nil;
* index visible. There is no need to have the list displayed when
* this method is invoked.
*/
-- (void) scrollItemAtIndexToVisible: (int)index
+- (void) scrollItemAtIndexToVisible: (NSInteger)index
{
[_popup scrollItemAtIndexToVisible: index];
}
@@ -836,7 +836,7 @@ static GSComboWindow *gsWindow = nil;
* Posts an NSComboBoxSelectionDidChangeNotification to the default notification
* center when there is a new selection different from the previous one.
*/
-- (void) selectItemAtIndex: (int)index
+- (void) selectItemAtIndex: (NSInteger)index
{
// Method called by GSComboWindow when a selection is done in the table view or
// the browser
@@ -865,7 +865,7 @@ static GSComboWindow *gsWindow = nil;
* Posts an NSComboBoxSelectionDidChangeNotification to the default notification
* center, when there is a new selection.
*/
-- (void) deselectItemAtIndex: (int)index
+- (void) deselectItemAtIndex: (NSInteger)index
{
if (_selectedItem == index)
{
@@ -885,7 +885,7 @@ static GSComboWindow *gsWindow = nil;
* object in the case usesDataSource
returns YES else to the
* default items list.
*/
-- (int) indexOfSelectedItem
+- (NSInteger) indexOfSelectedItem
{
return _selectedItem;
}
@@ -895,7 +895,7 @@ static GSComboWindow *gsWindow = nil;
* items can be be related to the data source object in the case
* usesDataSource
returns YES else to the default items list.
*/
-- (int) numberOfItems
+- (NSInteger) numberOfItems
{
if (_usesDataSource)
{
@@ -1002,7 +1002,7 @@ static GSComboWindow *gsWindow = nil;
* is used when usesDataSource
returns NO. In the case
* usesDataSource
returns YES, this method logs a warning.
*/
-- (void) insertItemWithObjectValue: (id)object atIndex: (int)index
+- (void) insertItemWithObjectValue: (id)object atIndex: (NSInteger)index
{
if (_usesDataSource)
{
@@ -1042,7 +1042,7 @@ static GSComboWindow *gsWindow = nil;
* default items list which is used when usesDataSource
returns NO.
* In the case usesDataSource
returns YES, this method logs a warning.
*/
-- (void) removeItemAtIndex: (int)index
+- (void) removeItemAtIndex: (NSInteger)index
{
if (_usesDataSource)
{
@@ -1110,7 +1110,7 @@ static GSComboWindow *gsWindow = nil;
* raised. In the case usesDataSource
returns YES, this method logs
* a warning.
*/
-- (id) itemObjectValueAtIndex: (int)index
+- (id) itemObjectValueAtIndex: (NSInteger)index
{
if (_usesDataSource)
{
@@ -1201,7 +1201,7 @@ static GSComboWindow *gsWindow = nil;
* NSNotFound when there is no such value. In the case
* usesDataSource
returns YES, this method logs a warning.
*/
-- (int) indexOfItemWithObjectValue: (id)object
+- (NSInteger) indexOfItemWithObjectValue: (id)object
{
if (_usesDataSource)
{
diff --git a/Source/NSForm.m b/Source/NSForm.m
index 0941d3283..231872c08 100644
--- a/Source/NSForm.m
+++ b/Source/NSForm.m
@@ -61,14 +61,14 @@ static Class defaultCellClass = nil;
- (id) initWithFrame: (NSRect)frameRect
mode: (int)aMode
cellClass: (Class)class
- numberOfRows: (int)rowsHigh
- numberOfColumns: (int)colsWide
+ numberOfRows: (NSInteger)rowsHigh
+ numberOfColumns: (NSInteger)colsWide
{
self = [super initWithFrame: (NSRect)frameRect
mode: (int)aMode
cellClass: (Class)class
- numberOfRows: (int)rowsHigh
- numberOfColumns: (int)colsWide];
+ numberOfRows: (NSInteger)rowsHigh
+ numberOfColumns: (NSInteger)colsWide];
if (nil == self)
return nil;
@@ -79,14 +79,14 @@ static Class defaultCellClass = nil;
- (id) initWithFrame: (NSRect)frameRect
mode: (int)aMode
prototype: (NSCell*)prototype
- numberOfRows: (int)rowsHigh
- numberOfColumns: (int)colsWide
+ numberOfRows: (NSInteger)rowsHigh
+ numberOfColumns: (NSInteger)colsWide
{
self = [super initWithFrame: (NSRect)frameRect
mode: (int)aMode
prototype: (NSCell*)prototype
- numberOfRows: (int)rowsHigh
- numberOfColumns: (int)colsWide];
+ numberOfRows: (NSInteger)rowsHigh
+ numberOfColumns: (NSInteger)colsWide];
if (nil == self)
return nil;
@@ -108,7 +108,7 @@ static Class defaultCellClass = nil;
Removes the NSMatrix's column at index column
See Also: -removeRow:
*/ -- (void) removeColumn: (int)column +- (void) removeColumn: (NSInteger)column { if (column >= 0 && column < _numCols) { @@ -768,10 +768,10 @@ static SEL getSel; else { #if NSMATRIX_STRICT_CHECKING == 0 - NSLog(@"remove non-existent column (%d) from matrix", column); + NSLog(@"remove non-existent column (%d) from matrix", (int) column); #else [NSException raise: NSRangeException - format: @"remove non-existent column (%d) from matrix", column]; + format: @"remove non-existent column (%d) from matrix", (int)column]; #endif } } @@ -780,7 +780,7 @@ static SEL getSel; /**Removes the NSMatrix's row at index row
See Also: -removeColumn:
*/ -- (void) removeRow: (int)row +- (void) removeRow: (NSInteger)row { if (row >= 0 && row < _numRows) { @@ -823,16 +823,16 @@ static SEL getSel; else { #if NSMATRIX_STRICT_CHECKING == 0 - NSLog(@"remove non-existent row (%d) from matrix", row); + NSLog(@"remove non-existent row (%d) from matrix", (int)row); #else [NSException raise: NSRangeException - format: @"remove non-existent row (%d) from matrix", row]; + format: @"remove non-existent row (%d) from matrix", (int)row]; #endif } } -- (void) renewRows: (int)newRows - columns: (int)newColumns +- (void) renewRows: (NSInteger)newRows + columns: (NSInteger)newColumns { [self _renewRows: newRows columns: newColumns rowSpace: 0 colSpace: 0]; } @@ -853,7 +853,7 @@ static SEL getSel; [self sizeToCells]; } -- (void) sortUsingFunction: (int (*)(id element1, id element2, +- (void) sortUsingFunction: (NSComparisonResult (*)(id element1, id element2, void *userData))comparator context: (void*)context { @@ -919,8 +919,8 @@ static SEL getSel; specified NSPoint aPoint. Returns YES if aPoint is within the NSMatrix, NO otherwise */ -- (BOOL) getRow: (int*)row - column: (int*)column +- (BOOL) getRow: (NSInteger*)row + column: (NSInteger*)column forPoint: (NSPoint)aPoint { BOOL betweenRows; @@ -996,8 +996,8 @@ static SEL getSel; specified NSCell aCell. Returns YES if aCell is in the NSMatrix, NO otherwise */ -- (BOOL) getRow: (int*)row - column: (int*)column +- (BOOL) getRow: (NSInteger*)row + column: (NSInteger*)column ofCell: (NSCell*)aCell { int i; @@ -1031,9 +1031,9 @@ static SEL getSel; to value. If the NSMatrix's mode is NSRadioModeMatrix it deselects the cell currently selected if needed. */ -- (void) setState: (int)value - atRow: (int)row - column: (int)column +- (void) setState: (NSInteger)value + atRow: (NSInteger)row + column: (NSInteger)column { NSCell *aCell = [self cellAtRow: row column: column]; @@ -1245,7 +1245,7 @@ static SEL getSel; - (void) selectCell: (NSCell *)aCell { - int row, column; + NSInteger row, column; if ([self getRow: &row column: &column ofCell: aCell] == YES) { @@ -1264,7 +1264,7 @@ static SEL getSel; the cells.See Also: -deselectSelectedCell -selectTextAtRow:column:
*/ -- (void) selectCellAtRow: (int)row column: (int)column +- (void) selectCellAtRow: (NSInteger)row column: (NSInteger)column { NSCell *aCell; @@ -1288,7 +1288,7 @@ static SEL getSel; NO otherwise.See Also: -deselectSelectedCell -selectTextAtRow:column:
*/ -- (BOOL) selectCellWithTag: (int)anInt +- (BOOL) selectCellWithTag: (NSInteger)anInt { id aCell; int i = _numRows; @@ -1333,9 +1333,9 @@ static SEL getSel; return array; } -- (void) setSelectionFrom: (int)startPos - to: (int)endPos - anchor: (int)anchorPos +- (void) setSelectionFrom: (NSInteger)startPos + to: (NSInteger)endPos + anchor: (NSInteger)anchorPos highlight: (BOOL)flag { /* Cells are selected from the anchor (A) to the point where the mouse @@ -1487,8 +1487,8 @@ static SEL getSel; Returns nil if the row or column are out of range */ -- (id) cellAtRow: (int)row - column: (int)column +- (id) cellAtRow: (NSInteger)row + column: (NSInteger)column { if (row < 0 || row >= _numRows || column < 0 || column >= _numCols) return nil; @@ -1498,7 +1498,7 @@ static SEL getSel; /**Returns the cell with tag anInt Returns nil if no cell has a tag anInt
*/ -- (id) cellWithTag: (int)anInt +- (id) cellWithTag: (NSInteger)anInt { int i = _numRows; @@ -1589,7 +1589,7 @@ static SEL getSel; methods returns the selected cell if exists and selectable, nil otherwise */ -- (id) selectTextAtRow: (int)row column: (int)column +- (id) selectTextAtRow: (NSInteger)row column: (NSInteger)column { if (row < 0 || row >= _numRows || column < 0 || column >= _numCols) return self; @@ -1658,7 +1658,7 @@ static SEL getSel; - (void) setKeyCell: (NSCell *)aCell { BOOL isValid; - int row, column; + NSInteger row, column; isValid = [self getRow: &row column: &column ofCell: aCell]; @@ -1989,8 +1989,8 @@ static SEL getSel; column visibleSee Also: -scrollRectToVisible: -cellFrameAtRow:column:
*/ -- (void) scrollCellToVisibleAtRow: (int)row - column: (int)column +- (void) scrollCellToVisibleAtRow: (NSInteger)row + column: (NSInteger)column { [self scrollRectToVisible: [self cellFrameAtRow: row column: column]]; } @@ -2071,7 +2071,7 @@ static SEL getSel; - (void) drawCell: (NSCell *)aCell { - int row, column; + NSInteger row, column; if ([self getRow: &row column: &column ofCell: aCell] == YES) { @@ -2083,7 +2083,7 @@ static SEL getSel;See Also: [NSCell-drawWithFrame:inView:] -setDrawsCellBackground: -drawsCellBackground
*/ -- (void) drawCellAtRow: (int)row column: (int)column +- (void) drawCellAtRow: (NSInteger)row column: (NSInteger)column { NSCell *aCell = [self cellAtRow: row column: column]; @@ -2119,7 +2119,7 @@ static SEL getSel; and column column. and maks the cell rect for display.See Also: -setNeedsDisplayInRect: [NSCell-setHighlighted:]
*/ -- (void) highlightCell: (BOOL)flag atRow: (int)row column: (int)column +- (void) highlightCell: (BOOL)flag atRow: (NSInteger)row column: (NSInteger)column { NSCell *aCell = [self cellAtRow: row column: column]; @@ -2243,8 +2243,8 @@ static SEL getSel; { BOOL mouseUpInCell = NO, onCell, scrolling = NO, mouseUp = NO; NSCell *mouseCell; - int mouseRow; - int mouseColumn; + NSInteger mouseRow; + NSInteger mouseColumn; NSPoint mouseLocation; NSRect mouseCellFrame; NSCell *originallySelectedCell = _selectedCell; @@ -2363,8 +2363,8 @@ static SEL getSel; - (void) _mouseDownListMode: (NSEvent *) theEvent { NSPoint locationInWindow, mouseLocation; - int mouseRow, mouseColumn; - int mouseIndex, previousIndex = 0, anchor = 0; + NSInteger mouseRow, mouseColumn; + NSInteger mouseIndex, previousIndex = 0, anchor = 0; id mouseCell, previousCell = nil; BOOL onCell; BOOL isSelecting = YES; @@ -2470,7 +2470,7 @@ static SEL getSel; dequeue: YES]; NSDebugLLog(@"NSMatrix", @"matrix: got event of type: %d\n", - [theEvent type]); + (int)[theEvent type]); if ([theEvent type] != NSPeriodic) { @@ -2488,7 +2488,7 @@ static SEL getSel; - (void) mouseDown: (NSEvent*)theEvent { - int row, column; + NSInteger row, column; NSPoint lastLocation = [theEvent locationInWindow]; int clickCount; @@ -2576,7 +2576,7 @@ static SEL getSel; - (void) updateCell: (NSCell*)aCell { - int row, col; + NSInteger row, col; NSRect rect; if ([self getRow: &row column: &col ofCell: aCell] == NO) @@ -3273,7 +3273,7 @@ static SEL getSel; /**Returns the number of rows of the NSMatrix
See Also: -numberOfColumns
*/ -- (int) numberOfRows +- (NSInteger) numberOfRows { return _numRows; } @@ -3281,7 +3281,7 @@ static SEL getSel; /**Returns the number of columns of the NSMatrix
See Also: -numberOfRows
*/ -- (int) numberOfColumns +- (NSInteger) numberOfColumns { return _numCols; } @@ -3308,7 +3308,7 @@ static SEL getSel; return _selectedRow; } -- (int) mouseDownFlags +- (NSInteger) mouseDownFlags { return mouseDownFlags; } @@ -3943,20 +3943,20 @@ static SEL getSel; if (row < 0) { #if NSMATRIX_STRICT_CHECKING == 0 - NSLog(@"renew negative row (%d) in matrix", row); + NSLog(@"renew negative row (%d) in matrix", (int)row); #else [NSException raise: NSRangeException - format: @"renew negative row (%d) in matrix", row]; + format: @"renew negative row (%d) in matrix", (int)row]; #endif row = 0; } if (col < 0) { #if NSMATRIX_STRICT_CHECKING == 0 - NSLog(@"renew negative column (%d) in matrix", col); + NSLog(@"renew negative column (%d) in matrix", (int)col); #else [NSException raise: NSRangeException - format: @"renew negative column (%d) in matrix", col]; + format: @"renew negative column (%d) in matrix", (int)col]; #endif col = 0; } diff --git a/Source/NSMenu.m b/Source/NSMenu.m index 9da26ccab..f5672f2d9 100644 --- a/Source/NSMenu.m +++ b/Source/NSMenu.m @@ -710,7 +710,7 @@ static BOOL menuBarVisible = YES; } - (void) insertItem: (idSee Also: [NSPopUpButtonCell-removeItemAtIndex:] -removeAllItems -removeItemWithTitle: -synchronizeTitleAndSelectedItem
*/ -- (void) removeItemAtIndex: (int)index +- (void) removeItemAtIndex: (NSInteger)index { [_cell removeItemAtIndex: index]; @@ -251,7 +251,7 @@ this to return nil to indicate that we have no context menu. /**Returns the index of the selected item
See Also: [NSPopUpButtonCell-indexOfSelectedItem]
*/ -- (int) indexOfSelectedItem +- (NSInteger) indexOfSelectedItem { return [_cell indexOfSelectedItem]; } @@ -274,7 +274,7 @@ this to return nil to indicate that we have no context menu. NSPopUpButton's title with the title of the selectedSee Also: [NSPopUpButtonCell-selectItemAtIndex:] -synchronizeTitleAndSelectedItem
*/ -- (void) selectItemAtIndex: (int)index +- (void) selectItemAtIndex: (NSInteger)index { [_cell selectItemAtIndex: index]; [self synchronizeTitleAndSelectedItem]; @@ -293,7 +293,7 @@ this to return nil to indicate that we have no context menu. - (BOOL) selectItemWithTag: (NSInteger)tag { - int index = [self indexOfItemWithTag: tag]; + NSInteger index = [self indexOfItemWithTag: tag]; if (index >= 0) { @@ -310,7 +310,7 @@ this to return nil to indicate that we have no context menu. /**Returns the number of items in the item list
See Also: [NSPopUpButtonCell-numberOfItems]
*/ -- (int) numberOfItems +- (NSInteger) numberOfItems { return [_cell numberOfItems]; } @@ -323,14 +323,14 @@ this to return nil to indicate that we have no context menu. /**Returns the NSMenuItem at index index or nil if index is out of range
See Also: [NSPopUpButtonCell-itemAtIndex:]
*/ -- (idReturns the item's title at index index
*/ -- (NSString*) itemTitleAtIndex: (int)index +- (NSString*) itemTitleAtIndex: (NSInteger)index { return [_cell itemTitleAtIndex: index]; } @@ -356,7 +356,7 @@ this to return nil to indicate that we have no context menu. return [_cell lastItem]; } -- (int) indexOfItem: (id