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 )anObject; +- (NSInteger) indexOfItem: (id )anObject; /** Returns the index of an item with the tag aTag. */ -- (int) indexOfItemWithTag: (int)aTag; +- (NSInteger) indexOfItemWithTag: (NSInteger)aTag; /** Returns the index of an item with the target anObject * and the actionSelector. */ -- (int) indexOfItemWithTarget: (id)anObject +- (NSInteger) indexOfItemWithTarget: (id)anObject andAction: (SEL)actionSelector; /** Returns the index of an item with the represented object anObject. */ -- (int) indexOfItemWithRepresentedObject: (id)anObject; +- (NSInteger) indexOfItemWithRepresentedObject: (id)anObject; /** Returns the index of an item with the submenu anObject. */ -- (int) indexOfItemWithSubmenu: (NSMenu *)anObject; +- (NSInteger) indexOfItemWithSubmenu: (NSMenu *)anObject; /** Returns the index of an item with the title aTitle. */ -- (int) indexOfItemWithTitle: (NSString *)aTitle; +- (NSInteger) indexOfItemWithTitle: (NSString *)aTitle; /** */ @@ -465,7 +465,7 @@ /** Insert newItem at position index. */ - (void) insertItem: (id )newItem - atIndex: (int)index; + atIndex: (NSInteger)index; /** Inserts a new menu item at position index. *

See Also: @@ -477,7 +477,7 @@ - (id ) insertItemWithTitle: (NSString *)aString action: (SEL)aSelector keyEquivalent: (NSString *)charCode - atIndex: (unsigned int)index; + atIndex: (NSInteger)index; /** Returns if this menu is attached to its supermenu, * return nil if it does not have a parent menu. @@ -500,7 +500,7 @@ /** Returns an item located at index. */ -- (id ) itemAtIndex: (int)index; +- (id ) itemAtIndex: (NSInteger)index; /** Informs the menu that the specified item has changed. */ @@ -514,7 +514,7 @@ * [(NSMenuItem)-tag] * */ -- (id ) itemWithTag: (int)aTag; +- (id ) itemWithTag: (NSInteger)aTag; /** Returns an item with aString as its title. */ @@ -543,7 +543,7 @@ /** Returns the numbers of items on the menu */ -- (int) numberOfItems; +- (NSInteger) numberOfItems; /** Simulates a mouse click on item located at index. *

See Also: @@ -553,7 +553,7 @@ * -indexOfItemWithTitle: * */ -- (void) performActionForItemAtIndex: (int)index; +- (void) performActionForItemAtIndex: (NSInteger)index; /** Looks for a menu item that responds to theEvent on the receiver. If * the receiver is a submenu, the method is performed on it. @@ -566,7 +566,7 @@ /** Removes item at position index. */ -- (void) removeItemAtIndex: (int)index; +- (void) removeItemAtIndex: (NSInteger)index; /** Sets if a menu does autoenable. */ @@ -665,10 +665,10 @@ #if OS_API_VERSION(MAC_OS_X_VERSION_10_3, GS_API_LATEST) @interface NSObject (NSMenuDelegate) - (void) menuNeedsUpdate: (NSMenu *)menu; -- (int) numberOfItemsInMenu: (NSMenu *)menu; +- (NSInteger) numberOfItemsInMenu: (NSMenu *)menu; - (BOOL) menu: (NSMenu *)menu updateItem: (NSMenuItem *)item - atIndex: (int)index + atIndex: (NSInteger)index shouldCancel: (BOOL)shouldCancel; - (BOOL) menuHasKeyEquivalent: (NSMenu *)menu forEvent: (NSEvent *)event diff --git a/Headers/AppKit/NSMenuView.h b/Headers/AppKit/NSMenuView.h index 5fab0fb9f..9e3bde28c 100644 --- a/Headers/AppKit/NSMenuView.h +++ b/Headers/AppKit/NSMenuView.h @@ -164,24 +164,24 @@ /** Highlights item with at index. If index is -1 all highlighing is removed. */ -- (void) setHighlightedItemIndex: (int)index; +- (void) setHighlightedItemIndex: (NSInteger)index; /** Returns the index of the highlighted item. Returns -1 if there is no highlighted item. */ -- (int) highlightedItemIndex; +- (NSInteger) highlightedItemIndex; /** Replaces item cell at index with cell. Highlighting of item is preserved. */ - (void) setMenuItemCell: (NSMenuItemCell *)cell - forItemAtIndex: (int)index; + forItemAtIndex: (NSInteger)index; /** Returns cell associated with item at index. */ -- (NSMenuItemCell *) menuItemCellForItemAtIndex: (int)index; +- (NSMenuItemCell *) menuItemCellForItemAtIndex: (NSInteger)index; /** Returns menu view associated with visible attached submenu. @@ -261,7 +261,7 @@ Attach submenu if the item at index is a submenu. It will figure out if the new submenu should be transient or not. */ -- (void) attachSubmenuForItemAtIndex: (int)index; +- (void) attachSubmenuForItemAtIndex: (NSInteger)index; /*********************************************************************** * Calculating menu geometry @@ -333,18 +333,18 @@ Returns frame rectangle of menu item cell. It is smaller by 1 pixel in width than menu window (dark gray border). */ -- (NSRect) rectOfItemAtIndex: (int)index; +- (NSRect) rectOfItemAtIndex: (NSInteger)index; /** Returns the index of the item below point. Returns -1 if mouse is not above a menu item. */ -- (int) indexOfItemAtPoint: (NSPoint)point; +- (NSInteger) indexOfItemAtPoint: (NSPoint)point; /** Calls setNeedsDisplayInRect: for rectangle occupied by item at index. */ -- (void) setNeedsDisplayForItemAtIndex: (int)index; +- (void) setNeedsDisplayForItemAtIndex: (NSInteger)index; /** Returns the correct frame origin for aSubmenu based on the location @@ -363,12 +363,12 @@ - (void) setWindowFrameForAttachingToRect: (NSRect)screenRect onScreen: (NSScreen *)screen preferredEdge: (NSRectEdge)edge - popUpSelectedItem: (int)selectedItemIndex; + popUpSelectedItem: (NSInteger)selectedItemIndex; /*********************************************************************** * Event handling ***********************************************************************/ -- (void) performActionWithHighlightingForItemAtIndex: (int)index; +- (void) performActionWithHighlightingForItemAtIndex: (NSInteger)index; /** This method is responsible for tracking the mouse while this menu diff --git a/Headers/AppKit/NSPopUpButton.h b/Headers/AppKit/NSPopUpButton.h index 5ee57c42e..70399b54e 100644 --- a/Headers/AppKit/NSPopUpButton.h +++ b/Headers/AppKit/NSPopUpButton.h @@ -59,31 +59,31 @@ - (void)addItemWithTitle:(NSString *)title; - (void)addItemsWithTitles:(NSArray *)itemTitles; - (void)insertItemWithTitle:(NSString *)title - atIndex:(int)index; + atIndex:(NSInteger)index; - (void)removeAllItems; - (void)removeItemWithTitle:(NSString *)title; -- (void)removeItemAtIndex:(int)index; +- (void)removeItemAtIndex:(NSInteger)index; - (id )selectedItem; - (NSString *)titleOfSelectedItem; -- (int)indexOfSelectedItem; +- (NSInteger)indexOfSelectedItem; - (void)selectItem:(id )anObject; -- (void)selectItemAtIndex:(int)index; +- (void)selectItemAtIndex:(NSInteger)index; - (void)selectItemWithTitle:(NSString *)title; #if OS_API_VERSION(MAC_OS_X_VERSION_10_4, GS_API_LATEST) - (BOOL) selectItemWithTag: (NSInteger)tag; #endif -- (int)numberOfItems; +- (NSInteger)numberOfItems; - (NSArray *)itemArray; -- (id )itemAtIndex:(int)index; -- (NSString *)itemTitleAtIndex:(int)index; +- (id )itemAtIndex:(NSInteger)index; +- (NSString *)itemTitleAtIndex:(NSInteger)index; - (NSArray *)itemTitles; - (id )itemWithTitle:(NSString *)title; - (id )lastItem; -- (int)indexOfItem:(id )anObject; -- (int)indexOfItemWithTag:(int)tag; -- (int)indexOfItemWithTitle:(NSString *)title; -- (int)indexOfItemWithRepresentedObject:(id)anObject; -- (int)indexOfItemWithTarget:(id)target +- (NSInteger)indexOfItem:(id )anObject; +- (NSInteger)indexOfItemWithTag:(NSInteger)tag; +- (NSInteger)indexOfItemWithTitle:(NSString *)title; +- (NSInteger)indexOfItemWithRepresentedObject:(id)anObject; +- (NSInteger)indexOfItemWithTarget:(id)target andAction:(SEL)actionSelector; - (void)setPreferredEdge:(NSRectEdge)edge; - (NSRectEdge)preferredEdge; diff --git a/Headers/AppKit/NSPopUpButtonCell.h b/Headers/AppKit/NSPopUpButtonCell.h index 85d1e90dc..0838a1a10 100644 --- a/Headers/AppKit/NSPopUpButtonCell.h +++ b/Headers/AppKit/NSPopUpButtonCell.h @@ -74,7 +74,7 @@ typedef enum { /** * Index of the currently selected item in the reciever. */ -- (int) indexOfSelectedItem; +- (NSInteger) indexOfSelectedItem; /** * Synchronizes the title and the selected item. This sets @@ -90,7 +90,7 @@ typedef enum { /** * Select item at the given index. */ -- (void) selectItemAtIndex: (int)index; +- (void) selectItemAtIndex: (NSInteger)index; /** * Select the item with the given title. @@ -194,7 +194,7 @@ typedef enum { * index, it, and all items after it are advanced one position. Index needs * to be within the valid range for the array of items in the popup button. */ -- (void) insertItemWithTitle: (NSString*)title atIndex: (int)index; +- (void) insertItemWithTitle: (NSString*)title atIndex: (NSInteger)index; /** * Remove a given item based on its title. @@ -205,7 +205,7 @@ typedef enum { * Remove a given item based on its index, must be a valid index within the * range for the item array of this popup. */ -- (void) removeItemAtIndex: (int)index; +- (void) removeItemAtIndex: (NSInteger)index; /** * Purges all items from the popup. @@ -221,38 +221,38 @@ typedef enum { /** * Number of items in the reciever. */ -- (int) numberOfItems; +- (NSInteger) numberOfItems; /** * Return the index of item in the item array of the reciever. */ -- (int) indexOfItem: (id)item; +- (NSInteger) indexOfItem: (id)item; /** * Return index of the item with the given title. */ -- (int) indexOfItemWithTitle: (NSString*)title; +- (NSInteger) indexOfItemWithTitle: (NSString*)title; /** * Return index of the item with a tag equal to aTag. */ -- (int) indexOfItemWithTag: (int)tag; +- (NSInteger) indexOfItemWithTag: (NSInteger)tag; /** * Index of the item whose menu item's representedObject is equal to obj. */ -- (int) indexOfItemWithRepresentedObject: (id)obj; +- (NSInteger) indexOfItemWithRepresentedObject: (id)obj; /** * Index of the item in the reciever whose target and action * are equal to aTarget and actionSelector. */ -- (int) indexOfItemWithTarget: (id)aTarget andAction: (SEL)actionSelector; +- (NSInteger) indexOfItemWithTarget: (id)aTarget andAction: (SEL)actionSelector; /** * Return the item at index. */ -- (id ) itemAtIndex: (int)index; +- (id ) itemAtIndex: (NSInteger)index; /** * Return the item with title. @@ -269,7 +269,7 @@ typedef enum { /** * Set item title at the given index in the reciever. */ -- (NSString*) itemTitleAtIndex: (int)index; +- (NSString*) itemTitleAtIndex: (NSInteger)index; /** * Returns an array containing all of the current item titles. diff --git a/Source/NSBrowser.m b/Source/NSBrowser.m index 3d54acbb9..79d0454ef 100644 --- a/Source/NSBrowser.m +++ b/Source/NSBrowser.m @@ -1088,7 +1088,7 @@ static NSTextFieldCell *titleCell; selectedCellsEnumerator = [selectedCells objectEnumerator]; while ((cell = [selectedCellsEnumerator nextObject]) != nil) { - int sRow, sColumn; + NSInteger sRow, sColumn; if ([matrix getRow: &sRow column: &sColumn ofCell: cell]) { diff --git a/Source/NSComboBox.m b/Source/NSComboBox.m index 8b418840f..e894ea156 100644 --- a/Source/NSComboBox.m +++ b/Source/NSComboBox.m @@ -159,7 +159,7 @@ static NSNotificationCenter *nc; * Returns the maximum number of allowed items to be displayed in the combo box * cell list. */ -- (int)numberOfVisibleItems +- (NSInteger)numberOfVisibleItems { return [_cell numberOfVisibleItems]; } @@ -168,7 +168,7 @@ static NSNotificationCenter *nc; * Sets the maximum number of allowed items to be displayed in the combo box * cell list. */ -- (void)setNumberOfVisibleItems:(int)visibleItems +- (void)setNumberOfVisibleItems:(NSInteger)visibleItems { [_cell setNumberOfVisibleItems:visibleItems]; } @@ -222,7 +222,7 @@ static NSNotificationCenter *nc; * 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 { [_cell scrollItemAtIndexToTop:index]; } @@ -232,7 +232,7 @@ static NSNotificationCenter *nc; * index visible. There is no need to have the list displayed when * this method is invoked. */ -- (void)scrollItemAtIndexToVisible:(int)index +- (void)scrollItemAtIndexToVisible:(NSInteger)index { [_cell scrollItemAtIndexToVisible:index]; } @@ -244,7 +244,7 @@ static NSNotificationCenter *nc; * 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 { [_cell selectItemAtIndex:index]; } @@ -255,7 +255,7 @@ static NSNotificationCenter *nc; * Posts an NSComboBoxSelectionDidChangeNotification to the default notification * center, when there is a new selection. */ -- (void)deselectItemAtIndex:(int)index +- (void)deselectItemAtIndex:(NSInteger)index { [_cell deselectItemAtIndex:index]; } @@ -266,7 +266,7 @@ static NSNotificationCenter *nc; * object in the case usesDataSource 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;

