* Headers/AppKit/NSCell.h

* Headers/AppKit/NSColor.h
        * Headers/AppKit/NSGraphics.h
        * Headers/AppKit/NSView.h
        * Source/Functions.m
        * Source/GSThemeDrawing.m
        * Source/GSTitleView.m
        * Source/NSApplication.m
        * Source/NSCell.m
        * Source/NSView.m: More NSInteger/NSUInteger/CGFloat cleanup



git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@36035 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Fred Kiefer 2013-01-29 21:57:41 +00:00
parent 3205b3037d
commit d870275b7f
11 changed files with 224 additions and 201 deletions

View file

@ -117,11 +117,11 @@ NSAvailableWindowDepths(void)
}
NSWindowDepth
NSBestDepth(NSString *colorSpace, int bitsPerSample, int bitsPerPixel,
NSBestDepth(NSString *colorSpace, NSInteger bitsPerSample, NSInteger bitsPerPixel,
BOOL planar, BOOL *exactMatch)
{
int components = NSNumberOfColorComponents(colorSpace);
int index = 0;
NSInteger components = NSNumberOfColorComponents(colorSpace);
NSInteger index = 0;
const NSWindowDepth *depths = NSAvailableWindowDepths();
NSWindowDepth bestDepth = NSDefaultDepth;
@ -166,11 +166,11 @@ NSBestDepth(NSString *colorSpace, int bitsPerSample, int bitsPerPixel,
return bestDepth;
}
int
NSInteger
NSBitsPerPixelFromDepth(NSWindowDepth depth)
{
int bps = NSBitsPerSampleFromDepth(depth);
int spp = 0;
NSInteger bps = NSBitsPerSampleFromDepth(depth);
NSInteger spp = 0;
if (depth & _GSRGBBitValue)
{
@ -187,7 +187,7 @@ NSBitsPerPixelFromDepth(NSWindowDepth depth)
return (spp * bps);
}
int
NSInteger
NSBitsPerSampleFromDepth(NSWindowDepth depth)
{
NSWindowDepth bitValue = 0;
@ -252,10 +252,10 @@ NSColorSpaceFromDepth(NSWindowDepth depth)
return colorSpace;
}
int
NSInteger
NSNumberOfColorComponents(NSString *colorSpaceName)
{
int components = 1;
NSInteger components = 1;
/*
* These are the only exceptions to the above.
@ -301,7 +301,7 @@ void NSCopyBitmapFromGState(int srcGstate, NSRect srcRect, NSRect destRect)
NSLog(@"NSCopyBitmapFromGState not implemented");
}
void NSCopyBits(int srcGstate, NSRect srcRect, NSPoint destPoint)
void NSCopyBits(NSInteger srcGstate, NSRect srcRect, NSPoint destPoint)
{
float x, y, w, h;
NSGraphicsContext *ctxt = GSCurrentContext();
@ -316,12 +316,12 @@ void NSCopyBits(int srcGstate, NSRect srcRect, NSPoint destPoint)
}
void NSDrawBitmap(NSRect rect,
int pixelsWide,
int pixelsHigh,
int bitsPerSample,
int samplesPerPixel,
int bitsPerPixel,
int bytesPerRow,
NSInteger pixelsWide,
NSInteger pixelsHigh,
NSInteger bitsPerSample,
NSInteger samplesPerPixel,
NSInteger bitsPerPixel,
NSInteger bytesPerRow,
BOOL isPlanar,
BOOL hasAlpha,
NSString *colorSpaceName,
@ -534,9 +534,9 @@ void NSRectClip(NSRect aRect)
DPSnewpath(ctxt);
}
void NSRectClipList(const NSRect *rects, int count)
void NSRectClipList(const NSRect *rects, NSInteger count)
{
int i;
NSInteger i;
NSRect union_rect;
if (count == 0)
@ -561,16 +561,16 @@ void NSRectFill(NSRect aRect)
NSWidth(aRect), NSHeight(aRect));
}
void NSRectFillList(const NSRect *rects, int count)
void NSRectFillList(const NSRect *rects, NSInteger count)
{
NSGraphicsContext *ctxt = GSCurrentContext();
GSRectFillList(ctxt, rects, count);
}
void
NSRectFillListWithColors(const NSRect *rects, NSColor **colors, int count)
NSRectFillListWithColors(const NSRect *rects, NSColor **colors, NSInteger count)
{
int i;
NSInteger i;
NSGraphicsContext *ctxt = GSCurrentContext();
DPSgsave(ctxt);
@ -583,10 +583,10 @@ NSRectFillListWithColors(const NSRect *rects, NSColor **colors, int count)
DPSgrestore(ctxt);
}
void NSRectFillListWithGrays(const NSRect *rects, const float *grays,
int count)
void NSRectFillListWithGrays(const NSRect *rects, const CGFloat *grays,
NSInteger count)
{
int i;
NSInteger i;
NSGraphicsContext *ctxt = GSCurrentContext();
DPSgsave(ctxt);
@ -609,10 +609,10 @@ void NSRectFillUsingOperation(NSRect aRect, NSCompositingOperation op)
void
NSRectFillListUsingOperation(const NSRect *rects, int count,
NSRectFillListUsingOperation(const NSRect *rects, NSInteger count,
NSCompositingOperation op)
{
int i;
NSInteger i;
for (i = 0; i < count; i++)
{
@ -623,10 +623,10 @@ NSRectFillListUsingOperation(const NSRect *rects, int count,
void
NSRectFillListWithColorsUsingOperation(const NSRect *rects,
NSColor **colors,
int num,
NSInteger num,
NSCompositingOperation op)
{
int i;
NSInteger i;
NSGraphicsContext *ctxt = GSCurrentContext();
DPSgsave(ctxt);
@ -661,7 +661,7 @@ void NSFrameRect(const NSRect aRect)
NSFrameRectWithWidth(aRect, 1.0);
}
void NSFrameRectWithWidth(const NSRect aRect, float frameWidth)
void NSFrameRectWithWidth(const NSRect aRect, CGFloat frameWidth)
{
NSRectEdge sides[] = {NSMaxXEdge, NSMinYEdge, NSMinXEdge, NSMaxYEdge};
NSRect remainder = aRect;
@ -676,7 +676,7 @@ void NSFrameRectWithWidth(const NSRect aRect, float frameWidth)
}
void
NSFrameRectWithWidthUsingOperation(NSRect aRect, float frameWidth,
NSFrameRectWithWidthUsingOperation(NSRect aRect, CGFloat frameWidth,
NSCompositingOperation op)
{
NSRectEdge sides[] = {NSMaxXEdge, NSMinYEdge, NSMinXEdge, NSMaxYEdge};
@ -694,9 +694,9 @@ NSFrameRectWithWidthUsingOperation(NSRect aRect, float frameWidth,
NSRect
NSDrawTiledRects(NSRect aRect, const NSRect clipRect,
const NSRectEdge *sides,
const float *grays, int count)
const CGFloat *grays, NSInteger count)
{
int i;
NSInteger i;
NSRect slice;
NSRect remainder = aRect;
NSRect rects[count];
@ -722,9 +722,9 @@ NSDrawTiledRects(NSRect aRect, const NSRect clipRect,
NSRect
NSDrawColorTiledRects(NSRect boundsRect, NSRect clipRect,
const NSRectEdge *sides, NSColor **colors,
int count)
NSInteger count)
{
int i;
NSInteger i;
NSRect slice;
NSRect remainder = boundsRect;
NSRect rects[count];
@ -756,9 +756,9 @@ NSDrawButton(const NSRect aRect, const NSRect clipRect)
NSRectEdge down_sides[] = {NSMaxXEdge, NSMaxYEdge,
NSMinXEdge, NSMinYEdge,
NSMaxXEdge, NSMaxYEdge};
float grays[] = {NSBlack, NSBlack,
NSWhite, NSWhite,
NSDarkGray, NSDarkGray};
CGFloat grays[] = {NSBlack, NSBlack,
NSWhite, NSWhite,
NSDarkGray, NSDarkGray};
NSRect rect;
NSGraphicsContext *ctxt = GSCurrentContext();
@ -786,8 +786,8 @@ NSDrawGrayBezel(const NSRect aRect, const NSRect clipRect)
NSMaxXEdge, NSMinYEdge, NSMinXEdge, NSMaxYEdge};
NSRectEdge down_sides[] = {NSMaxXEdge, NSMaxYEdge, NSMinXEdge, NSMinYEdge,
NSMaxXEdge, NSMaxYEdge, NSMinXEdge, NSMinYEdge};
float grays[] = {NSWhite, NSWhite, NSDarkGray, NSDarkGray,
NSLightGray, NSLightGray, NSBlack, NSBlack};
CGFloat grays[] = {NSWhite, NSWhite, NSDarkGray, NSDarkGray,
NSLightGray, NSLightGray, NSBlack, NSBlack};
NSRect rect;
NSGraphicsContext *ctxt = GSCurrentContext();
@ -825,8 +825,8 @@ NSDrawGroove(const NSRect aRect, const NSRect clipRect)
NSMaxXEdge, NSMinYEdge, NSMaxXEdge, NSMinYEdge};
NSRectEdge down_sides[] = {NSMinXEdge, NSMinYEdge, NSMinXEdge, NSMinYEdge,
NSMaxXEdge, NSMaxYEdge, NSMaxXEdge, NSMaxYEdge};
float grays[] = {NSDarkGray, NSDarkGray, NSWhite, NSWhite,
NSWhite, NSWhite, NSDarkGray, NSDarkGray};
CGFloat grays[] = {NSDarkGray, NSDarkGray, NSWhite, NSWhite,
NSWhite, NSWhite, NSDarkGray, NSDarkGray};
NSRect rect;
NSGraphicsContext *ctxt = GSCurrentContext();
@ -855,8 +855,8 @@ NSDrawWhiteBezel(const NSRect aRect, const NSRect clipRect)
NSMaxYEdge, NSMaxXEdge, NSMinYEdge, NSMinXEdge};
NSRectEdge down_sides[] = {NSMinYEdge, NSMaxXEdge, NSMaxYEdge, NSMinXEdge,
NSMinYEdge, NSMaxXEdge, NSMaxYEdge, NSMinXEdge};
float grays[] = {NSDarkGray, NSWhite, NSWhite, NSDarkGray,
NSDarkGray, NSLightGray, NSLightGray, NSDarkGray};
CGFloat grays[] = {NSDarkGray, NSWhite, NSWhite, NSDarkGray,
NSDarkGray, NSLightGray, NSLightGray, NSDarkGray};
NSRect rect;
NSGraphicsContext *ctxt = GSCurrentContext();
@ -887,8 +887,8 @@ NSDrawDarkBezel(NSRect aRect, NSRect clipRect)
NSMaxXEdge, NSMaxYEdge, NSMinXEdge, NSMinYEdge};
// FIXME: The actual colour used for the 3 + 4 line
// (and the two additional points) is a bit darker.
float grays[] = {NSWhite, NSWhite, NSLightGray, NSLightGray,
NSLightGray, NSLightGray, NSBlack, NSBlack};
CGFloat grays[] = {NSWhite, NSWhite, NSLightGray, NSLightGray,
NSLightGray, NSLightGray, NSBlack, NSBlack};
NSRect rect;
NSGraphicsContext *ctxt = GSCurrentContext();
DPSgsave(ctxt);
@ -925,8 +925,8 @@ NSDrawLightBezel(NSRect aRect, NSRect clipRect)
NSMaxXEdge, NSMinYEdge, NSMinXEdge, NSMaxYEdge};
NSRectEdge down_sides[] = {NSMaxXEdge, NSMaxYEdge, NSMinXEdge, NSMinYEdge,
NSMaxXEdge, NSMaxYEdge, NSMinXEdge, NSMinYEdge};
float grays[] = {NSWhite, NSWhite, NSGray, NSGray,
NSBlack, NSBlack, NSBlack, NSBlack};
CGFloat grays[] = {NSWhite, NSWhite, NSGray, NSGray,
NSBlack, NSBlack, NSBlack, NSBlack};
NSRect rect;
NSGraphicsContext *ctxt = GSCurrentContext();
DPSgsave(ctxt);
@ -965,9 +965,9 @@ NSDrawFramePhoto(const NSRect aRect, const NSRect clipRect)
NSRectEdge down_sides[] = {NSMaxXEdge, NSMaxYEdge,
NSMinXEdge, NSMinYEdge,
NSMaxXEdge, NSMaxYEdge};
float grays[] = {NSDarkGray, NSDarkGray,
NSDarkGray, NSDarkGray,
NSBlack, NSBlack};
CGFloat grays[] = {NSDarkGray, NSDarkGray,
NSDarkGray, NSDarkGray,
NSBlack, NSBlack};
NSRect rect;
NSGraphicsContext *ctxt = GSCurrentContext();
@ -1000,7 +1000,7 @@ NSDrawWindowBackground(NSRect aRect)
DPSgrestore(ctxt);
}
float
CGFloat
NSLinkFrameThickness(void)
{
return 1;
@ -1035,8 +1035,8 @@ void
NSConvertGlobalToWindowNumber(int globalNum, unsigned int *winNum)
{
NSArray *windows = GSAllWindows();
unsigned count = [windows count];
unsigned i;
NSUInteger count = [windows count];
NSUInteger i;
for (i = 0; i < count; i++)
{
@ -1058,7 +1058,7 @@ NSConvertWindowNumberToGlobal(int winNum, unsigned int *globalNum)
}
void
NSCountWindowsForContext(int context, int *count)
NSCountWindowsForContext(NSInteger context, NSInteger *count)
{
// TODO
*count = 0;
@ -1071,7 +1071,7 @@ NSShowSystemInfoPanel(NSDictionary *options)
}
void
NSWindowListForContext(int context, int size, int **list)
NSWindowListForContext(NSInteger context, NSInteger size, NSInteger **list)
{
// TODO
}
@ -1083,4 +1083,3 @@ NSGetWindowServerMemory(int context, int *virtualMemory,
// TODO
return -1;
}

View file

@ -1359,7 +1359,7 @@ static NSDictionary *titleTextAttributes[3] = {nil, nil, nil};
{
static const NSRectEdge edges[4] = {NSMinXEdge, NSMaxYEdge,
NSMaxXEdge, NSMinYEdge};
float grays[3][4] =
CGFloat grays[3][4] =
{{NSLightGray, NSLightGray, NSDarkGray, NSDarkGray},
{NSWhite, NSWhite, NSDarkGray, NSDarkGray},
{NSLightGray, NSLightGray, NSBlack, NSBlack}};

View file

@ -211,9 +211,9 @@
NSSize titleSize;
NSRectEdge top_left[] = {NSMinXEdge, NSMaxYEdge};
NSRectEdge bottom_right[] = {NSMaxXEdge, NSMinYEdge};
float blacks[] = {NSBlack, NSBlack};
float grays[] = {NSLightGray, NSLightGray};
float darkGrays[] = {NSDarkGray, NSDarkGray};
CGFloat blacks[] = {NSBlack, NSBlack};
CGFloat grays[] = {NSLightGray, NSLightGray};
CGFloat darkGrays[] = {NSDarkGray, NSDarkGray};
// Draw the dark gray upper left lines for menu and black for others.
// Rectangle 1

View file

@ -571,7 +571,7 @@ static NSSize scaledIconSizeForSize(NSSize imageSize)
if ([NSApp isHidden])
{
NSRectEdge mySides[] = {NSMinXEdge, NSMinYEdge, NSMaxXEdge, NSMaxYEdge};
float myGrays[] = {NSBlack, NSWhite, NSWhite, NSBlack};
CGFloat myGrays[] = {NSBlack, NSWhite, NSWhite, NSBlack};
NSDrawTiledRects(NSMakeRect(4, 4, 3, 2), rect, mySides, myGrays, 4);
}
}

View file

@ -502,7 +502,7 @@ static NSColor *dtxtCol;
id="NSCellAttribute">NSCellAttribute</ref></p>
<p>See Also: -setCellAttribute:to:</p>
*/
- (int) cellAttribute: (NSCellAttribute)aParameter
- (NSInteger) cellAttribute: (NSCellAttribute)aParameter
{
switch (aParameter)
{
@ -551,7 +551,7 @@ static NSColor *dtxtCol;
/**<p>TODO</p>
*<p>See Also: -cellAttribute:</p>
*/
- (void) setCellAttribute: (NSCellAttribute)aParameter to: (int)value
- (void) setCellAttribute: (NSCellAttribute)aParameter to: (NSInteger)value
{
switch (aParameter)
{
@ -1172,9 +1172,9 @@ static NSColor *dtxtCol;
/**<p>TODO Explain</p>
*/
- (int) sendActionOn: (int)mask
- (NSInteger) sendActionOn: (NSInteger)mask
{
unsigned int previousMask = _action_mask;
NSUInteger previousMask = _action_mask;
_action_mask = mask;
@ -1239,15 +1239,15 @@ static NSColor *dtxtCol;
* Formatting Data
*/
- (void) setFloatingPointFormat: (BOOL)autoRange
left: (unsigned int)leftDigits
right: (unsigned int)rightDigits
left: (NSUInteger)leftDigits
right: (NSUInteger)rightDigits
{
NSNumberFormatter *formatter = [[NSNumberFormatter alloc] init];
NSMutableString *format = [[NSMutableString alloc] init];
if (autoRange)
{
unsigned fieldWidth = leftDigits + rightDigits + 1;
NSUInteger fieldWidth = leftDigits + rightDigits + 1;
// FIXME: this does not fully match the documentation.
while (fieldWidth--)
@ -1286,14 +1286,14 @@ static NSColor *dtxtCol;
/**<p> TODO</p>
*/
- (int) entryType
- (NSInteger) entryType
{
return _cell.entry_type;
}
/** <p>TODO</p>
*/
- (void) setEntryType: (int)aType
- (void) setEntryType: (NSInteger)aType
{
[self setType: NSTextCellType];
// TODO: This should select a suitable formatter
@ -1384,7 +1384,7 @@ static NSColor *dtxtCol;
if (r.length > 0)
{
unsigned int location = r.location;
NSUInteger location = r.location;
[self setTitle: [[aString substringToIndex: location]
@ -1579,7 +1579,7 @@ static NSColor *dtxtCol;
/**<p>Returns the mouse flags. This flags are usally sets in
the -trackMouse:inRect:ofView:untilMouseUp: method</p>
*/
- (int) mouseDownFlags
- (NSInteger) mouseDownFlags
{
return _mouse_down_flags;
}
@ -1627,7 +1627,7 @@ static NSColor *dtxtCol;
untilMouseUp: (BOOL)flag
{
NSApplication *theApp = [NSApplication sharedApplication];
unsigned event_mask = NSLeftMouseDownMask | NSLeftMouseUpMask
NSUInteger event_mask = NSLeftMouseDownMask | NSLeftMouseUpMask
| NSMouseMovedMask | NSLeftMouseDraggedMask | NSOtherMouseDraggedMask
| NSRightMouseDraggedMask;
NSPoint location = [theEvent locationInWindow];
@ -2293,8 +2293,8 @@ static NSColor *dtxtCol;
inView: (NSView*)controlView
editor: (NSText*)textObject
delegate: (id)anObject
start: (int)selStart
length: (int)selLength
start: (NSInteger)selStart
length: (NSInteger)selLength
{
if (!controlView || !textObject || (_cell.type != NSTextCellType))
return;
@ -2526,7 +2526,7 @@ static NSColor *dtxtCol;
if ([aDecoder containsValueForKey: @"NSCellFlags"])
{
unsigned long cFlags;
unsigned long mask = 0;
NSUInteger mask = 0;
cFlags = [aDecoder decodeIntForKey: @"NSCellFlags"];
[self setFocusRingType: (cFlags & 0x3)];
@ -2979,7 +2979,7 @@ static NSColor *dtxtCol;
}
}
- (BOOL) _sendsActionOn:(int)eventTypeMask
- (BOOL) _sendsActionOn:(NSUInteger)eventTypeMask
{
return (_action_mask & eventTypeMask);
}

View file

@ -172,10 +172,10 @@ GSRemoveDragTypes(NSView* obj)
static NSArray*
GSSetDragTypes(NSView* obj, NSArray *types)
{
unsigned count = [types count];
NSUInteger count = [types count];
NSString *strings[count];
NSArray *t;
unsigned i;
NSUInteger i;
/*
* Make a new array with copies of the type strings so we don't get
@ -218,7 +218,7 @@ GSSetDragTypes(NSView* obj, NSArray *types)
{
if (_coordinates_valid == YES)
{
unsigned count;
NSUInteger count;
_coordinates_valid = NO;
if (_rFlags.valid_rects != 0)
@ -231,7 +231,7 @@ GSSetDragTypes(NSView* obj, NSArray *types)
if (count > 0)
{
NSView* array[count];
unsigned i;
NSUInteger i;
[_sub_views getObjects: array];
for (i = 0; i < count; i++)
@ -367,12 +367,12 @@ GSSetDragTypes(NSView* obj, NSArray *types)
[self viewDidMoveToWindow];
if (_rFlags.has_subviews)
{
unsigned count = [_sub_views count];
NSUInteger count = [_sub_views count];
if (count > 0)
{
unsigned i;
NSView *array[count];
NSUInteger i;
NSView *array[count];
[_sub_views getObjects: array];
for (i = 0; i < count; ++i)
@ -435,12 +435,12 @@ GSSetDragTypes(NSView* obj, NSArray *types)
if (_rFlags.has_subviews)
{
unsigned count = [_sub_views count];
NSUInteger count = [_sub_views count];
if (count > 0)
{
unsigned i;
NSView *array[count];
NSUInteger i;
NSView *array[count];
[_sub_views getObjects: array];
for (i = 0; i < count; ++i)
@ -635,8 +635,8 @@ GSSetDragTypes(NSView* obj, NSArray *types)
- (void) dealloc
{
NSView *tmp;
unsigned count;
NSView *tmp;
NSUInteger count;
// Remove all key value bindings for this view.
[GSKeyValueBinding unbindAllForObject: self];
@ -683,7 +683,7 @@ GSSetDragTypes(NSView* obj, NSArray *types)
tmp = GSIArrayItemAtIndex(pKV(self), count).obj;
if (tmp != nil && nKV(tmp) != 0)
{
unsigned otherCount = GSIArrayCount(nKV(tmp));
NSUInteger otherCount = GSIArrayCount(nKV(tmp));
while (otherCount-- > 1)
{
@ -715,7 +715,7 @@ GSSetDragTypes(NSView* obj, NSArray *types)
tmp = GSIArrayItemAtIndex(nKV(self), count).obj;
if (tmp != nil && pKV(tmp) != 0)
{
unsigned otherCount = GSIArrayCount(pKV(tmp));
NSUInteger otherCount = GSIArrayCount(pKV(tmp));
while (otherCount-- > 1)
{
@ -1017,7 +1017,7 @@ GSSetDragTypes(NSView* obj, NSArray *types)
}
else
{
unsigned index;
NSUInteger index;
/*
* Ok - the standard case - we remove the newView from wherever it
@ -1099,7 +1099,7 @@ GSSetDragTypes(NSView* obj, NSArray *types)
[self setNeedsDisplay: YES];
}
- (void) sortSubviewsUsingFunction: (int (*)(id ,id ,void*))compare
- (void) sortSubviewsUsingFunction: (NSComparisonResult (*)(id ,id ,void*))compare
context: (void*)context
{
[_sub_views sortUsingFunction: compare context: context];
@ -2067,7 +2067,7 @@ static void autoresize(CGFloat oldContainerSize,
- (void) _lockFocusInContext: (NSGraphicsContext *)ctxt inRect: (NSRect)rect
{
NSRect wrect;
int window_gstate = 0;
NSInteger window_gstate = 0;
if (viewIsPrinting == nil)
{
@ -2294,7 +2294,7 @@ static void autoresize(CGFloat oldContainerSize,
FIXME: The above is what the OpenStep and Cocoa specification say, but
gState is 0 unless allocateGState has been called.
*/
- (int) gState
- (NSInteger) gState
{
if (_allocate_gstate && (!_gstate || _renew_gstate))
{
@ -2576,12 +2576,12 @@ static void autoresize(CGFloat oldContainerSize,
*/
if (_rFlags.has_subviews == YES)
{
unsigned count = [_sub_views count];
NSUInteger count = [_sub_views count];
if (count > 0)
{
NSView *array[count];
unsigned i;
NSUInteger i;
[_sub_views getObjects: array];
@ -2673,7 +2673,7 @@ static void autoresize(CGFloat oldContainerSize,
- (BOOL) needsToDrawRect: (NSRect)aRect
{
const NSRect *rects;
int i, count;
NSInteger i, count;
[self getRectsBeingDrawn: &rects count: &count];
for (i = 0; i < count; i++)
@ -2684,7 +2684,7 @@ static void autoresize(CGFloat oldContainerSize,
return NO;
}
- (void) getRectsBeingDrawn: (const NSRect **)rects count: (int *)count
- (void) getRectsBeingDrawn: (const NSRect **)rects count: (NSInteger *)count
{
// FIXME
static NSRect rect;
@ -2987,7 +2987,7 @@ in the main thread.
return NO;
}
- (void) getRectsExposedDuringLiveResize: (NSRect[4])exposedRects count: (int *)count
- (void) getRectsExposedDuringLiveResize: (NSRect[4])exposedRects count: (NSInteger *)count
{
// FIXME
if (count != NULL)
@ -3195,7 +3195,7 @@ Returns YES iff any scrolling was done.
{
if (_rFlags.has_currects != 0)
{
unsigned count = [_cursor_rects count];
NSUInteger count = [_cursor_rects count];
if (count > 0)
{
@ -3205,7 +3205,7 @@ Returns YES iff any scrolling was done.
if (_rFlags.valid_rects != 0)
{
NSPoint loc = _window->_lastPoint;
unsigned i;
NSUInteger i;
for (i = 0; i < count; ++i)
{
@ -3267,10 +3267,10 @@ Returns YES iff any scrolling was done.
{
}
static NSView* findByTag(NSView *view, int aTag, unsigned *level)
static NSView* findByTag(NSView *view, NSInteger aTag, NSUInteger *level)
{
unsigned i, count;
NSArray *sub = [view subviews];
NSUInteger i, count;
NSArray *sub = [view subviews];
count = [sub count];
if (count > 0)
@ -3311,12 +3311,12 @@ static NSView* findByTag(NSView *view, int aTag, unsigned *level)
}
else if (_rFlags.has_subviews)
{
unsigned count = [_sub_views count];
NSUInteger count = [_sub_views count];
if (count > 0)
{
NSView *array[count];
unsigned i;
NSView *array[count];
NSUInteger i;
[_sub_views getObjects: array];
@ -3336,17 +3336,17 @@ static NSView* findByTag(NSView *view, int aTag, unsigned *level)
if (view == nil)
{
unsigned level = 0xffffffff;
NSUInteger level = 0xffffffff;
/*
* Ok - do it the long way - search the while tree for each of
* Ok - do it the long way - search the whole tree for each of
* our descendents and see which has the closest view matching
* the tag.
*/
for (i = 0; i < count; i++)
{
unsigned l = 0;
NSView *v;
NSUInteger l = 0;
NSView *v;
v = findByTag(array[i], aTag, &l);
@ -3383,7 +3383,6 @@ static NSView* findByTag(NSView *view, int aTag, unsigned *level)
- (NSView*) hitTest: (NSPoint)aPoint
{
NSPoint p;
unsigned count;
NSView *v = nil, *w;
/* If not within our frame then it can't be a hit.
@ -3416,10 +3415,12 @@ static NSView* findByTag(NSView *view, int aTag, unsigned *level)
if (_rFlags.has_subviews)
{
NSUInteger count;
count = [_sub_views count];
if (count > 0)
{
NSView *array[count];
NSView *array[count];
[_sub_views getObjects: array];
@ -3451,7 +3452,7 @@ static NSView* findByTag(NSView *view, int aTag, unsigned *level)
- (BOOL) performKeyEquivalent: (NSEvent*)theEvent
{
unsigned i;
NSUInteger i;
for (i = 0; i < [_sub_views count]; i++)
if ([[_sub_views objectAtIndex: i] performKeyEquivalent: theEvent] == YES)
@ -3461,7 +3462,7 @@ static NSView* findByTag(NSView *view, int aTag, unsigned *level)
- (BOOL) performMnemonic: (NSString *)aString
{
unsigned i;
NSUInteger i;
for (i = 0; i < [_sub_views count]; i++)
if ([[_sub_views objectAtIndex: i] performMnemonic: aString] == YES)
@ -3476,7 +3477,7 @@ static NSView* findByTag(NSView *view, int aTag, unsigned *level)
- (void) removeTrackingRect: (NSTrackingRectTag)tag
{
unsigned i, j;
NSUInteger i, j;
GSTrackingRect *m;
j = [_tracking_rects count];
@ -3507,7 +3508,7 @@ static NSView* findByTag(NSView *view, int aTag, unsigned *level)
assumeInside: (BOOL)flag
{
NSTrackingRectTag t;
unsigned i, j;
NSUInteger i, j;
GSTrackingRect *m;
t = 0;
@ -3584,7 +3585,7 @@ static NSView* findByTag(NSView *view, int aTag, unsigned *level)
- (void) setNextKeyView: (NSView *)aView
{
NSView *tmp;
unsigned count;
NSUInteger count;
if (aView != nil && [aView isKindOfClass: viewClass] == NO)
{
@ -4183,7 +4184,7 @@ static NSView* findByTag(NSView *view, int aTag, unsigned *level)
return location;
}
- (NSRect) rectForPage: (int)page
- (NSRect) rectForPage: (NSInteger)page
{
return NSZeroRect;
}
@ -4529,7 +4530,7 @@ static NSView* findByTag(NSView *view, int aTag, unsigned *level)
{
if ([aCoder allowsKeyedCoding])
{
int vFlags = 0;
NSUInteger vFlags = 0;
// encoding
[aCoder encodeConditionalObject: [self nextKeyView]
@ -4664,7 +4665,7 @@ static NSView* findByTag(NSView *view, int aTag, unsigned *level)
}
if ([aDecoder containsValueForKey: @"NSvFlags"])
{
int vFlags = [aDecoder decodeIntForKey: @"NSvFlags"];
NSUInteger vFlags = [aDecoder decodeIntForKey: @"NSvFlags"];
// We are lucky here, Apple use the same constants
// in the lower bits of the flags
@ -4770,7 +4771,7 @@ static NSView* findByTag(NSView *view, int aTag, unsigned *level)
_autoresizes_subviews = flag;
}
- (void) setAutoresizingMask: (unsigned int)mask
- (void) setAutoresizingMask: (NSUInteger)mask
{
_autoresizingMask = mask;
}
@ -4786,7 +4787,7 @@ static NSView* findByTag(NSView *view, int aTag, unsigned *level)
return _autoresizes_subviews;
}
- (unsigned int) autoresizingMask
- (NSUInteger) autoresizingMask
{
return _autoresizingMask;
}
@ -5057,7 +5058,7 @@ static NSView* findByTag(NSView *view, int aTag, unsigned *level)
@implementation NSView(KeyViewLoop)
static int
static NSComparisonResult
cmpFrame(id view1, id view2, void *context)
{
BOOL flippedSuperView = [(NSView *)context isFlipped];