mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-04-22 17:52:42 +00:00
* 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:
parent
3205b3037d
commit
d870275b7f
11 changed files with 224 additions and 201 deletions
13
ChangeLog
13
ChangeLog
|
@ -1,3 +1,16 @@
|
|||
2013-01-29 Fred Kiefer <FredKiefer@gmx.de>
|
||||
|
||||
* 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
|
||||
|
||||
2013-01-29 Fred Kiefer <FredKiefer@gmx.de>
|
||||
|
||||
* Headers/AppKit/NSApplication.h
|
||||
|
|
|
@ -49,11 +49,12 @@
|
|||
@class NSText;
|
||||
@class NSFormatter;
|
||||
|
||||
typedef enum _NSCellType {
|
||||
enum _NSCellType {
|
||||
NSNullCellType,
|
||||
NSTextCellType,
|
||||
NSImageCellType
|
||||
} NSCellType;
|
||||
};
|
||||
typedef NSUInteger NSCellType;
|
||||
|
||||
enum {
|
||||
NSAnyType,
|
||||
|
@ -66,7 +67,7 @@ enum {
|
|||
NSDateType
|
||||
};
|
||||
|
||||
typedef enum {
|
||||
enum {
|
||||
NSNoImage = 0,
|
||||
NSImageOnly,
|
||||
NSImageLeft,
|
||||
|
@ -74,9 +75,10 @@ typedef enum {
|
|||
NSImageBelow,
|
||||
NSImageAbove,
|
||||
NSImageOverlaps
|
||||
} NSCellImagePosition;
|
||||
};
|
||||
typedef NSUInteger NSCellImagePosition;
|
||||
|
||||
typedef enum _NSCellAttribute {
|
||||
enum _NSCellAttribute {
|
||||
NSCellDisabled,
|
||||
NSCellState,
|
||||
NSPushInCell,
|
||||
|
@ -94,7 +96,8 @@ typedef enum _NSCellAttribute {
|
|||
NSCellChangesContents,
|
||||
NSCellIsInsetButton,
|
||||
NSCellAllowsMixedState
|
||||
} NSCellAttribute;
|
||||
};
|
||||
typedef NSUInteger NSCellAttribute;
|
||||
|
||||
enum {
|
||||
NSNoCellMask = 0,
|
||||
|
@ -113,10 +116,11 @@ enum {
|
|||
* We try to do as in macosx.
|
||||
*/
|
||||
enum {
|
||||
NSMixedState = -1,
|
||||
NSOffState = 0,
|
||||
NSOnState = 1,
|
||||
NSMixedState = -1
|
||||
NSOnState = 1
|
||||
};
|
||||
typedef NSUInteger NSCellStateValue;
|
||||
|
||||
/**
|
||||
* <p>Enumeration of the ways that you can display an image in an
|
||||
|
@ -131,7 +135,7 @@ enum {
|
|||
* <p><code>NSScaleToFit</code>: The image is always resized (up
|
||||
* or down) to fit exactly in the cell size.</p>
|
||||
*/
|
||||
typedef enum {
|
||||
enum {
|
||||
NSScaleProportionally = 0,
|
||||
NSScaleToFit = 1,
|
||||
NSScaleNone = 2,
|
||||
|
@ -139,7 +143,8 @@ typedef enum {
|
|||
NSImageScaleAxesIndependently = 1,
|
||||
NSImageScaleNone = 2,
|
||||
NSImageScaleProportionallyUpOrDown = 3
|
||||
} NSImageScaling;
|
||||
};
|
||||
typedef NSUInteger NSImageScaling;
|
||||
|
||||
@interface NSCell : NSObject <NSCopying, NSCoding>
|
||||
{
|
||||
|
@ -188,8 +193,8 @@ typedef enum {
|
|||
// Set while the cell is edited/selected
|
||||
unsigned in_editing: 1;
|
||||
} _cell;
|
||||
unsigned int _mouse_down_flags;
|
||||
unsigned int _action_mask;
|
||||
NSUInteger _mouse_down_flags;
|
||||
NSUInteger _action_mask;
|
||||
NSFormatter *_formatter;
|
||||
NSMenu *_menu;
|
||||
id _represented_object;
|
||||
|
@ -235,9 +240,9 @@ typedef enum {
|
|||
//
|
||||
// Setting Parameters
|
||||
//
|
||||
- (int)cellAttribute:(NSCellAttribute)aParameter;
|
||||
- (NSInteger)cellAttribute:(NSCellAttribute)aParameter;
|
||||
- (void)setCellAttribute:(NSCellAttribute)aParameter
|
||||
to:(int)value;
|
||||
to:(NSInteger)value;
|
||||
|
||||
//
|
||||
// Setting the NSCell's Type
|
||||
|
@ -312,7 +317,7 @@ typedef enum {
|
|||
//
|
||||
- (SEL)action;
|
||||
- (BOOL)isContinuous;
|
||||
- (int)sendActionOn:(int)mask;
|
||||
- (NSInteger)sendActionOn:(NSInteger)mask;
|
||||
- (void)setAction:(SEL)aSelector;
|
||||
- (void)setContinuous:(BOOL)flag;
|
||||
- (void)setTarget:(id)anObject;
|
||||
|
@ -337,12 +342,12 @@ typedef enum {
|
|||
- (void)setFormatter:(NSFormatter *)newFormatter;
|
||||
- (id)formatter;
|
||||
#endif
|
||||
- (int)entryType;
|
||||
- (NSInteger)entryType;
|
||||
- (BOOL)isEntryAcceptable:(NSString *)aString;
|
||||
- (void)setEntryType:(int)aType;
|
||||
- (void)setEntryType:(NSInteger)aType;
|
||||
- (void)setFloatingPointFormat:(BOOL)autoRange
|
||||
left:(unsigned int)leftDigits
|
||||
right:(unsigned int)rightDigits;
|
||||
left:(NSUInteger)leftDigits
|
||||
right:(NSUInteger)rightDigits;
|
||||
|
||||
//
|
||||
// Menu
|
||||
|
@ -411,7 +416,7 @@ typedef enum {
|
|||
- (BOOL)continueTracking:(NSPoint)lastPoint
|
||||
at:(NSPoint)currentPoint
|
||||
inView:(NSView *)controlView;
|
||||
- (int)mouseDownFlags;
|
||||
- (NSInteger)mouseDownFlags;
|
||||
- (void)getPeriodicDelay:(float *)delay
|
||||
interval:(float *)interval;
|
||||
- (BOOL)startTrackingAt:(NSPoint)startPoint
|
||||
|
@ -486,8 +491,8 @@ typedef enum {
|
|||
inView:(NSView *)controlView
|
||||
editor:(NSText *)textObject
|
||||
delegate:(id)anObject
|
||||
start:(int)selStart
|
||||
length:(int)selLength;
|
||||
start:(NSInteger)selStart
|
||||
length:(NSInteger)selLength;
|
||||
- (void)endEditing:(NSText *)textObject;
|
||||
#if OS_API_VERSION(GS_API_MACOSX, GS_API_LATEST)
|
||||
- (BOOL)sendsActionOnEndEditing;
|
||||
|
@ -511,7 +516,7 @@ typedef enum {
|
|||
- (void) _drawText: (NSString*)aString inFrame: (NSRect)cellFrame;
|
||||
- (void) _drawAttributedText: (NSAttributedString*)aString
|
||||
inFrame: (NSRect)aRect;
|
||||
- (BOOL) _sendsActionOn:(int)eventTypeMask;
|
||||
- (BOOL) _sendsActionOn:(NSUInteger)eventTypeMask;
|
||||
- (NSAttributedString*) _drawAttributedString;
|
||||
- (void) _drawBorderAndBackgroundWithFrame: (NSRect)cellFrame
|
||||
inView: (NSView*)controlView;
|
||||
|
|
|
@ -41,18 +41,20 @@
|
|||
@class NSImage;
|
||||
@class NSColorSpace;
|
||||
|
||||
typedef enum _NSControlTint {
|
||||
enum _NSControlTint {
|
||||
NSDefaultControlTint,
|
||||
NSBlueControlTint,
|
||||
NSGraphiteControlTint = 6,
|
||||
NSClearControlTint
|
||||
} NSControlTint;
|
||||
};
|
||||
typedef NSUInteger NSControlTint;
|
||||
|
||||
typedef enum _NSControlSize {
|
||||
enum _NSControlSize {
|
||||
NSRegularControlSize,
|
||||
NSSmallControlSize,
|
||||
NSMiniControlSize
|
||||
} NSControlSize;
|
||||
};
|
||||
typedef NSUInteger NSControlSize;
|
||||
|
||||
/*
|
||||
* NSColor is an abstract super class of the class cluster of the real colour classes.
|
||||
|
|
|
@ -80,11 +80,11 @@ APPKIT_EXPORT const NSWindowDepth NSTwentyFourBitRGBDepth;
|
|||
/*
|
||||
* Gray Values
|
||||
*/
|
||||
APPKIT_EXPORT const float NSBlack;
|
||||
APPKIT_EXPORT const float NSDarkGray;
|
||||
APPKIT_EXPORT const float NSWhite;
|
||||
APPKIT_EXPORT const float NSLightGray;
|
||||
APPKIT_EXPORT const float NSGray;
|
||||
APPKIT_EXPORT const CGFloat NSBlack;
|
||||
APPKIT_EXPORT const CGFloat NSDarkGray;
|
||||
APPKIT_EXPORT const CGFloat NSWhite;
|
||||
APPKIT_EXPORT const CGFloat NSLightGray;
|
||||
APPKIT_EXPORT const CGFloat NSGray;
|
||||
|
||||
/*
|
||||
* Device Dictionary Keys
|
||||
|
@ -101,12 +101,12 @@ APPKIT_EXPORT NSString *NSDeviceSize;
|
|||
*/
|
||||
APPKIT_EXPORT const NSWindowDepth *NSAvailableWindowDepths(void);
|
||||
APPKIT_EXPORT NSWindowDepth NSBestDepth(NSString *colorSpace,
|
||||
int bitsPerSample, int bitsPerPixel,
|
||||
NSInteger bitsPerSample, NSInteger bitsPerPixel,
|
||||
BOOL planar, BOOL *exactMatch);
|
||||
APPKIT_EXPORT int NSBitsPerPixelFromDepth(NSWindowDepth depth);
|
||||
APPKIT_EXPORT int NSBitsPerSampleFromDepth(NSWindowDepth depth);
|
||||
APPKIT_EXPORT NSInteger NSBitsPerPixelFromDepth(NSWindowDepth depth);
|
||||
APPKIT_EXPORT NSInteger NSBitsPerSampleFromDepth(NSWindowDepth depth);
|
||||
APPKIT_EXPORT NSString *NSColorSpaceFromDepth(NSWindowDepth depth);
|
||||
APPKIT_EXPORT int NSNumberOfColorComponents(NSString *colorSpaceName);
|
||||
APPKIT_EXPORT NSInteger NSNumberOfColorComponents(NSString *colorSpaceName);
|
||||
APPKIT_EXPORT BOOL NSPlanarFromDepth(NSWindowDepth depth);
|
||||
|
||||
|
||||
|
@ -119,19 +119,21 @@ APPKIT_EXPORT void NSWindowList(NSInteger size, NSInteger list[]);
|
|||
APPKIT_EXPORT void NSEraseRect(NSRect aRect);
|
||||
APPKIT_EXPORT void NSHighlightRect(NSRect aRect);
|
||||
APPKIT_EXPORT void NSRectClip(NSRect aRect);
|
||||
APPKIT_EXPORT void NSRectClipList(const NSRect *rects, int count);
|
||||
APPKIT_EXPORT void NSRectClipList(const NSRect *rects, NSInteger count);
|
||||
APPKIT_EXPORT void NSRectFill(NSRect aRect);
|
||||
APPKIT_EXPORT void NSRectFillList(const NSRect *rects, int count);
|
||||
APPKIT_EXPORT void NSRectFillList(const NSRect *rects, NSInteger count);
|
||||
APPKIT_EXPORT void NSRectFillListWithGrays(const NSRect *rects,
|
||||
const float *grays,int count);
|
||||
const CGFloat *grays,
|
||||
NSInteger count);
|
||||
|
||||
/** Draws a set of edges of aRect. The sides array should contain
|
||||
count edges, and grays the corresponding color. Edges are drawn
|
||||
in the order given in the array, and subsequent edges are drawn
|
||||
inside previous edges (thus, they will never overlap). */
|
||||
APPKIT_EXPORT NSRect NSDrawTiledRects(NSRect aRect, const NSRect clipRect,
|
||||
const NSRectEdge *sides,
|
||||
const float *grays, int count);
|
||||
const NSRectEdge *sides,
|
||||
const CGFloat *grays,
|
||||
NSInteger count);
|
||||
|
||||
APPKIT_EXPORT void NSDrawButton(const NSRect aRect, const NSRect clipRect);
|
||||
APPKIT_EXPORT void NSDrawGrayBezel(const NSRect aRect, const NSRect clipRect);
|
||||
|
@ -159,24 +161,24 @@ APPKIT_EXPORT void NSDottedFrameRect(NSRect aRect);
|
|||
outside the given rectangle.
|
||||
</p> */
|
||||
APPKIT_EXPORT void NSFrameRect(const NSRect aRect);
|
||||
APPKIT_EXPORT void NSFrameRectWithWidth(const NSRect aRect, float frameWidth);
|
||||
APPKIT_EXPORT void NSFrameRectWithWidthUsingOperation(const NSRect aRect, float frameWidth,
|
||||
APPKIT_EXPORT void NSFrameRectWithWidth(const NSRect aRect, CGFloat frameWidth);
|
||||
APPKIT_EXPORT void NSFrameRectWithWidthUsingOperation(const NSRect aRect, CGFloat frameWidth,
|
||||
NSCompositingOperation op);
|
||||
|
||||
APPKIT_EXPORT NSColor* NSReadPixel(NSPoint location);
|
||||
|
||||
APPKIT_EXPORT void NSCopyBitmapFromGState(int srcGstate, NSRect srcRect,
|
||||
NSRect destRect);
|
||||
APPKIT_EXPORT void NSCopyBits(int srcGstate, NSRect srcRect,
|
||||
APPKIT_EXPORT void NSCopyBits(NSInteger srcGstate, NSRect srcRect,
|
||||
NSPoint destPoint);
|
||||
|
||||
APPKIT_EXPORT 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,
|
||||
|
@ -230,32 +232,32 @@ APPKIT_EXPORT void NSConvertWindowNumberToGlobal(int winNum, unsigned int *globa
|
|||
|
||||
// Rectangle drawing
|
||||
APPKIT_EXPORT NSRect NSDrawColorTiledRects(NSRect boundsRect, NSRect clipRect,
|
||||
const NSRectEdge *sides,
|
||||
NSColor **colors,
|
||||
int count);
|
||||
const NSRectEdge *sides,
|
||||
NSColor **colors,
|
||||
NSInteger count);
|
||||
APPKIT_EXPORT void NSDrawDarkBezel(NSRect aRect, NSRect clipRect);
|
||||
APPKIT_EXPORT void NSDrawLightBezel(NSRect aRect, NSRect clipRect);
|
||||
APPKIT_EXPORT void NSRectFillListWithColors(const NSRect *rects,
|
||||
NSColor **colors, int count);
|
||||
NSColor **colors, NSInteger count);
|
||||
|
||||
APPKIT_EXPORT void NSRectFillUsingOperation(NSRect aRect,
|
||||
NSCompositingOperation op);
|
||||
APPKIT_EXPORT void NSRectFillListUsingOperation(const NSRect *rects,
|
||||
int count,
|
||||
NSCompositingOperation op);
|
||||
NSInteger count,
|
||||
NSCompositingOperation op);
|
||||
APPKIT_EXPORT void NSRectFillListWithColorsUsingOperation(const NSRect *rects,
|
||||
NSColor **colors,
|
||||
int num,
|
||||
NSCompositingOperation op);
|
||||
NSColor **colors,
|
||||
NSInteger num,
|
||||
NSCompositingOperation op);
|
||||
|
||||
APPKIT_EXPORT void NSDrawWindowBackground(NSRect aRect);
|
||||
|
||||
// Context information
|
||||
APPKIT_EXPORT void NSCountWindowsForContext(int context, int *count);
|
||||
APPKIT_EXPORT void NSWindowListForContext(int context, int size, int **list);
|
||||
APPKIT_EXPORT void NSCountWindowsForContext(NSInteger context, NSInteger *count);
|
||||
APPKIT_EXPORT void NSWindowListForContext(NSInteger context, NSInteger size, NSInteger **list);
|
||||
APPKIT_EXPORT int NSGetWindowServerMemory(int context, int *virtualMemory,
|
||||
int *windowBackingMemory,
|
||||
NSString **windowDumpStream);
|
||||
int *windowBackingMemory,
|
||||
NSString **windowDumpStream);
|
||||
|
||||
#endif
|
||||
|
||||
|
|
|
@ -53,8 +53,8 @@
|
|||
@class NSView;
|
||||
@class NSWindow;
|
||||
|
||||
typedef int NSTrackingRectTag;
|
||||
typedef int NSToolTipTag;
|
||||
typedef NSInteger NSTrackingRectTag;
|
||||
typedef NSInteger NSToolTipTag;
|
||||
|
||||
/** Describes the type of border used by an NSView.
|
||||
<list>
|
||||
|
@ -64,12 +64,13 @@ typedef int NSToolTipTag;
|
|||
<item>NSGrooveBorder</item>
|
||||
</list>
|
||||
*/
|
||||
typedef enum _NSBorderType {
|
||||
enum _NSBorderType {
|
||||
NSNoBorder,
|
||||
NSLineBorder,
|
||||
NSBezelBorder,
|
||||
NSGrooveBorder
|
||||
} NSBorderType;
|
||||
};
|
||||
typedef NSUInteger NSBorderType;
|
||||
|
||||
/*
|
||||
* autoresize constants which NSView uses in
|
||||
|
@ -115,7 +116,7 @@ PACKAGE_SCOPE
|
|||
@protected
|
||||
NSRect _invalidRect;
|
||||
NSRect _visibleRect;
|
||||
int _gstate;
|
||||
NSInteger _gstate;
|
||||
void *_nextKeyView;
|
||||
void *_previousKeyView;
|
||||
|
||||
|
@ -149,7 +150,7 @@ PACKAGE_SCOPE
|
|||
BOOL _is_hidden;
|
||||
BOOL _in_live_resize;
|
||||
|
||||
unsigned int _autoresizingMask;
|
||||
NSUInteger _autoresizingMask;
|
||||
NSFocusRingType _focusRingType;
|
||||
NSRect _autoresizingFrameError;
|
||||
}
|
||||
|
@ -176,7 +177,7 @@ PACKAGE_SCOPE
|
|||
#endif
|
||||
- (void) replaceSubview: (NSView*)oldView
|
||||
with: (NSView*)newView;
|
||||
- (void) sortSubviewsUsingFunction: (int (*)(id ,id ,void*))compare
|
||||
- (void) sortSubviewsUsingFunction: (NSComparisonResult (*)(id ,id ,void*))compare
|
||||
context: (void*)context;
|
||||
- (NSArray*) subviews;
|
||||
#if OS_API_VERSION(MAC_OS_X_VERSION_10_5, GS_API_LATEST)
|
||||
|
@ -266,8 +267,8 @@ PACKAGE_SCOPE
|
|||
- (void) resizeSubviewsWithOldSize: (NSSize)oldSize;
|
||||
- (void) setAutoresizesSubviews: (BOOL)flag;
|
||||
- (BOOL) autoresizesSubviews;
|
||||
- (void) setAutoresizingMask: (unsigned int)mask;
|
||||
- (unsigned int) autoresizingMask;
|
||||
- (void) setAutoresizingMask: (NSUInteger)mask;
|
||||
- (NSUInteger) autoresizingMask;
|
||||
- (void) resizeWithOldSuperviewSize: (NSSize)oldSize;
|
||||
|
||||
/*
|
||||
|
@ -328,7 +329,7 @@ PACKAGE_SCOPE
|
|||
#if OS_API_VERSION(MAC_OS_X_VERSION_10_3, GS_API_LATEST)
|
||||
- (BOOL) wantsDefaultClipping;
|
||||
- (BOOL) needsToDrawRect: (NSRect)aRect;
|
||||
- (void) getRectsBeingDrawn: (const NSRect **)rects count: (int *)count;
|
||||
- (void) getRectsBeingDrawn: (const NSRect **)rects count: (NSInteger *)count;
|
||||
|
||||
/*
|
||||
* Live resize support
|
||||
|
@ -339,7 +340,7 @@ PACKAGE_SCOPE
|
|||
#endif
|
||||
#if OS_API_VERSION(MAC_OS_X_VERSION_10_4, GS_API_LATEST)
|
||||
- (BOOL) preservesContentDuringLiveResize;
|
||||
- (void) getRectsExposedDuringLiveResize: (NSRect[4])exposedRects count: (int *)count;
|
||||
- (void) getRectsExposedDuringLiveResize: (NSRect[4])exposedRects count: (NSInteger *)count;
|
||||
- (NSRect) rectPreservedDuringLiveResize;
|
||||
#endif
|
||||
|
||||
|
@ -349,7 +350,7 @@ PACKAGE_SCOPE
|
|||
*/
|
||||
- (void) allocateGState;
|
||||
- (void) releaseGState;
|
||||
- (int) gState;
|
||||
- (NSInteger) gState;
|
||||
- (void) renewGState;
|
||||
- (void) setUpGState;
|
||||
|
||||
|
@ -536,7 +537,7 @@ PACKAGE_SCOPE
|
|||
- (BOOL) knowsPageRange: (NSRange*)range;
|
||||
#endif
|
||||
- (NSPoint) locationOfPrintRect: (NSRect)aRect;
|
||||
- (NSRect) rectForPage: (int)page;
|
||||
- (NSRect) rectForPage: (NSInteger)page;
|
||||
- (CGFloat) widthAdjustLimit;
|
||||
|
||||
/*
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
@ -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}};
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
|
|
@ -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];
|
||||
|
|
Loading…
Reference in a new issue