See Also: -addEntry: -removeEntryAtIndex:

*/ - (NSFormCell*) insertEntry: (NSString*)title - atIndex: (int)index + atIndex: (NSInteger)index { NSFormCell *new_cell = [[[object_getClass(self) cellClass] alloc] initTextCell: title]; @@ -122,7 +122,7 @@ static Class defaultCellClass = nil; /**

Removes the entry at index index.

See Also: -insertEntry:atIndex: -addEntry:

*/ -- (void) removeEntryAtIndex: (int)index +- (void) removeEntryAtIndex: (NSInteger)index { [[NSNotificationCenter defaultCenter] removeObserver: self @@ -134,7 +134,7 @@ static Class defaultCellClass = nil; /* Overriding this method allows decoding stuff to be inherited simpler by NSForm */ -- (void) putCell: (NSCell*)newCell atRow: (int)row column: (int)column +- (void) putCell: (NSCell*)newCell atRow: (NSInteger)row column: (NSInteger)column { if (column > 0) { @@ -167,7 +167,7 @@ static Class defaultCellClass = nil; */ - (void) setBezeled: (BOOL)flag { - int i, count = [self numberOfRows]; + NSInteger i, count = [self numberOfRows]; /* Set the bezeled attribute to the cell prototype */ [[self prototype] setBezeled: flag]; @@ -181,7 +181,7 @@ static Class defaultCellClass = nil; */ - (void) setBordered: (BOOL)flag { - int i, count = [self numberOfRows]; + NSInteger i, count = [self numberOfRows]; /* Set the bordered attribute to the cell prototype */ [[self prototype] setBordered: flag]; @@ -230,7 +230,7 @@ static Class defaultCellClass = nil; */ - (void) setTitleAlignment: (NSTextAlignment)aMode { - int i, count = [self numberOfRows]; + NSInteger i, count = [self numberOfRows]; /* Set the title alignment attribute to the cell prototype */ [[self prototype] setTitleAlignment: aMode]; @@ -246,7 +246,7 @@ static Class defaultCellClass = nil; */ - (void) setTextAlignment: (int)aMode { - int i, count = [self numberOfRows]; + NSInteger i, count = [self numberOfRows]; /* Set the text alignment attribute to the cell prototype */ [[self prototype] setAlignment: aMode]; @@ -260,7 +260,7 @@ static Class defaultCellClass = nil; */ - (void) setTitleFont: (NSFont*)fontObject { - int i, count = [self numberOfRows]; + NSInteger i, count = [self numberOfRows]; /* Set the title font attribute to the cell prototype */ [[self prototype] setTitleFont: fontObject]; @@ -274,7 +274,7 @@ static Class defaultCellClass = nil; */ - (void) setTextFont: (NSFont*)fontObject { - int i, count = [self numberOfRows]; + NSInteger i, count = [self numberOfRows]; /* Set the text font attribute to the cell prototype */ [[self prototype] setFont: fontObject]; @@ -288,7 +288,7 @@ static Class defaultCellClass = nil; */ - (void) setTitleBaseWritingDirection: (NSWritingDirection)direction { - int i, count = [self numberOfRows]; + NSInteger i, count = [self numberOfRows]; /* Set the writing direction attribute to the cell prototype */ [[self prototype] setTitleBaseWritingDirection: direction]; @@ -302,7 +302,7 @@ static Class defaultCellClass = nil; */ - (void) setTextBaseWritingDirection: (NSWritingDirection)direction { - int i, count = [self numberOfRows]; + NSInteger i, count = [self numberOfRows]; /* Set the writing direction attribute to the cell prototype */ [[self prototype] setBaseWritingDirection: direction]; @@ -314,9 +314,9 @@ static Class defaultCellClass = nil; /**

Returns the index of the entry specified by aTag or -1 if aTag is not found in entries.

See Also: [NSMatrix-cellAtRow:column:]

*/ -- (int) indexOfCellWithTag: (int)aTag +- (NSInteger) indexOfCellWithTag: (NSInteger)aTag { - int i, count = [self numberOfRows]; + NSInteger i, count = [self numberOfRows]; for (i = 0; i < count; i++) if ([[self cellAtRow: i column: 0] tag] == aTag) @@ -327,7 +327,7 @@ static Class defaultCellClass = nil; /**

Returns the index of the current selected entry.

[NSMatrix-selectedRow]

*/ -- (int) indexOfSelectedItem +- (NSInteger) indexOfSelectedItem { return [self selectedRow]; } @@ -335,7 +335,7 @@ static Class defaultCellClass = nil; /**

Returns the NSFormCell at index index

See Also: [NSMatrix-cellAtRow:column:]

*/ -- (id) cellAtIndex: (int)index +- (id) cellAtIndex: (NSInteger)index { return [self cellAtRow: index column: 0]; } @@ -355,7 +355,7 @@ static Class defaultCellClass = nil; - (void) calcSize { - int i, count = [self numberOfRows]; + NSInteger i, count = [self numberOfRows]; float new_title_width = 0; float candidate_title_width = 0; NSRect rect; @@ -389,7 +389,7 @@ static Class defaultCellClass = nil;

See Also: -cellAtIndex: [NSCell-drawWithFrame:inView:] [NSMatrix-cellFrameAtRow:column:]

*/ -- (void) drawCellAtIndex: (int)index +- (void) drawCellAtIndex: (NSInteger)index { id theCell = [self cellAtIndex: index]; @@ -397,7 +397,7 @@ static Class defaultCellClass = nil; inView: self]; } -- (void) drawCellAtRow: (int)row column: (int)column +- (void) drawCellAtRow: (NSInteger)row column: (NSInteger)column { [self drawCellAtIndex: row]; } @@ -405,7 +405,7 @@ static Class defaultCellClass = nil; /**

Selects the text in the entry specified by index.

[NSMatrix-selectTextAtRow:column:]

*/ -- (void) selectTextAtIndex: (int)index +- (void) selectTextAtIndex: (NSInteger)index { [self selectTextAtRow: index column: 0]; } diff --git a/Source/NSMatrix.m b/Source/NSMatrix.m index 80cfd4fe7..a72d36b56 100644 --- a/Source/NSMatrix.m +++ b/Source/NSMatrix.m @@ -344,8 +344,8 @@ static SEL getSel; - (id) initWithFrame: (NSRect)frameRect mode: (int)aMode cellClass: (Class)classId - numberOfRows: (int)rowsHigh - numberOfColumns: (int)colsWide + numberOfRows: (NSInteger)rowsHigh + numberOfColumns: (NSInteger)colsWide { if ( ! ( self = [super initWithFrame: frameRect] ) ) return nil; @@ -367,8 +367,8 @@ static SEL getSel; - (id) initWithFrame: (NSRect)frameRect mode: (int)aMode prototype: (NSCell*)aCell - numberOfRows: (int)rowsHigh - numberOfColumns: (int)colsWide + numberOfRows: (NSInteger)rowsHigh + numberOfColumns: (NSInteger)colsWide { if (! ( self = [super initWithFrame: frameRect] ) ) return nil; @@ -457,7 +457,7 @@ static SEL getSel; /**

Inserts a new column at the specified column column.

See Also: -insertColumn:withCells:

*/ -- (void) insertColumn: (int)column +- (void) insertColumn: (NSInteger)column { [self insertColumn: column withCells: nil]; } @@ -467,7 +467,7 @@ static SEL getSel; the matrix as necessay if needed

See Also: -insertColumn:

*/ -- (void) insertColumn: (int)column withCells: (NSArray*)cellArray +- (void) insertColumn: (NSInteger)column withCells: (NSArray*)cellArray { int count = [cellArray count]; int i = _numCols + 1; @@ -476,10 +476,10 @@ static SEL getSel; { column = 0; #if NSMATRIX_STRICT_CHECKING == 0 - NSLog(@"insert negative column (%d) in matrix", column); + NSLog(@"insert negative column (%d) in matrix", (int)column); #else [NSException raise: NSRangeException - format: @"insert negative column (%d) in matrix", column]; + format: @"insert negative column (%d) in matrix", (int)column]; #endif } @@ -554,7 +554,7 @@ static SEL getSel; /**

Inserts a new row at index row.

See Also: -insertRow:withCells:

*/ -- (void) insertRow: (int)row +- (void) insertRow: (NSInteger)row { [self insertRow: row withCells: nil]; } @@ -564,7 +564,7 @@ static SEL getSel; the matrix as necessay if needed

See Also: -insertColumn:

*/ -- (void) insertRow: (int)row withCells: (NSArray*)cellArray +- (void) insertRow: (NSInteger)row withCells: (NSArray*)cellArray { int count = [cellArray count]; int i = _numRows + 1; @@ -573,10 +573,10 @@ static SEL getSel; { row = 0; #if NSMATRIX_STRICT_CHECKING == 0 - NSLog(@"insert negative row (%d) in matrix", row); + NSLog(@"insert negative row (%d) in matrix", (int)row); #else [NSException raise: NSRangeException - format: @"insert negative row (%d) in matrix", row]; + format: @"insert negative row (%d) in matrix", (int)row]; #endif } @@ -647,8 +647,8 @@ static SEL getSel; /**

Makes and returns new cell at row row and column column.

*/ -- (NSCell*) makeCellAtRow: (int)row - column: (int)column +- (NSCell*) makeCellAtRow: (NSInteger)row + column: (NSInteger)column { NSCell *aCell; @@ -677,8 +677,8 @@ static SEL getSel; /**

Returns the rectangle of the cell at row row and column column

*/ -- (NSRect) cellFrameAtRow: (int)row - column: (int)column +- (NSRect) cellFrameAtRow: (NSInteger)row + column: (NSInteger)column { NSRect rect; @@ -691,8 +691,8 @@ static SEL getSel; /**

Gets the number of rows and columns of the NSMatrix

See Also: -numberOfColumns -numberOfRows

*/ -- (void) getNumberOfRows: (int*)rowCount - columns: (int*)columnCount +- (void) getNumberOfRows: (NSInteger*)rowCount + columns: (NSInteger*)columnCount { *rowCount = _numRows; *columnCount = _numCols; @@ -704,8 +704,8 @@ static SEL getSel; are out of range.

*/ - (void) putCell: (NSCell*)newCell - atRow: (int)row - column: (int)column + atRow: (NSInteger)row + column: (NSInteger)column { if (row < 0 || row >= _numRows || column < 0 || column >= _numCols) { @@ -727,7 +727,7 @@ static SEL getSel; /**

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 visible

See 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: (id )newItem - atIndex: (int)index + atIndex: (NSInteger)index { NSNotification *inserted; NSDictionary *d; @@ -757,7 +757,7 @@ static BOOL menuBarVisible = YES; - (id ) insertItemWithTitle: (NSString*)aString action: (SEL)aSelector keyEquivalent: (NSString*)charCode - atIndex: (unsigned int)index + atIndex: (NSInteger)index { NSMenuItem *anItem = [[NSMenuItem alloc] initWithTitle: aString action: aSelector @@ -795,7 +795,7 @@ static BOOL menuBarVisible = YES; [self removeItemAtIndex: index]; } -- (void) removeItemAtIndex: (int)index +- (void) removeItemAtIndex: (NSInteger)index { NSNotification *removed; NSDictionary *d; @@ -827,7 +827,7 @@ static BOOL menuBarVisible = YES; { NSNotification *changed; NSDictionary *d; - int index = [self indexOfItem: anObject]; + NSInteger index = [self indexOfItem: anObject]; if (-1 == index) return; @@ -855,7 +855,7 @@ static BOOL menuBarVisible = YES; /* * Finding Menu Items */ -- (id ) itemWithTag: (int)aTag +- (id ) itemWithTag: (NSInteger)aTag { unsigned i; unsigned count = [_items count]; @@ -885,16 +885,16 @@ static BOOL menuBarVisible = YES; return nil; } -- (id ) itemAtIndex: (int)index +- (id ) itemAtIndex: (NSInteger)index { - if (index >= (int)[_items count] || index < 0) + if (index >= [_items count] || index < 0) [NSException raise: NSRangeException format: @"Range error in method -itemAtIndex: "]; return [_items objectAtIndex: index]; } -- (int) numberOfItems +- (NSInteger) numberOfItems { return [_items count]; } @@ -907,7 +907,7 @@ static BOOL menuBarVisible = YES; /* * Finding Indices of Menu Items */ -- (int) indexOfItem: (id )anObject +- (NSInteger) indexOfItem: (id )anObject { NSUInteger index; @@ -919,7 +919,7 @@ static BOOL menuBarVisible = YES; return index; } -- (int) indexOfItemWithTitle: (NSString*)aTitle +- (NSInteger) indexOfItemWithTitle: (NSString*)aTitle { id anItem; @@ -929,7 +929,7 @@ static BOOL menuBarVisible = YES; return -1; } -- (int) indexOfItemWithTag: (int)aTag +- (NSInteger) indexOfItemWithTag: (NSInteger)aTag { id anItem; @@ -939,7 +939,7 @@ static BOOL menuBarVisible = YES; return -1; } -- (int) indexOfItemWithTarget: (id)anObject +- (NSInteger) indexOfItemWithTarget: (id)anObject andAction: (SEL)actionSelector { unsigned i; @@ -962,9 +962,9 @@ static BOOL menuBarVisible = YES; return -1; } -- (int) indexOfItemWithRepresentedObject: (id)anObject +- (NSInteger) indexOfItemWithRepresentedObject: (id)anObject { - int i, count = [_items count]; + NSInteger i, count = [_items count]; for (i = 0; i < count; i++) { @@ -978,9 +978,9 @@ static BOOL menuBarVisible = YES; return -1; } -- (int) indexOfItemWithSubmenu: (NSMenu *)anObject +- (NSInteger) indexOfItemWithSubmenu: (NSMenu *)anObject { - int i, count = [_items count]; + NSInteger i, count = [_items count]; for (i = 0; i < count; i++) { @@ -1084,14 +1084,14 @@ static BOOL menuBarVisible = YES; } else if ([_delegate respondsToSelector:@selector(numberOfItemsInMenu:)]) { - int num; + NSInteger num; num = [_delegate numberOfItemsInMenu: self]; if (num > 0) { BOOL cont = YES; - int i = 0; - int curr = [self numberOfItems]; + NSInteger i = 0; + NSInteger curr = [self numberOfItems]; while (num < curr) { @@ -1288,7 +1288,7 @@ static BOOL menuBarVisible = YES; // // Simulating Mouse Clicks // -- (void) performActionForItemAtIndex: (int)index +- (void) performActionForItemAtIndex: (NSInteger)index { id item = [_items objectAtIndex: index]; NSDictionary *d; diff --git a/Source/NSMenuView.m b/Source/NSMenuView.m index d1498e857..7e1805496 100644 --- a/Source/NSMenuView.m +++ b/Source/NSMenuView.m @@ -363,7 +363,7 @@ static NSMapTable *viewInfo = 0; return _font; } -- (void) setHighlightedItemIndex: (int)index +- (void) setHighlightedItemIndex: (NSInteger)index { NSMenuItemCell *aCell; @@ -390,13 +390,13 @@ static NSMapTable *viewInfo = 0; } } -- (int) highlightedItemIndex +- (NSInteger) highlightedItemIndex { return _highlightedItemIndex; } - (void) setMenuItemCell: (NSMenuItemCell *)cell - forItemAtIndex: (int)index + forItemAtIndex: (NSInteger)index { NSMenuItem *anItem = [_items_link objectAtIndex: index]; @@ -416,7 +416,7 @@ static NSMapTable *viewInfo = 0; [self setNeedsDisplayForItemAtIndex: index]; } -- (NSMenuItemCell*) menuItemCellForItemAtIndex: (int)index +- (NSMenuItemCell*) menuItemCellForItemAtIndex: (NSInteger)index { if (index < [_itemCells count]) return [_itemCells objectAtIndex: index]; @@ -564,7 +564,7 @@ static NSMapTable *viewInfo = 0; } } -- (void) attachSubmenuForItemAtIndex: (int)index +- (void) attachSubmenuForItemAtIndex: (NSInteger)index { /* * Transient menus are used for torn-off menus, which are already on the @@ -962,7 +962,7 @@ static NSMapTable *viewInfo = 0; } } -- (NSRect) rectOfItemAtIndex: (int)index +- (NSRect) rectOfItemAtIndex: (NSInteger)index { if (_needsSizing == YES) { @@ -1001,7 +1001,7 @@ static NSMapTable *viewInfo = 0; } } -- (int) indexOfItemAtPoint: (NSPoint)point +- (NSInteger) indexOfItemAtPoint: (NSPoint)point { unsigned howMany = [_itemCells count]; unsigned i; @@ -1029,7 +1029,7 @@ static NSMapTable *viewInfo = 0; return -1; } -- (void) setNeedsDisplayForItemAtIndex: (int)index +- (void) setNeedsDisplayForItemAtIndex: (NSInteger)index { NSRect aRect; @@ -1102,7 +1102,7 @@ static NSMapTable *viewInfo = 0; - (void) setWindowFrameForAttachingToRect: (NSRect)screenRect onScreen: (NSScreen*)screen preferredEdge: (NSRectEdge)edge - popUpSelectedItem: (int)selectedItemIndex + popUpSelectedItem: (NSInteger)selectedItemIndex { NSRect r; NSRect cellFrame; @@ -1361,7 +1361,7 @@ static NSMapTable *viewInfo = 0; /* * Event Handling */ -- (void) performActionWithHighlightingForItemAtIndex: (int)index +- (void) performActionWithHighlightingForItemAtIndex: (NSInteger)index { NSMenu *candidateMenu = _attachedMenu; NSMenuView *targetMenuView; diff --git a/Source/NSPopUpButton.m b/Source/NSPopUpButton.m index 8f97efdbb..8fb6bcc27 100644 --- a/Source/NSPopUpButton.m +++ b/Source/NSPopUpButton.m @@ -188,7 +188,7 @@ this to return nil to indicate that we have no context menu. -synchronizeTitleAndSelectedItem

*/ - (void) insertItemWithTitle: (NSString*)title - atIndex: (int)index + atIndex: (NSInteger)index { [_cell insertItemWithTitle: title atIndex: index]; @@ -225,7 +225,7 @@ this to return nil to indicate that we have no context menu.

See 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 selected

See 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:]

*/ -- (id ) itemAtIndex: (int)index +- (id ) itemAtIndex: (NSInteger)index { return [_cell itemAtIndex: index]; } /**

Returns 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 )anObject +- (NSInteger) indexOfItem: (id )anObject { return [_cell indexOfItem: anObject]; } @@ -366,7 +366,7 @@ this to return nil to indicate that we have no context menu. [NSPopUpButtonCell-indexOfItemWithTag:] -indexOfItemWithTitle: -indexOfItemWithRepresentedObject:

*/ -- (int) indexOfItemWithTag: (int)tag +- (NSInteger) indexOfItemWithTag: (NSInteger)tag { return [_cell indexOfItemWithTag: tag]; } @@ -376,17 +376,17 @@ this to return nil to indicate that we have no context menu. [NSPopUpButtonCell-indexOfItemWithTitle:] -indexOfItemWithTag: -indexOfItemWithRepresentedObject:

*/ -- (int) indexOfItemWithTitle: (NSString*)title +- (NSInteger) indexOfItemWithTitle: (NSString*)title { return [_cell indexOfItemWithTitle: title]; } -- (int) indexOfItemWithRepresentedObject: (id)anObject +- (NSInteger) indexOfItemWithRepresentedObject: (id)anObject { return [_cell indexOfItemWithRepresentedObject: anObject]; } -- (int) indexOfItemWithTarget: (id)target +- (NSInteger) indexOfItemWithTarget: (id)target andAction: (SEL)actionSelector { return [_cell indexOfItemWithTarget: target andAction: actionSelector]; @@ -485,7 +485,7 @@ this to return nil to indicate that we have no context menu. } case ' ': { - int selectedIndex; + NSInteger selectedIndex; NSMenuView *menuView; // Beep, as on OS, and then return. @@ -518,7 +518,7 @@ this to return nil to indicate that we have no context menu. case NSUpArrowFunctionKey: { NSMenuView *menuView; - int selectedIndex, numberOfItems; + NSInteger selectedIndex, numberOfItems; menuView = [[_cell menu] menuRepresentation]; selectedIndex = [menuView highlightedItemIndex]; @@ -542,7 +542,7 @@ this to return nil to indicate that we have no context menu. case NSDownArrowFunctionKey: { NSMenuView *menuView; - int selectedIndex, numberOfItems; + NSInteger selectedIndex, numberOfItems; menuView = [[_cell menu] menuRepresentation]; selectedIndex = [menuView highlightedItemIndex]; diff --git a/Source/NSPopUpButtonCell.m b/Source/NSPopUpButtonCell.m index e5a2d29fd..a85f51b45 100644 --- a/Source/NSPopUpButtonCell.m +++ b/Source/NSPopUpButtonCell.m @@ -393,10 +393,10 @@ static NSImage *_pbc_image[5]; * index, it, and all items after it are advanced one position. Index needs * to be within the valid range for the array of items in the popup button. */ -- (void) insertItemWithTitle: (NSString *)title atIndex: (int)index +- (void) insertItemWithTitle: (NSString *)title atIndex: (NSInteger)index { id anItem; - int i, count; + NSInteger i, count; i = [self indexOfItemWithTitle: title]; @@ -448,7 +448,7 @@ static NSImage *_pbc_image[5]; * Remove a given item based on its index, must be a valid index within the * range for the item array of this popup. */ -- (void) removeItemAtIndex: (int)index +- (void) removeItemAtIndex: (NSInteger)index { if (index == [self indexOfSelectedItem]) { @@ -483,7 +483,7 @@ static NSImage *_pbc_image[5]; /** * Number of items in the reciever. */ -- (int) numberOfItems +- (NSInteger) numberOfItems { return [_menu numberOfItems]; } @@ -491,7 +491,7 @@ static NSImage *_pbc_image[5]; /** * Return the index of item in the item array of the reciever. */ -- (int) indexOfItem: (id )item +- (NSInteger) indexOfItem: (id )item { return [_menu indexOfItem: item]; } @@ -499,7 +499,7 @@ static NSImage *_pbc_image[5]; /** * Return index of the item with the given title. */ -- (int) indexOfItemWithTitle: (NSString *)title +- (NSInteger) indexOfItemWithTitle: (NSString *)title { return [_menu indexOfItemWithTitle: title]; } @@ -507,7 +507,7 @@ static NSImage *_pbc_image[5]; /** * Return index of the item with a tag equal to aTag. */ -- (int) indexOfItemWithTag: (int)tag +- (NSInteger) indexOfItemWithTag: (NSInteger)tag { return [_menu indexOfItemWithTag: tag]; } @@ -515,7 +515,7 @@ static NSImage *_pbc_image[5]; /** * Index of the item whose menu item's representedObject is equal to obj. */ -- (int) indexOfItemWithRepresentedObject: (id)obj +- (NSInteger) indexOfItemWithRepresentedObject: (id)obj { return [_menu indexOfItemWithRepresentedObject: obj]; } @@ -524,7 +524,7 @@ static NSImage *_pbc_image[5]; * Index of the item in the reciever whose target and action * are equal to aTarget and actionSelector. */ -- (int) indexOfItemWithTarget: (id)aTarget andAction: (SEL)actionSelector +- (NSInteger) indexOfItemWithTarget: (id)aTarget andAction: (SEL)actionSelector { return [_menu indexOfItemWithTarget: aTarget andAction: actionSelector]; } @@ -532,7 +532,7 @@ static NSImage *_pbc_image[5]; /** * Return the item at index. */ -- (id ) itemAtIndex: (int)index +- (id ) itemAtIndex: (NSInteger)index { if ((index >= 0) && (index < [_menu numberOfItems])) { @@ -557,7 +557,7 @@ static NSImage *_pbc_image[5]; */ - (id ) lastItem { - int end = [_menu numberOfItems] - 1; + NSInteger end = [_menu numberOfItems] - 1; if (end < 0) return nil; @@ -697,7 +697,7 @@ static NSImage *_pbc_image[5]; } } -- (void) selectItemAtIndex: (int)index +- (void) selectItemAtIndex: (NSInteger)index { id anItem; @@ -796,14 +796,14 @@ static NSImage *_pbc_image[5]; [[self selectedItem] setRepresentedObject: object]; } -- (int) indexOfSelectedItem +- (NSInteger) indexOfSelectedItem { return [_menu indexOfItem: [self selectedItem]]; } - (void) synchronizeTitleAndSelectedItem { - int index; + NSInteger index; if (!_pbcFlags.usesItemFromMenu) return; @@ -855,7 +855,7 @@ static NSImage *_pbc_image[5]; /** * Set item title at the given index in the reciever. */ -- (NSString *) itemTitleAtIndex: (int)index +- (NSString *) itemTitleAtIndex: (NSInteger)index { return [[self itemAtIndex: index] title]; } @@ -901,7 +901,7 @@ static NSImage *_pbc_image[5]; NSNotificationCenter *nc = [NSNotificationCenter defaultCenter]; NSWindow *cvWin = [controlView window]; NSMenuView *mr = [_menu menuRepresentation]; - int selectedItem; + NSInteger selectedItem; [nc postNotificationName: NSPopUpButtonCellWillPopUpNotification object: self]; @@ -1104,7 +1104,7 @@ static NSImage *_pbc_image[5]; NSSize s; NSSize imageSize; NSSize titleSize; - int i, count; + NSInteger i, count; NSString *title; NSImage *image;