mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-06-01 21:01:56 +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
3b66256574
commit
8e67cb9ec5
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>
|
2013-01-29 Fred Kiefer <FredKiefer@gmx.de>
|
||||||
|
|
||||||
* Headers/AppKit/NSApplication.h
|
* Headers/AppKit/NSApplication.h
|
||||||
|
|
|
@ -49,11 +49,12 @@
|
||||||
@class NSText;
|
@class NSText;
|
||||||
@class NSFormatter;
|
@class NSFormatter;
|
||||||
|
|
||||||
typedef enum _NSCellType {
|
enum _NSCellType {
|
||||||
NSNullCellType,
|
NSNullCellType,
|
||||||
NSTextCellType,
|
NSTextCellType,
|
||||||
NSImageCellType
|
NSImageCellType
|
||||||
} NSCellType;
|
};
|
||||||
|
typedef NSUInteger NSCellType;
|
||||||
|
|
||||||
enum {
|
enum {
|
||||||
NSAnyType,
|
NSAnyType,
|
||||||
|
@ -66,7 +67,7 @@ enum {
|
||||||
NSDateType
|
NSDateType
|
||||||
};
|
};
|
||||||
|
|
||||||
typedef enum {
|
enum {
|
||||||
NSNoImage = 0,
|
NSNoImage = 0,
|
||||||
NSImageOnly,
|
NSImageOnly,
|
||||||
NSImageLeft,
|
NSImageLeft,
|
||||||
|
@ -74,9 +75,10 @@ typedef enum {
|
||||||
NSImageBelow,
|
NSImageBelow,
|
||||||
NSImageAbove,
|
NSImageAbove,
|
||||||
NSImageOverlaps
|
NSImageOverlaps
|
||||||
} NSCellImagePosition;
|
};
|
||||||
|
typedef NSUInteger NSCellImagePosition;
|
||||||
|
|
||||||
typedef enum _NSCellAttribute {
|
enum _NSCellAttribute {
|
||||||
NSCellDisabled,
|
NSCellDisabled,
|
||||||
NSCellState,
|
NSCellState,
|
||||||
NSPushInCell,
|
NSPushInCell,
|
||||||
|
@ -94,7 +96,8 @@ typedef enum _NSCellAttribute {
|
||||||
NSCellChangesContents,
|
NSCellChangesContents,
|
||||||
NSCellIsInsetButton,
|
NSCellIsInsetButton,
|
||||||
NSCellAllowsMixedState
|
NSCellAllowsMixedState
|
||||||
} NSCellAttribute;
|
};
|
||||||
|
typedef NSUInteger NSCellAttribute;
|
||||||
|
|
||||||
enum {
|
enum {
|
||||||
NSNoCellMask = 0,
|
NSNoCellMask = 0,
|
||||||
|
@ -113,10 +116,11 @@ enum {
|
||||||
* We try to do as in macosx.
|
* We try to do as in macosx.
|
||||||
*/
|
*/
|
||||||
enum {
|
enum {
|
||||||
|
NSMixedState = -1,
|
||||||
NSOffState = 0,
|
NSOffState = 0,
|
||||||
NSOnState = 1,
|
NSOnState = 1
|
||||||
NSMixedState = -1
|
|
||||||
};
|
};
|
||||||
|
typedef NSUInteger NSCellStateValue;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* <p>Enumeration of the ways that you can display an image in an
|
* <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
|
* <p><code>NSScaleToFit</code>: The image is always resized (up
|
||||||
* or down) to fit exactly in the cell size.</p>
|
* or down) to fit exactly in the cell size.</p>
|
||||||
*/
|
*/
|
||||||
typedef enum {
|
enum {
|
||||||
NSScaleProportionally = 0,
|
NSScaleProportionally = 0,
|
||||||
NSScaleToFit = 1,
|
NSScaleToFit = 1,
|
||||||
NSScaleNone = 2,
|
NSScaleNone = 2,
|
||||||
|
@ -139,7 +143,8 @@ typedef enum {
|
||||||
NSImageScaleAxesIndependently = 1,
|
NSImageScaleAxesIndependently = 1,
|
||||||
NSImageScaleNone = 2,
|
NSImageScaleNone = 2,
|
||||||
NSImageScaleProportionallyUpOrDown = 3
|
NSImageScaleProportionallyUpOrDown = 3
|
||||||
} NSImageScaling;
|
};
|
||||||
|
typedef NSUInteger NSImageScaling;
|
||||||
|
|
||||||
@interface NSCell : NSObject <NSCopying, NSCoding>
|
@interface NSCell : NSObject <NSCopying, NSCoding>
|
||||||
{
|
{
|
||||||
|
@ -188,8 +193,8 @@ typedef enum {
|
||||||
// Set while the cell is edited/selected
|
// Set while the cell is edited/selected
|
||||||
unsigned in_editing: 1;
|
unsigned in_editing: 1;
|
||||||
} _cell;
|
} _cell;
|
||||||
unsigned int _mouse_down_flags;
|
NSUInteger _mouse_down_flags;
|
||||||
unsigned int _action_mask;
|
NSUInteger _action_mask;
|
||||||
NSFormatter *_formatter;
|
NSFormatter *_formatter;
|
||||||
NSMenu *_menu;
|
NSMenu *_menu;
|
||||||
id _represented_object;
|
id _represented_object;
|
||||||
|
@ -235,9 +240,9 @@ typedef enum {
|
||||||
//
|
//
|
||||||
// Setting Parameters
|
// Setting Parameters
|
||||||
//
|
//
|
||||||
- (int)cellAttribute:(NSCellAttribute)aParameter;
|
- (NSInteger)cellAttribute:(NSCellAttribute)aParameter;
|
||||||
- (void)setCellAttribute:(NSCellAttribute)aParameter
|
- (void)setCellAttribute:(NSCellAttribute)aParameter
|
||||||
to:(int)value;
|
to:(NSInteger)value;
|
||||||
|
|
||||||
//
|
//
|
||||||
// Setting the NSCell's Type
|
// Setting the NSCell's Type
|
||||||
|
@ -312,7 +317,7 @@ typedef enum {
|
||||||
//
|
//
|
||||||
- (SEL)action;
|
- (SEL)action;
|
||||||
- (BOOL)isContinuous;
|
- (BOOL)isContinuous;
|
||||||
- (int)sendActionOn:(int)mask;
|
- (NSInteger)sendActionOn:(NSInteger)mask;
|
||||||
- (void)setAction:(SEL)aSelector;
|
- (void)setAction:(SEL)aSelector;
|
||||||
- (void)setContinuous:(BOOL)flag;
|
- (void)setContinuous:(BOOL)flag;
|
||||||
- (void)setTarget:(id)anObject;
|
- (void)setTarget:(id)anObject;
|
||||||
|
@ -337,12 +342,12 @@ typedef enum {
|
||||||
- (void)setFormatter:(NSFormatter *)newFormatter;
|
- (void)setFormatter:(NSFormatter *)newFormatter;
|
||||||
- (id)formatter;
|
- (id)formatter;
|
||||||
#endif
|
#endif
|
||||||
- (int)entryType;
|
- (NSInteger)entryType;
|
||||||
- (BOOL)isEntryAcceptable:(NSString *)aString;
|
- (BOOL)isEntryAcceptable:(NSString *)aString;
|
||||||
- (void)setEntryType:(int)aType;
|
- (void)setEntryType:(NSInteger)aType;
|
||||||
- (void)setFloatingPointFormat:(BOOL)autoRange
|
- (void)setFloatingPointFormat:(BOOL)autoRange
|
||||||
left:(unsigned int)leftDigits
|
left:(NSUInteger)leftDigits
|
||||||
right:(unsigned int)rightDigits;
|
right:(NSUInteger)rightDigits;
|
||||||
|
|
||||||
//
|
//
|
||||||
// Menu
|
// Menu
|
||||||
|
@ -411,7 +416,7 @@ typedef enum {
|
||||||
- (BOOL)continueTracking:(NSPoint)lastPoint
|
- (BOOL)continueTracking:(NSPoint)lastPoint
|
||||||
at:(NSPoint)currentPoint
|
at:(NSPoint)currentPoint
|
||||||
inView:(NSView *)controlView;
|
inView:(NSView *)controlView;
|
||||||
- (int)mouseDownFlags;
|
- (NSInteger)mouseDownFlags;
|
||||||
- (void)getPeriodicDelay:(float *)delay
|
- (void)getPeriodicDelay:(float *)delay
|
||||||
interval:(float *)interval;
|
interval:(float *)interval;
|
||||||
- (BOOL)startTrackingAt:(NSPoint)startPoint
|
- (BOOL)startTrackingAt:(NSPoint)startPoint
|
||||||
|
@ -486,8 +491,8 @@ typedef enum {
|
||||||
inView:(NSView *)controlView
|
inView:(NSView *)controlView
|
||||||
editor:(NSText *)textObject
|
editor:(NSText *)textObject
|
||||||
delegate:(id)anObject
|
delegate:(id)anObject
|
||||||
start:(int)selStart
|
start:(NSInteger)selStart
|
||||||
length:(int)selLength;
|
length:(NSInteger)selLength;
|
||||||
- (void)endEditing:(NSText *)textObject;
|
- (void)endEditing:(NSText *)textObject;
|
||||||
#if OS_API_VERSION(GS_API_MACOSX, GS_API_LATEST)
|
#if OS_API_VERSION(GS_API_MACOSX, GS_API_LATEST)
|
||||||
- (BOOL)sendsActionOnEndEditing;
|
- (BOOL)sendsActionOnEndEditing;
|
||||||
|
@ -511,7 +516,7 @@ typedef enum {
|
||||||
- (void) _drawText: (NSString*)aString inFrame: (NSRect)cellFrame;
|
- (void) _drawText: (NSString*)aString inFrame: (NSRect)cellFrame;
|
||||||
- (void) _drawAttributedText: (NSAttributedString*)aString
|
- (void) _drawAttributedText: (NSAttributedString*)aString
|
||||||
inFrame: (NSRect)aRect;
|
inFrame: (NSRect)aRect;
|
||||||
- (BOOL) _sendsActionOn:(int)eventTypeMask;
|
- (BOOL) _sendsActionOn:(NSUInteger)eventTypeMask;
|
||||||
- (NSAttributedString*) _drawAttributedString;
|
- (NSAttributedString*) _drawAttributedString;
|
||||||
- (void) _drawBorderAndBackgroundWithFrame: (NSRect)cellFrame
|
- (void) _drawBorderAndBackgroundWithFrame: (NSRect)cellFrame
|
||||||
inView: (NSView*)controlView;
|
inView: (NSView*)controlView;
|
||||||
|
|
|
@ -41,18 +41,20 @@
|
||||||
@class NSImage;
|
@class NSImage;
|
||||||
@class NSColorSpace;
|
@class NSColorSpace;
|
||||||
|
|
||||||
typedef enum _NSControlTint {
|
enum _NSControlTint {
|
||||||
NSDefaultControlTint,
|
NSDefaultControlTint,
|
||||||
NSBlueControlTint,
|
NSBlueControlTint,
|
||||||
NSGraphiteControlTint = 6,
|
NSGraphiteControlTint = 6,
|
||||||
NSClearControlTint
|
NSClearControlTint
|
||||||
} NSControlTint;
|
};
|
||||||
|
typedef NSUInteger NSControlTint;
|
||||||
|
|
||||||
typedef enum _NSControlSize {
|
enum _NSControlSize {
|
||||||
NSRegularControlSize,
|
NSRegularControlSize,
|
||||||
NSSmallControlSize,
|
NSSmallControlSize,
|
||||||
NSMiniControlSize
|
NSMiniControlSize
|
||||||
} NSControlSize;
|
};
|
||||||
|
typedef NSUInteger NSControlSize;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* NSColor is an abstract super class of the class cluster of the real colour classes.
|
* 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
|
* Gray Values
|
||||||
*/
|
*/
|
||||||
APPKIT_EXPORT const float NSBlack;
|
APPKIT_EXPORT const CGFloat NSBlack;
|
||||||
APPKIT_EXPORT const float NSDarkGray;
|
APPKIT_EXPORT const CGFloat NSDarkGray;
|
||||||
APPKIT_EXPORT const float NSWhite;
|
APPKIT_EXPORT const CGFloat NSWhite;
|
||||||
APPKIT_EXPORT const float NSLightGray;
|
APPKIT_EXPORT const CGFloat NSLightGray;
|
||||||
APPKIT_EXPORT const float NSGray;
|
APPKIT_EXPORT const CGFloat NSGray;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Device Dictionary Keys
|
* Device Dictionary Keys
|
||||||
|
@ -101,12 +101,12 @@ APPKIT_EXPORT NSString *NSDeviceSize;
|
||||||
*/
|
*/
|
||||||
APPKIT_EXPORT const NSWindowDepth *NSAvailableWindowDepths(void);
|
APPKIT_EXPORT const NSWindowDepth *NSAvailableWindowDepths(void);
|
||||||
APPKIT_EXPORT NSWindowDepth NSBestDepth(NSString *colorSpace,
|
APPKIT_EXPORT NSWindowDepth NSBestDepth(NSString *colorSpace,
|
||||||
int bitsPerSample, int bitsPerPixel,
|
NSInteger bitsPerSample, NSInteger bitsPerPixel,
|
||||||
BOOL planar, BOOL *exactMatch);
|
BOOL planar, BOOL *exactMatch);
|
||||||
APPKIT_EXPORT int NSBitsPerPixelFromDepth(NSWindowDepth depth);
|
APPKIT_EXPORT NSInteger NSBitsPerPixelFromDepth(NSWindowDepth depth);
|
||||||
APPKIT_EXPORT int NSBitsPerSampleFromDepth(NSWindowDepth depth);
|
APPKIT_EXPORT NSInteger NSBitsPerSampleFromDepth(NSWindowDepth depth);
|
||||||
APPKIT_EXPORT NSString *NSColorSpaceFromDepth(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);
|
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 NSEraseRect(NSRect aRect);
|
||||||
APPKIT_EXPORT void NSHighlightRect(NSRect aRect);
|
APPKIT_EXPORT void NSHighlightRect(NSRect aRect);
|
||||||
APPKIT_EXPORT void NSRectClip(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 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,
|
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
|
/** Draws a set of edges of aRect. The sides array should contain
|
||||||
count edges, and grays the corresponding color. Edges are drawn
|
count edges, and grays the corresponding color. Edges are drawn
|
||||||
in the order given in the array, and subsequent edges are drawn
|
in the order given in the array, and subsequent edges are drawn
|
||||||
inside previous edges (thus, they will never overlap). */
|
inside previous edges (thus, they will never overlap). */
|
||||||
APPKIT_EXPORT NSRect NSDrawTiledRects(NSRect aRect, const NSRect clipRect,
|
APPKIT_EXPORT NSRect NSDrawTiledRects(NSRect aRect, const NSRect clipRect,
|
||||||
const NSRectEdge *sides,
|
const NSRectEdge *sides,
|
||||||
const float *grays, int count);
|
const CGFloat *grays,
|
||||||
|
NSInteger count);
|
||||||
|
|
||||||
APPKIT_EXPORT void NSDrawButton(const NSRect aRect, const NSRect clipRect);
|
APPKIT_EXPORT void NSDrawButton(const NSRect aRect, const NSRect clipRect);
|
||||||
APPKIT_EXPORT void NSDrawGrayBezel(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.
|
outside the given rectangle.
|
||||||
</p> */
|
</p> */
|
||||||
APPKIT_EXPORT void NSFrameRect(const NSRect aRect);
|
APPKIT_EXPORT void NSFrameRect(const NSRect aRect);
|
||||||
APPKIT_EXPORT void NSFrameRectWithWidth(const NSRect aRect, float frameWidth);
|
APPKIT_EXPORT void NSFrameRectWithWidth(const NSRect aRect, CGFloat frameWidth);
|
||||||
APPKIT_EXPORT void NSFrameRectWithWidthUsingOperation(const NSRect aRect, float frameWidth,
|
APPKIT_EXPORT void NSFrameRectWithWidthUsingOperation(const NSRect aRect, CGFloat frameWidth,
|
||||||
NSCompositingOperation op);
|
NSCompositingOperation op);
|
||||||
|
|
||||||
APPKIT_EXPORT NSColor* NSReadPixel(NSPoint location);
|
APPKIT_EXPORT NSColor* NSReadPixel(NSPoint location);
|
||||||
|
|
||||||
APPKIT_EXPORT void NSCopyBitmapFromGState(int srcGstate, NSRect srcRect,
|
APPKIT_EXPORT void NSCopyBitmapFromGState(int srcGstate, NSRect srcRect,
|
||||||
NSRect destRect);
|
NSRect destRect);
|
||||||
APPKIT_EXPORT void NSCopyBits(int srcGstate, NSRect srcRect,
|
APPKIT_EXPORT void NSCopyBits(NSInteger srcGstate, NSRect srcRect,
|
||||||
NSPoint destPoint);
|
NSPoint destPoint);
|
||||||
|
|
||||||
APPKIT_EXPORT void NSDrawBitmap(NSRect rect,
|
APPKIT_EXPORT void NSDrawBitmap(NSRect rect,
|
||||||
int pixelsWide,
|
NSInteger pixelsWide,
|
||||||
int pixelsHigh,
|
NSInteger pixelsHigh,
|
||||||
int bitsPerSample,
|
NSInteger bitsPerSample,
|
||||||
int samplesPerPixel,
|
NSInteger samplesPerPixel,
|
||||||
int bitsPerPixel,
|
NSInteger bitsPerPixel,
|
||||||
int bytesPerRow,
|
NSInteger bytesPerRow,
|
||||||
BOOL isPlanar,
|
BOOL isPlanar,
|
||||||
BOOL hasAlpha,
|
BOOL hasAlpha,
|
||||||
NSString *colorSpaceName,
|
NSString *colorSpaceName,
|
||||||
|
@ -230,32 +232,32 @@ APPKIT_EXPORT void NSConvertWindowNumberToGlobal(int winNum, unsigned int *globa
|
||||||
|
|
||||||
// Rectangle drawing
|
// Rectangle drawing
|
||||||
APPKIT_EXPORT NSRect NSDrawColorTiledRects(NSRect boundsRect, NSRect clipRect,
|
APPKIT_EXPORT NSRect NSDrawColorTiledRects(NSRect boundsRect, NSRect clipRect,
|
||||||
const NSRectEdge *sides,
|
const NSRectEdge *sides,
|
||||||
NSColor **colors,
|
NSColor **colors,
|
||||||
int count);
|
NSInteger count);
|
||||||
APPKIT_EXPORT void NSDrawDarkBezel(NSRect aRect, NSRect clipRect);
|
APPKIT_EXPORT void NSDrawDarkBezel(NSRect aRect, NSRect clipRect);
|
||||||
APPKIT_EXPORT void NSDrawLightBezel(NSRect aRect, NSRect clipRect);
|
APPKIT_EXPORT void NSDrawLightBezel(NSRect aRect, NSRect clipRect);
|
||||||
APPKIT_EXPORT void NSRectFillListWithColors(const NSRect *rects,
|
APPKIT_EXPORT void NSRectFillListWithColors(const NSRect *rects,
|
||||||
NSColor **colors, int count);
|
NSColor **colors, NSInteger count);
|
||||||
|
|
||||||
APPKIT_EXPORT void NSRectFillUsingOperation(NSRect aRect,
|
APPKIT_EXPORT void NSRectFillUsingOperation(NSRect aRect,
|
||||||
NSCompositingOperation op);
|
NSCompositingOperation op);
|
||||||
APPKIT_EXPORT void NSRectFillListUsingOperation(const NSRect *rects,
|
APPKIT_EXPORT void NSRectFillListUsingOperation(const NSRect *rects,
|
||||||
int count,
|
NSInteger count,
|
||||||
NSCompositingOperation op);
|
NSCompositingOperation op);
|
||||||
APPKIT_EXPORT void NSRectFillListWithColorsUsingOperation(const NSRect *rects,
|
APPKIT_EXPORT void NSRectFillListWithColorsUsingOperation(const NSRect *rects,
|
||||||
NSColor **colors,
|
NSColor **colors,
|
||||||
int num,
|
NSInteger num,
|
||||||
NSCompositingOperation op);
|
NSCompositingOperation op);
|
||||||
|
|
||||||
APPKIT_EXPORT void NSDrawWindowBackground(NSRect aRect);
|
APPKIT_EXPORT void NSDrawWindowBackground(NSRect aRect);
|
||||||
|
|
||||||
// Context information
|
// Context information
|
||||||
APPKIT_EXPORT void NSCountWindowsForContext(int context, int *count);
|
APPKIT_EXPORT void NSCountWindowsForContext(NSInteger context, NSInteger *count);
|
||||||
APPKIT_EXPORT void NSWindowListForContext(int context, int size, int **list);
|
APPKIT_EXPORT void NSWindowListForContext(NSInteger context, NSInteger size, NSInteger **list);
|
||||||
APPKIT_EXPORT int NSGetWindowServerMemory(int context, int *virtualMemory,
|
APPKIT_EXPORT int NSGetWindowServerMemory(int context, int *virtualMemory,
|
||||||
int *windowBackingMemory,
|
int *windowBackingMemory,
|
||||||
NSString **windowDumpStream);
|
NSString **windowDumpStream);
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
|
@ -53,8 +53,8 @@
|
||||||
@class NSView;
|
@class NSView;
|
||||||
@class NSWindow;
|
@class NSWindow;
|
||||||
|
|
||||||
typedef int NSTrackingRectTag;
|
typedef NSInteger NSTrackingRectTag;
|
||||||
typedef int NSToolTipTag;
|
typedef NSInteger NSToolTipTag;
|
||||||
|
|
||||||
/** Describes the type of border used by an NSView.
|
/** Describes the type of border used by an NSView.
|
||||||
<list>
|
<list>
|
||||||
|
@ -64,12 +64,13 @@ typedef int NSToolTipTag;
|
||||||
<item>NSGrooveBorder</item>
|
<item>NSGrooveBorder</item>
|
||||||
</list>
|
</list>
|
||||||
*/
|
*/
|
||||||
typedef enum _NSBorderType {
|
enum _NSBorderType {
|
||||||
NSNoBorder,
|
NSNoBorder,
|
||||||
NSLineBorder,
|
NSLineBorder,
|
||||||
NSBezelBorder,
|
NSBezelBorder,
|
||||||
NSGrooveBorder
|
NSGrooveBorder
|
||||||
} NSBorderType;
|
};
|
||||||
|
typedef NSUInteger NSBorderType;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* autoresize constants which NSView uses in
|
* autoresize constants which NSView uses in
|
||||||
|
@ -115,7 +116,7 @@ PACKAGE_SCOPE
|
||||||
@protected
|
@protected
|
||||||
NSRect _invalidRect;
|
NSRect _invalidRect;
|
||||||
NSRect _visibleRect;
|
NSRect _visibleRect;
|
||||||
int _gstate;
|
NSInteger _gstate;
|
||||||
void *_nextKeyView;
|
void *_nextKeyView;
|
||||||
void *_previousKeyView;
|
void *_previousKeyView;
|
||||||
|
|
||||||
|
@ -149,7 +150,7 @@ PACKAGE_SCOPE
|
||||||
BOOL _is_hidden;
|
BOOL _is_hidden;
|
||||||
BOOL _in_live_resize;
|
BOOL _in_live_resize;
|
||||||
|
|
||||||
unsigned int _autoresizingMask;
|
NSUInteger _autoresizingMask;
|
||||||
NSFocusRingType _focusRingType;
|
NSFocusRingType _focusRingType;
|
||||||
NSRect _autoresizingFrameError;
|
NSRect _autoresizingFrameError;
|
||||||
}
|
}
|
||||||
|
@ -176,7 +177,7 @@ PACKAGE_SCOPE
|
||||||
#endif
|
#endif
|
||||||
- (void) replaceSubview: (NSView*)oldView
|
- (void) replaceSubview: (NSView*)oldView
|
||||||
with: (NSView*)newView;
|
with: (NSView*)newView;
|
||||||
- (void) sortSubviewsUsingFunction: (int (*)(id ,id ,void*))compare
|
- (void) sortSubviewsUsingFunction: (NSComparisonResult (*)(id ,id ,void*))compare
|
||||||
context: (void*)context;
|
context: (void*)context;
|
||||||
- (NSArray*) subviews;
|
- (NSArray*) subviews;
|
||||||
#if OS_API_VERSION(MAC_OS_X_VERSION_10_5, GS_API_LATEST)
|
#if OS_API_VERSION(MAC_OS_X_VERSION_10_5, GS_API_LATEST)
|
||||||
|
@ -266,8 +267,8 @@ PACKAGE_SCOPE
|
||||||
- (void) resizeSubviewsWithOldSize: (NSSize)oldSize;
|
- (void) resizeSubviewsWithOldSize: (NSSize)oldSize;
|
||||||
- (void) setAutoresizesSubviews: (BOOL)flag;
|
- (void) setAutoresizesSubviews: (BOOL)flag;
|
||||||
- (BOOL) autoresizesSubviews;
|
- (BOOL) autoresizesSubviews;
|
||||||
- (void) setAutoresizingMask: (unsigned int)mask;
|
- (void) setAutoresizingMask: (NSUInteger)mask;
|
||||||
- (unsigned int) autoresizingMask;
|
- (NSUInteger) autoresizingMask;
|
||||||
- (void) resizeWithOldSuperviewSize: (NSSize)oldSize;
|
- (void) resizeWithOldSuperviewSize: (NSSize)oldSize;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -328,7 +329,7 @@ PACKAGE_SCOPE
|
||||||
#if OS_API_VERSION(MAC_OS_X_VERSION_10_3, GS_API_LATEST)
|
#if OS_API_VERSION(MAC_OS_X_VERSION_10_3, GS_API_LATEST)
|
||||||
- (BOOL) wantsDefaultClipping;
|
- (BOOL) wantsDefaultClipping;
|
||||||
- (BOOL) needsToDrawRect: (NSRect)aRect;
|
- (BOOL) needsToDrawRect: (NSRect)aRect;
|
||||||
- (void) getRectsBeingDrawn: (const NSRect **)rects count: (int *)count;
|
- (void) getRectsBeingDrawn: (const NSRect **)rects count: (NSInteger *)count;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Live resize support
|
* Live resize support
|
||||||
|
@ -339,7 +340,7 @@ PACKAGE_SCOPE
|
||||||
#endif
|
#endif
|
||||||
#if OS_API_VERSION(MAC_OS_X_VERSION_10_4, GS_API_LATEST)
|
#if OS_API_VERSION(MAC_OS_X_VERSION_10_4, GS_API_LATEST)
|
||||||
- (BOOL) preservesContentDuringLiveResize;
|
- (BOOL) preservesContentDuringLiveResize;
|
||||||
- (void) getRectsExposedDuringLiveResize: (NSRect[4])exposedRects count: (int *)count;
|
- (void) getRectsExposedDuringLiveResize: (NSRect[4])exposedRects count: (NSInteger *)count;
|
||||||
- (NSRect) rectPreservedDuringLiveResize;
|
- (NSRect) rectPreservedDuringLiveResize;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -349,7 +350,7 @@ PACKAGE_SCOPE
|
||||||
*/
|
*/
|
||||||
- (void) allocateGState;
|
- (void) allocateGState;
|
||||||
- (void) releaseGState;
|
- (void) releaseGState;
|
||||||
- (int) gState;
|
- (NSInteger) gState;
|
||||||
- (void) renewGState;
|
- (void) renewGState;
|
||||||
- (void) setUpGState;
|
- (void) setUpGState;
|
||||||
|
|
||||||
|
@ -536,7 +537,7 @@ PACKAGE_SCOPE
|
||||||
- (BOOL) knowsPageRange: (NSRange*)range;
|
- (BOOL) knowsPageRange: (NSRange*)range;
|
||||||
#endif
|
#endif
|
||||||
- (NSPoint) locationOfPrintRect: (NSRect)aRect;
|
- (NSPoint) locationOfPrintRect: (NSRect)aRect;
|
||||||
- (NSRect) rectForPage: (int)page;
|
- (NSRect) rectForPage: (NSInteger)page;
|
||||||
- (CGFloat) widthAdjustLimit;
|
- (CGFloat) widthAdjustLimit;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
|
@ -117,11 +117,11 @@ NSAvailableWindowDepths(void)
|
||||||
}
|
}
|
||||||
|
|
||||||
NSWindowDepth
|
NSWindowDepth
|
||||||
NSBestDepth(NSString *colorSpace, int bitsPerSample, int bitsPerPixel,
|
NSBestDepth(NSString *colorSpace, NSInteger bitsPerSample, NSInteger bitsPerPixel,
|
||||||
BOOL planar, BOOL *exactMatch)
|
BOOL planar, BOOL *exactMatch)
|
||||||
{
|
{
|
||||||
int components = NSNumberOfColorComponents(colorSpace);
|
NSInteger components = NSNumberOfColorComponents(colorSpace);
|
||||||
int index = 0;
|
NSInteger index = 0;
|
||||||
const NSWindowDepth *depths = NSAvailableWindowDepths();
|
const NSWindowDepth *depths = NSAvailableWindowDepths();
|
||||||
NSWindowDepth bestDepth = NSDefaultDepth;
|
NSWindowDepth bestDepth = NSDefaultDepth;
|
||||||
|
|
||||||
|
@ -166,11 +166,11 @@ NSBestDepth(NSString *colorSpace, int bitsPerSample, int bitsPerPixel,
|
||||||
return bestDepth;
|
return bestDepth;
|
||||||
}
|
}
|
||||||
|
|
||||||
int
|
NSInteger
|
||||||
NSBitsPerPixelFromDepth(NSWindowDepth depth)
|
NSBitsPerPixelFromDepth(NSWindowDepth depth)
|
||||||
{
|
{
|
||||||
int bps = NSBitsPerSampleFromDepth(depth);
|
NSInteger bps = NSBitsPerSampleFromDepth(depth);
|
||||||
int spp = 0;
|
NSInteger spp = 0;
|
||||||
|
|
||||||
if (depth & _GSRGBBitValue)
|
if (depth & _GSRGBBitValue)
|
||||||
{
|
{
|
||||||
|
@ -187,7 +187,7 @@ NSBitsPerPixelFromDepth(NSWindowDepth depth)
|
||||||
return (spp * bps);
|
return (spp * bps);
|
||||||
}
|
}
|
||||||
|
|
||||||
int
|
NSInteger
|
||||||
NSBitsPerSampleFromDepth(NSWindowDepth depth)
|
NSBitsPerSampleFromDepth(NSWindowDepth depth)
|
||||||
{
|
{
|
||||||
NSWindowDepth bitValue = 0;
|
NSWindowDepth bitValue = 0;
|
||||||
|
@ -252,10 +252,10 @@ NSColorSpaceFromDepth(NSWindowDepth depth)
|
||||||
return colorSpace;
|
return colorSpace;
|
||||||
}
|
}
|
||||||
|
|
||||||
int
|
NSInteger
|
||||||
NSNumberOfColorComponents(NSString *colorSpaceName)
|
NSNumberOfColorComponents(NSString *colorSpaceName)
|
||||||
{
|
{
|
||||||
int components = 1;
|
NSInteger components = 1;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* These are the only exceptions to the above.
|
* These are the only exceptions to the above.
|
||||||
|
@ -301,7 +301,7 @@ void NSCopyBitmapFromGState(int srcGstate, NSRect srcRect, NSRect destRect)
|
||||||
NSLog(@"NSCopyBitmapFromGState not implemented");
|
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;
|
float x, y, w, h;
|
||||||
NSGraphicsContext *ctxt = GSCurrentContext();
|
NSGraphicsContext *ctxt = GSCurrentContext();
|
||||||
|
@ -316,12 +316,12 @@ void NSCopyBits(int srcGstate, NSRect srcRect, NSPoint destPoint)
|
||||||
}
|
}
|
||||||
|
|
||||||
void NSDrawBitmap(NSRect rect,
|
void NSDrawBitmap(NSRect rect,
|
||||||
int pixelsWide,
|
NSInteger pixelsWide,
|
||||||
int pixelsHigh,
|
NSInteger pixelsHigh,
|
||||||
int bitsPerSample,
|
NSInteger bitsPerSample,
|
||||||
int samplesPerPixel,
|
NSInteger samplesPerPixel,
|
||||||
int bitsPerPixel,
|
NSInteger bitsPerPixel,
|
||||||
int bytesPerRow,
|
NSInteger bytesPerRow,
|
||||||
BOOL isPlanar,
|
BOOL isPlanar,
|
||||||
BOOL hasAlpha,
|
BOOL hasAlpha,
|
||||||
NSString *colorSpaceName,
|
NSString *colorSpaceName,
|
||||||
|
@ -534,9 +534,9 @@ void NSRectClip(NSRect aRect)
|
||||||
DPSnewpath(ctxt);
|
DPSnewpath(ctxt);
|
||||||
}
|
}
|
||||||
|
|
||||||
void NSRectClipList(const NSRect *rects, int count)
|
void NSRectClipList(const NSRect *rects, NSInteger count)
|
||||||
{
|
{
|
||||||
int i;
|
NSInteger i;
|
||||||
NSRect union_rect;
|
NSRect union_rect;
|
||||||
|
|
||||||
if (count == 0)
|
if (count == 0)
|
||||||
|
@ -561,16 +561,16 @@ void NSRectFill(NSRect aRect)
|
||||||
NSWidth(aRect), NSHeight(aRect));
|
NSWidth(aRect), NSHeight(aRect));
|
||||||
}
|
}
|
||||||
|
|
||||||
void NSRectFillList(const NSRect *rects, int count)
|
void NSRectFillList(const NSRect *rects, NSInteger count)
|
||||||
{
|
{
|
||||||
NSGraphicsContext *ctxt = GSCurrentContext();
|
NSGraphicsContext *ctxt = GSCurrentContext();
|
||||||
GSRectFillList(ctxt, rects, count);
|
GSRectFillList(ctxt, rects, count);
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
NSRectFillListWithColors(const NSRect *rects, NSColor **colors, int count)
|
NSRectFillListWithColors(const NSRect *rects, NSColor **colors, NSInteger count)
|
||||||
{
|
{
|
||||||
int i;
|
NSInteger i;
|
||||||
NSGraphicsContext *ctxt = GSCurrentContext();
|
NSGraphicsContext *ctxt = GSCurrentContext();
|
||||||
DPSgsave(ctxt);
|
DPSgsave(ctxt);
|
||||||
|
|
||||||
|
@ -583,10 +583,10 @@ NSRectFillListWithColors(const NSRect *rects, NSColor **colors, int count)
|
||||||
DPSgrestore(ctxt);
|
DPSgrestore(ctxt);
|
||||||
}
|
}
|
||||||
|
|
||||||
void NSRectFillListWithGrays(const NSRect *rects, const float *grays,
|
void NSRectFillListWithGrays(const NSRect *rects, const CGFloat *grays,
|
||||||
int count)
|
NSInteger count)
|
||||||
{
|
{
|
||||||
int i;
|
NSInteger i;
|
||||||
NSGraphicsContext *ctxt = GSCurrentContext();
|
NSGraphicsContext *ctxt = GSCurrentContext();
|
||||||
DPSgsave(ctxt);
|
DPSgsave(ctxt);
|
||||||
|
|
||||||
|
@ -609,10 +609,10 @@ void NSRectFillUsingOperation(NSRect aRect, NSCompositingOperation op)
|
||||||
|
|
||||||
|
|
||||||
void
|
void
|
||||||
NSRectFillListUsingOperation(const NSRect *rects, int count,
|
NSRectFillListUsingOperation(const NSRect *rects, NSInteger count,
|
||||||
NSCompositingOperation op)
|
NSCompositingOperation op)
|
||||||
{
|
{
|
||||||
int i;
|
NSInteger i;
|
||||||
|
|
||||||
for (i = 0; i < count; i++)
|
for (i = 0; i < count; i++)
|
||||||
{
|
{
|
||||||
|
@ -623,10 +623,10 @@ NSRectFillListUsingOperation(const NSRect *rects, int count,
|
||||||
void
|
void
|
||||||
NSRectFillListWithColorsUsingOperation(const NSRect *rects,
|
NSRectFillListWithColorsUsingOperation(const NSRect *rects,
|
||||||
NSColor **colors,
|
NSColor **colors,
|
||||||
int num,
|
NSInteger num,
|
||||||
NSCompositingOperation op)
|
NSCompositingOperation op)
|
||||||
{
|
{
|
||||||
int i;
|
NSInteger i;
|
||||||
NSGraphicsContext *ctxt = GSCurrentContext();
|
NSGraphicsContext *ctxt = GSCurrentContext();
|
||||||
DPSgsave(ctxt);
|
DPSgsave(ctxt);
|
||||||
|
|
||||||
|
@ -661,7 +661,7 @@ void NSFrameRect(const NSRect aRect)
|
||||||
NSFrameRectWithWidth(aRect, 1.0);
|
NSFrameRectWithWidth(aRect, 1.0);
|
||||||
}
|
}
|
||||||
|
|
||||||
void NSFrameRectWithWidth(const NSRect aRect, float frameWidth)
|
void NSFrameRectWithWidth(const NSRect aRect, CGFloat frameWidth)
|
||||||
{
|
{
|
||||||
NSRectEdge sides[] = {NSMaxXEdge, NSMinYEdge, NSMinXEdge, NSMaxYEdge};
|
NSRectEdge sides[] = {NSMaxXEdge, NSMinYEdge, NSMinXEdge, NSMaxYEdge};
|
||||||
NSRect remainder = aRect;
|
NSRect remainder = aRect;
|
||||||
|
@ -676,7 +676,7 @@ void NSFrameRectWithWidth(const NSRect aRect, float frameWidth)
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
NSFrameRectWithWidthUsingOperation(NSRect aRect, float frameWidth,
|
NSFrameRectWithWidthUsingOperation(NSRect aRect, CGFloat frameWidth,
|
||||||
NSCompositingOperation op)
|
NSCompositingOperation op)
|
||||||
{
|
{
|
||||||
NSRectEdge sides[] = {NSMaxXEdge, NSMinYEdge, NSMinXEdge, NSMaxYEdge};
|
NSRectEdge sides[] = {NSMaxXEdge, NSMinYEdge, NSMinXEdge, NSMaxYEdge};
|
||||||
|
@ -694,9 +694,9 @@ NSFrameRectWithWidthUsingOperation(NSRect aRect, float frameWidth,
|
||||||
NSRect
|
NSRect
|
||||||
NSDrawTiledRects(NSRect aRect, const NSRect clipRect,
|
NSDrawTiledRects(NSRect aRect, const NSRect clipRect,
|
||||||
const NSRectEdge *sides,
|
const NSRectEdge *sides,
|
||||||
const float *grays, int count)
|
const CGFloat *grays, NSInteger count)
|
||||||
{
|
{
|
||||||
int i;
|
NSInteger i;
|
||||||
NSRect slice;
|
NSRect slice;
|
||||||
NSRect remainder = aRect;
|
NSRect remainder = aRect;
|
||||||
NSRect rects[count];
|
NSRect rects[count];
|
||||||
|
@ -722,9 +722,9 @@ NSDrawTiledRects(NSRect aRect, const NSRect clipRect,
|
||||||
NSRect
|
NSRect
|
||||||
NSDrawColorTiledRects(NSRect boundsRect, NSRect clipRect,
|
NSDrawColorTiledRects(NSRect boundsRect, NSRect clipRect,
|
||||||
const NSRectEdge *sides, NSColor **colors,
|
const NSRectEdge *sides, NSColor **colors,
|
||||||
int count)
|
NSInteger count)
|
||||||
{
|
{
|
||||||
int i;
|
NSInteger i;
|
||||||
NSRect slice;
|
NSRect slice;
|
||||||
NSRect remainder = boundsRect;
|
NSRect remainder = boundsRect;
|
||||||
NSRect rects[count];
|
NSRect rects[count];
|
||||||
|
@ -756,9 +756,9 @@ NSDrawButton(const NSRect aRect, const NSRect clipRect)
|
||||||
NSRectEdge down_sides[] = {NSMaxXEdge, NSMaxYEdge,
|
NSRectEdge down_sides[] = {NSMaxXEdge, NSMaxYEdge,
|
||||||
NSMinXEdge, NSMinYEdge,
|
NSMinXEdge, NSMinYEdge,
|
||||||
NSMaxXEdge, NSMaxYEdge};
|
NSMaxXEdge, NSMaxYEdge};
|
||||||
float grays[] = {NSBlack, NSBlack,
|
CGFloat grays[] = {NSBlack, NSBlack,
|
||||||
NSWhite, NSWhite,
|
NSWhite, NSWhite,
|
||||||
NSDarkGray, NSDarkGray};
|
NSDarkGray, NSDarkGray};
|
||||||
NSRect rect;
|
NSRect rect;
|
||||||
NSGraphicsContext *ctxt = GSCurrentContext();
|
NSGraphicsContext *ctxt = GSCurrentContext();
|
||||||
|
|
||||||
|
@ -786,8 +786,8 @@ NSDrawGrayBezel(const NSRect aRect, const NSRect clipRect)
|
||||||
NSMaxXEdge, NSMinYEdge, NSMinXEdge, NSMaxYEdge};
|
NSMaxXEdge, NSMinYEdge, NSMinXEdge, NSMaxYEdge};
|
||||||
NSRectEdge down_sides[] = {NSMaxXEdge, NSMaxYEdge, NSMinXEdge, NSMinYEdge,
|
NSRectEdge down_sides[] = {NSMaxXEdge, NSMaxYEdge, NSMinXEdge, NSMinYEdge,
|
||||||
NSMaxXEdge, NSMaxYEdge, NSMinXEdge, NSMinYEdge};
|
NSMaxXEdge, NSMaxYEdge, NSMinXEdge, NSMinYEdge};
|
||||||
float grays[] = {NSWhite, NSWhite, NSDarkGray, NSDarkGray,
|
CGFloat grays[] = {NSWhite, NSWhite, NSDarkGray, NSDarkGray,
|
||||||
NSLightGray, NSLightGray, NSBlack, NSBlack};
|
NSLightGray, NSLightGray, NSBlack, NSBlack};
|
||||||
NSRect rect;
|
NSRect rect;
|
||||||
NSGraphicsContext *ctxt = GSCurrentContext();
|
NSGraphicsContext *ctxt = GSCurrentContext();
|
||||||
|
|
||||||
|
@ -825,8 +825,8 @@ NSDrawGroove(const NSRect aRect, const NSRect clipRect)
|
||||||
NSMaxXEdge, NSMinYEdge, NSMaxXEdge, NSMinYEdge};
|
NSMaxXEdge, NSMinYEdge, NSMaxXEdge, NSMinYEdge};
|
||||||
NSRectEdge down_sides[] = {NSMinXEdge, NSMinYEdge, NSMinXEdge, NSMinYEdge,
|
NSRectEdge down_sides[] = {NSMinXEdge, NSMinYEdge, NSMinXEdge, NSMinYEdge,
|
||||||
NSMaxXEdge, NSMaxYEdge, NSMaxXEdge, NSMaxYEdge};
|
NSMaxXEdge, NSMaxYEdge, NSMaxXEdge, NSMaxYEdge};
|
||||||
float grays[] = {NSDarkGray, NSDarkGray, NSWhite, NSWhite,
|
CGFloat grays[] = {NSDarkGray, NSDarkGray, NSWhite, NSWhite,
|
||||||
NSWhite, NSWhite, NSDarkGray, NSDarkGray};
|
NSWhite, NSWhite, NSDarkGray, NSDarkGray};
|
||||||
NSRect rect;
|
NSRect rect;
|
||||||
NSGraphicsContext *ctxt = GSCurrentContext();
|
NSGraphicsContext *ctxt = GSCurrentContext();
|
||||||
|
|
||||||
|
@ -855,8 +855,8 @@ NSDrawWhiteBezel(const NSRect aRect, const NSRect clipRect)
|
||||||
NSMaxYEdge, NSMaxXEdge, NSMinYEdge, NSMinXEdge};
|
NSMaxYEdge, NSMaxXEdge, NSMinYEdge, NSMinXEdge};
|
||||||
NSRectEdge down_sides[] = {NSMinYEdge, NSMaxXEdge, NSMaxYEdge, NSMinXEdge,
|
NSRectEdge down_sides[] = {NSMinYEdge, NSMaxXEdge, NSMaxYEdge, NSMinXEdge,
|
||||||
NSMinYEdge, NSMaxXEdge, NSMaxYEdge, NSMinXEdge};
|
NSMinYEdge, NSMaxXEdge, NSMaxYEdge, NSMinXEdge};
|
||||||
float grays[] = {NSDarkGray, NSWhite, NSWhite, NSDarkGray,
|
CGFloat grays[] = {NSDarkGray, NSWhite, NSWhite, NSDarkGray,
|
||||||
NSDarkGray, NSLightGray, NSLightGray, NSDarkGray};
|
NSDarkGray, NSLightGray, NSLightGray, NSDarkGray};
|
||||||
NSRect rect;
|
NSRect rect;
|
||||||
NSGraphicsContext *ctxt = GSCurrentContext();
|
NSGraphicsContext *ctxt = GSCurrentContext();
|
||||||
|
|
||||||
|
@ -887,8 +887,8 @@ NSDrawDarkBezel(NSRect aRect, NSRect clipRect)
|
||||||
NSMaxXEdge, NSMaxYEdge, NSMinXEdge, NSMinYEdge};
|
NSMaxXEdge, NSMaxYEdge, NSMinXEdge, NSMinYEdge};
|
||||||
// FIXME: The actual colour used for the 3 + 4 line
|
// FIXME: The actual colour used for the 3 + 4 line
|
||||||
// (and the two additional points) is a bit darker.
|
// (and the two additional points) is a bit darker.
|
||||||
float grays[] = {NSWhite, NSWhite, NSLightGray, NSLightGray,
|
CGFloat grays[] = {NSWhite, NSWhite, NSLightGray, NSLightGray,
|
||||||
NSLightGray, NSLightGray, NSBlack, NSBlack};
|
NSLightGray, NSLightGray, NSBlack, NSBlack};
|
||||||
NSRect rect;
|
NSRect rect;
|
||||||
NSGraphicsContext *ctxt = GSCurrentContext();
|
NSGraphicsContext *ctxt = GSCurrentContext();
|
||||||
DPSgsave(ctxt);
|
DPSgsave(ctxt);
|
||||||
|
@ -925,8 +925,8 @@ NSDrawLightBezel(NSRect aRect, NSRect clipRect)
|
||||||
NSMaxXEdge, NSMinYEdge, NSMinXEdge, NSMaxYEdge};
|
NSMaxXEdge, NSMinYEdge, NSMinXEdge, NSMaxYEdge};
|
||||||
NSRectEdge down_sides[] = {NSMaxXEdge, NSMaxYEdge, NSMinXEdge, NSMinYEdge,
|
NSRectEdge down_sides[] = {NSMaxXEdge, NSMaxYEdge, NSMinXEdge, NSMinYEdge,
|
||||||
NSMaxXEdge, NSMaxYEdge, NSMinXEdge, NSMinYEdge};
|
NSMaxXEdge, NSMaxYEdge, NSMinXEdge, NSMinYEdge};
|
||||||
float grays[] = {NSWhite, NSWhite, NSGray, NSGray,
|
CGFloat grays[] = {NSWhite, NSWhite, NSGray, NSGray,
|
||||||
NSBlack, NSBlack, NSBlack, NSBlack};
|
NSBlack, NSBlack, NSBlack, NSBlack};
|
||||||
NSRect rect;
|
NSRect rect;
|
||||||
NSGraphicsContext *ctxt = GSCurrentContext();
|
NSGraphicsContext *ctxt = GSCurrentContext();
|
||||||
DPSgsave(ctxt);
|
DPSgsave(ctxt);
|
||||||
|
@ -965,9 +965,9 @@ NSDrawFramePhoto(const NSRect aRect, const NSRect clipRect)
|
||||||
NSRectEdge down_sides[] = {NSMaxXEdge, NSMaxYEdge,
|
NSRectEdge down_sides[] = {NSMaxXEdge, NSMaxYEdge,
|
||||||
NSMinXEdge, NSMinYEdge,
|
NSMinXEdge, NSMinYEdge,
|
||||||
NSMaxXEdge, NSMaxYEdge};
|
NSMaxXEdge, NSMaxYEdge};
|
||||||
float grays[] = {NSDarkGray, NSDarkGray,
|
CGFloat grays[] = {NSDarkGray, NSDarkGray,
|
||||||
NSDarkGray, NSDarkGray,
|
NSDarkGray, NSDarkGray,
|
||||||
NSBlack, NSBlack};
|
NSBlack, NSBlack};
|
||||||
|
|
||||||
NSRect rect;
|
NSRect rect;
|
||||||
NSGraphicsContext *ctxt = GSCurrentContext();
|
NSGraphicsContext *ctxt = GSCurrentContext();
|
||||||
|
@ -1000,7 +1000,7 @@ NSDrawWindowBackground(NSRect aRect)
|
||||||
DPSgrestore(ctxt);
|
DPSgrestore(ctxt);
|
||||||
}
|
}
|
||||||
|
|
||||||
float
|
CGFloat
|
||||||
NSLinkFrameThickness(void)
|
NSLinkFrameThickness(void)
|
||||||
{
|
{
|
||||||
return 1;
|
return 1;
|
||||||
|
@ -1035,8 +1035,8 @@ void
|
||||||
NSConvertGlobalToWindowNumber(int globalNum, unsigned int *winNum)
|
NSConvertGlobalToWindowNumber(int globalNum, unsigned int *winNum)
|
||||||
{
|
{
|
||||||
NSArray *windows = GSAllWindows();
|
NSArray *windows = GSAllWindows();
|
||||||
unsigned count = [windows count];
|
NSUInteger count = [windows count];
|
||||||
unsigned i;
|
NSUInteger i;
|
||||||
|
|
||||||
for (i = 0; i < count; i++)
|
for (i = 0; i < count; i++)
|
||||||
{
|
{
|
||||||
|
@ -1058,7 +1058,7 @@ NSConvertWindowNumberToGlobal(int winNum, unsigned int *globalNum)
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
NSCountWindowsForContext(int context, int *count)
|
NSCountWindowsForContext(NSInteger context, NSInteger *count)
|
||||||
{
|
{
|
||||||
// TODO
|
// TODO
|
||||||
*count = 0;
|
*count = 0;
|
||||||
|
@ -1071,7 +1071,7 @@ NSShowSystemInfoPanel(NSDictionary *options)
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
NSWindowListForContext(int context, int size, int **list)
|
NSWindowListForContext(NSInteger context, NSInteger size, NSInteger **list)
|
||||||
{
|
{
|
||||||
// TODO
|
// TODO
|
||||||
}
|
}
|
||||||
|
@ -1083,4 +1083,3 @@ NSGetWindowServerMemory(int context, int *virtualMemory,
|
||||||
// TODO
|
// TODO
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1359,7 +1359,7 @@ static NSDictionary *titleTextAttributes[3] = {nil, nil, nil};
|
||||||
{
|
{
|
||||||
static const NSRectEdge edges[4] = {NSMinXEdge, NSMaxYEdge,
|
static const NSRectEdge edges[4] = {NSMinXEdge, NSMaxYEdge,
|
||||||
NSMaxXEdge, NSMinYEdge};
|
NSMaxXEdge, NSMinYEdge};
|
||||||
float grays[3][4] =
|
CGFloat grays[3][4] =
|
||||||
{{NSLightGray, NSLightGray, NSDarkGray, NSDarkGray},
|
{{NSLightGray, NSLightGray, NSDarkGray, NSDarkGray},
|
||||||
{NSWhite, NSWhite, NSDarkGray, NSDarkGray},
|
{NSWhite, NSWhite, NSDarkGray, NSDarkGray},
|
||||||
{NSLightGray, NSLightGray, NSBlack, NSBlack}};
|
{NSLightGray, NSLightGray, NSBlack, NSBlack}};
|
||||||
|
|
|
@ -211,9 +211,9 @@
|
||||||
NSSize titleSize;
|
NSSize titleSize;
|
||||||
NSRectEdge top_left[] = {NSMinXEdge, NSMaxYEdge};
|
NSRectEdge top_left[] = {NSMinXEdge, NSMaxYEdge};
|
||||||
NSRectEdge bottom_right[] = {NSMaxXEdge, NSMinYEdge};
|
NSRectEdge bottom_right[] = {NSMaxXEdge, NSMinYEdge};
|
||||||
float blacks[] = {NSBlack, NSBlack};
|
CGFloat blacks[] = {NSBlack, NSBlack};
|
||||||
float grays[] = {NSLightGray, NSLightGray};
|
CGFloat grays[] = {NSLightGray, NSLightGray};
|
||||||
float darkGrays[] = {NSDarkGray, NSDarkGray};
|
CGFloat darkGrays[] = {NSDarkGray, NSDarkGray};
|
||||||
|
|
||||||
// Draw the dark gray upper left lines for menu and black for others.
|
// Draw the dark gray upper left lines for menu and black for others.
|
||||||
// Rectangle 1
|
// Rectangle 1
|
||||||
|
|
|
@ -571,7 +571,7 @@ static NSSize scaledIconSizeForSize(NSSize imageSize)
|
||||||
if ([NSApp isHidden])
|
if ([NSApp isHidden])
|
||||||
{
|
{
|
||||||
NSRectEdge mySides[] = {NSMinXEdge, NSMinYEdge, NSMaxXEdge, NSMaxYEdge};
|
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);
|
NSDrawTiledRects(NSMakeRect(4, 4, 3, 2), rect, mySides, myGrays, 4);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -502,7 +502,7 @@ static NSColor *dtxtCol;
|
||||||
id="NSCellAttribute">NSCellAttribute</ref></p>
|
id="NSCellAttribute">NSCellAttribute</ref></p>
|
||||||
<p>See Also: -setCellAttribute:to:</p>
|
<p>See Also: -setCellAttribute:to:</p>
|
||||||
*/
|
*/
|
||||||
- (int) cellAttribute: (NSCellAttribute)aParameter
|
- (NSInteger) cellAttribute: (NSCellAttribute)aParameter
|
||||||
{
|
{
|
||||||
switch (aParameter)
|
switch (aParameter)
|
||||||
{
|
{
|
||||||
|
@ -551,7 +551,7 @@ static NSColor *dtxtCol;
|
||||||
/**<p>TODO</p>
|
/**<p>TODO</p>
|
||||||
*<p>See Also: -cellAttribute:</p>
|
*<p>See Also: -cellAttribute:</p>
|
||||||
*/
|
*/
|
||||||
- (void) setCellAttribute: (NSCellAttribute)aParameter to: (int)value
|
- (void) setCellAttribute: (NSCellAttribute)aParameter to: (NSInteger)value
|
||||||
{
|
{
|
||||||
switch (aParameter)
|
switch (aParameter)
|
||||||
{
|
{
|
||||||
|
@ -1172,9 +1172,9 @@ static NSColor *dtxtCol;
|
||||||
|
|
||||||
/**<p>TODO Explain</p>
|
/**<p>TODO Explain</p>
|
||||||
*/
|
*/
|
||||||
- (int) sendActionOn: (int)mask
|
- (NSInteger) sendActionOn: (NSInteger)mask
|
||||||
{
|
{
|
||||||
unsigned int previousMask = _action_mask;
|
NSUInteger previousMask = _action_mask;
|
||||||
|
|
||||||
_action_mask = mask;
|
_action_mask = mask;
|
||||||
|
|
||||||
|
@ -1239,15 +1239,15 @@ static NSColor *dtxtCol;
|
||||||
* Formatting Data
|
* Formatting Data
|
||||||
*/
|
*/
|
||||||
- (void) setFloatingPointFormat: (BOOL)autoRange
|
- (void) setFloatingPointFormat: (BOOL)autoRange
|
||||||
left: (unsigned int)leftDigits
|
left: (NSUInteger)leftDigits
|
||||||
right: (unsigned int)rightDigits
|
right: (NSUInteger)rightDigits
|
||||||
{
|
{
|
||||||
NSNumberFormatter *formatter = [[NSNumberFormatter alloc] init];
|
NSNumberFormatter *formatter = [[NSNumberFormatter alloc] init];
|
||||||
NSMutableString *format = [[NSMutableString alloc] init];
|
NSMutableString *format = [[NSMutableString alloc] init];
|
||||||
|
|
||||||
if (autoRange)
|
if (autoRange)
|
||||||
{
|
{
|
||||||
unsigned fieldWidth = leftDigits + rightDigits + 1;
|
NSUInteger fieldWidth = leftDigits + rightDigits + 1;
|
||||||
|
|
||||||
// FIXME: this does not fully match the documentation.
|
// FIXME: this does not fully match the documentation.
|
||||||
while (fieldWidth--)
|
while (fieldWidth--)
|
||||||
|
@ -1286,14 +1286,14 @@ static NSColor *dtxtCol;
|
||||||
|
|
||||||
/**<p> TODO</p>
|
/**<p> TODO</p>
|
||||||
*/
|
*/
|
||||||
- (int) entryType
|
- (NSInteger) entryType
|
||||||
{
|
{
|
||||||
return _cell.entry_type;
|
return _cell.entry_type;
|
||||||
}
|
}
|
||||||
|
|
||||||
/** <p>TODO</p>
|
/** <p>TODO</p>
|
||||||
*/
|
*/
|
||||||
- (void) setEntryType: (int)aType
|
- (void) setEntryType: (NSInteger)aType
|
||||||
{
|
{
|
||||||
[self setType: NSTextCellType];
|
[self setType: NSTextCellType];
|
||||||
// TODO: This should select a suitable formatter
|
// TODO: This should select a suitable formatter
|
||||||
|
@ -1384,7 +1384,7 @@ static NSColor *dtxtCol;
|
||||||
|
|
||||||
if (r.length > 0)
|
if (r.length > 0)
|
||||||
{
|
{
|
||||||
unsigned int location = r.location;
|
NSUInteger location = r.location;
|
||||||
|
|
||||||
|
|
||||||
[self setTitle: [[aString substringToIndex: location]
|
[self setTitle: [[aString substringToIndex: location]
|
||||||
|
@ -1579,7 +1579,7 @@ static NSColor *dtxtCol;
|
||||||
/**<p>Returns the mouse flags. This flags are usally sets in
|
/**<p>Returns the mouse flags. This flags are usally sets in
|
||||||
the -trackMouse:inRect:ofView:untilMouseUp: method</p>
|
the -trackMouse:inRect:ofView:untilMouseUp: method</p>
|
||||||
*/
|
*/
|
||||||
- (int) mouseDownFlags
|
- (NSInteger) mouseDownFlags
|
||||||
{
|
{
|
||||||
return _mouse_down_flags;
|
return _mouse_down_flags;
|
||||||
}
|
}
|
||||||
|
@ -1627,7 +1627,7 @@ static NSColor *dtxtCol;
|
||||||
untilMouseUp: (BOOL)flag
|
untilMouseUp: (BOOL)flag
|
||||||
{
|
{
|
||||||
NSApplication *theApp = [NSApplication sharedApplication];
|
NSApplication *theApp = [NSApplication sharedApplication];
|
||||||
unsigned event_mask = NSLeftMouseDownMask | NSLeftMouseUpMask
|
NSUInteger event_mask = NSLeftMouseDownMask | NSLeftMouseUpMask
|
||||||
| NSMouseMovedMask | NSLeftMouseDraggedMask | NSOtherMouseDraggedMask
|
| NSMouseMovedMask | NSLeftMouseDraggedMask | NSOtherMouseDraggedMask
|
||||||
| NSRightMouseDraggedMask;
|
| NSRightMouseDraggedMask;
|
||||||
NSPoint location = [theEvent locationInWindow];
|
NSPoint location = [theEvent locationInWindow];
|
||||||
|
@ -2293,8 +2293,8 @@ static NSColor *dtxtCol;
|
||||||
inView: (NSView*)controlView
|
inView: (NSView*)controlView
|
||||||
editor: (NSText*)textObject
|
editor: (NSText*)textObject
|
||||||
delegate: (id)anObject
|
delegate: (id)anObject
|
||||||
start: (int)selStart
|
start: (NSInteger)selStart
|
||||||
length: (int)selLength
|
length: (NSInteger)selLength
|
||||||
{
|
{
|
||||||
if (!controlView || !textObject || (_cell.type != NSTextCellType))
|
if (!controlView || !textObject || (_cell.type != NSTextCellType))
|
||||||
return;
|
return;
|
||||||
|
@ -2526,7 +2526,7 @@ static NSColor *dtxtCol;
|
||||||
if ([aDecoder containsValueForKey: @"NSCellFlags"])
|
if ([aDecoder containsValueForKey: @"NSCellFlags"])
|
||||||
{
|
{
|
||||||
unsigned long cFlags;
|
unsigned long cFlags;
|
||||||
unsigned long mask = 0;
|
NSUInteger mask = 0;
|
||||||
cFlags = [aDecoder decodeIntForKey: @"NSCellFlags"];
|
cFlags = [aDecoder decodeIntForKey: @"NSCellFlags"];
|
||||||
|
|
||||||
[self setFocusRingType: (cFlags & 0x3)];
|
[self setFocusRingType: (cFlags & 0x3)];
|
||||||
|
@ -2979,7 +2979,7 @@ static NSColor *dtxtCol;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
- (BOOL) _sendsActionOn:(int)eventTypeMask
|
- (BOOL) _sendsActionOn:(NSUInteger)eventTypeMask
|
||||||
{
|
{
|
||||||
return (_action_mask & eventTypeMask);
|
return (_action_mask & eventTypeMask);
|
||||||
}
|
}
|
||||||
|
|
|
@ -172,10 +172,10 @@ GSRemoveDragTypes(NSView* obj)
|
||||||
static NSArray*
|
static NSArray*
|
||||||
GSSetDragTypes(NSView* obj, NSArray *types)
|
GSSetDragTypes(NSView* obj, NSArray *types)
|
||||||
{
|
{
|
||||||
unsigned count = [types count];
|
NSUInteger count = [types count];
|
||||||
NSString *strings[count];
|
NSString *strings[count];
|
||||||
NSArray *t;
|
NSArray *t;
|
||||||
unsigned i;
|
NSUInteger i;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Make a new array with copies of the type strings so we don't get
|
* 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)
|
if (_coordinates_valid == YES)
|
||||||
{
|
{
|
||||||
unsigned count;
|
NSUInteger count;
|
||||||
|
|
||||||
_coordinates_valid = NO;
|
_coordinates_valid = NO;
|
||||||
if (_rFlags.valid_rects != 0)
|
if (_rFlags.valid_rects != 0)
|
||||||
|
@ -231,7 +231,7 @@ GSSetDragTypes(NSView* obj, NSArray *types)
|
||||||
if (count > 0)
|
if (count > 0)
|
||||||
{
|
{
|
||||||
NSView* array[count];
|
NSView* array[count];
|
||||||
unsigned i;
|
NSUInteger i;
|
||||||
|
|
||||||
[_sub_views getObjects: array];
|
[_sub_views getObjects: array];
|
||||||
for (i = 0; i < count; i++)
|
for (i = 0; i < count; i++)
|
||||||
|
@ -367,12 +367,12 @@ GSSetDragTypes(NSView* obj, NSArray *types)
|
||||||
[self viewDidMoveToWindow];
|
[self viewDidMoveToWindow];
|
||||||
if (_rFlags.has_subviews)
|
if (_rFlags.has_subviews)
|
||||||
{
|
{
|
||||||
unsigned count = [_sub_views count];
|
NSUInteger count = [_sub_views count];
|
||||||
|
|
||||||
if (count > 0)
|
if (count > 0)
|
||||||
{
|
{
|
||||||
unsigned i;
|
NSUInteger i;
|
||||||
NSView *array[count];
|
NSView *array[count];
|
||||||
|
|
||||||
[_sub_views getObjects: array];
|
[_sub_views getObjects: array];
|
||||||
for (i = 0; i < count; ++i)
|
for (i = 0; i < count; ++i)
|
||||||
|
@ -435,12 +435,12 @@ GSSetDragTypes(NSView* obj, NSArray *types)
|
||||||
|
|
||||||
if (_rFlags.has_subviews)
|
if (_rFlags.has_subviews)
|
||||||
{
|
{
|
||||||
unsigned count = [_sub_views count];
|
NSUInteger count = [_sub_views count];
|
||||||
|
|
||||||
if (count > 0)
|
if (count > 0)
|
||||||
{
|
{
|
||||||
unsigned i;
|
NSUInteger i;
|
||||||
NSView *array[count];
|
NSView *array[count];
|
||||||
|
|
||||||
[_sub_views getObjects: array];
|
[_sub_views getObjects: array];
|
||||||
for (i = 0; i < count; ++i)
|
for (i = 0; i < count; ++i)
|
||||||
|
@ -635,8 +635,8 @@ GSSetDragTypes(NSView* obj, NSArray *types)
|
||||||
|
|
||||||
- (void) dealloc
|
- (void) dealloc
|
||||||
{
|
{
|
||||||
NSView *tmp;
|
NSView *tmp;
|
||||||
unsigned count;
|
NSUInteger count;
|
||||||
|
|
||||||
// Remove all key value bindings for this view.
|
// Remove all key value bindings for this view.
|
||||||
[GSKeyValueBinding unbindAllForObject: self];
|
[GSKeyValueBinding unbindAllForObject: self];
|
||||||
|
@ -683,7 +683,7 @@ GSSetDragTypes(NSView* obj, NSArray *types)
|
||||||
tmp = GSIArrayItemAtIndex(pKV(self), count).obj;
|
tmp = GSIArrayItemAtIndex(pKV(self), count).obj;
|
||||||
if (tmp != nil && nKV(tmp) != 0)
|
if (tmp != nil && nKV(tmp) != 0)
|
||||||
{
|
{
|
||||||
unsigned otherCount = GSIArrayCount(nKV(tmp));
|
NSUInteger otherCount = GSIArrayCount(nKV(tmp));
|
||||||
|
|
||||||
while (otherCount-- > 1)
|
while (otherCount-- > 1)
|
||||||
{
|
{
|
||||||
|
@ -715,7 +715,7 @@ GSSetDragTypes(NSView* obj, NSArray *types)
|
||||||
tmp = GSIArrayItemAtIndex(nKV(self), count).obj;
|
tmp = GSIArrayItemAtIndex(nKV(self), count).obj;
|
||||||
if (tmp != nil && pKV(tmp) != 0)
|
if (tmp != nil && pKV(tmp) != 0)
|
||||||
{
|
{
|
||||||
unsigned otherCount = GSIArrayCount(pKV(tmp));
|
NSUInteger otherCount = GSIArrayCount(pKV(tmp));
|
||||||
|
|
||||||
while (otherCount-- > 1)
|
while (otherCount-- > 1)
|
||||||
{
|
{
|
||||||
|
@ -1017,7 +1017,7 @@ GSSetDragTypes(NSView* obj, NSArray *types)
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
unsigned index;
|
NSUInteger index;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Ok - the standard case - we remove the newView from wherever it
|
* Ok - the standard case - we remove the newView from wherever it
|
||||||
|
@ -1099,7 +1099,7 @@ GSSetDragTypes(NSView* obj, NSArray *types)
|
||||||
[self setNeedsDisplay: YES];
|
[self setNeedsDisplay: YES];
|
||||||
}
|
}
|
||||||
|
|
||||||
- (void) sortSubviewsUsingFunction: (int (*)(id ,id ,void*))compare
|
- (void) sortSubviewsUsingFunction: (NSComparisonResult (*)(id ,id ,void*))compare
|
||||||
context: (void*)context
|
context: (void*)context
|
||||||
{
|
{
|
||||||
[_sub_views sortUsingFunction: compare context: context];
|
[_sub_views sortUsingFunction: compare context: context];
|
||||||
|
@ -2067,7 +2067,7 @@ static void autoresize(CGFloat oldContainerSize,
|
||||||
- (void) _lockFocusInContext: (NSGraphicsContext *)ctxt inRect: (NSRect)rect
|
- (void) _lockFocusInContext: (NSGraphicsContext *)ctxt inRect: (NSRect)rect
|
||||||
{
|
{
|
||||||
NSRect wrect;
|
NSRect wrect;
|
||||||
int window_gstate = 0;
|
NSInteger window_gstate = 0;
|
||||||
|
|
||||||
if (viewIsPrinting == nil)
|
if (viewIsPrinting == nil)
|
||||||
{
|
{
|
||||||
|
@ -2294,7 +2294,7 @@ static void autoresize(CGFloat oldContainerSize,
|
||||||
FIXME: The above is what the OpenStep and Cocoa specification say, but
|
FIXME: The above is what the OpenStep and Cocoa specification say, but
|
||||||
gState is 0 unless allocateGState has been called.
|
gState is 0 unless allocateGState has been called.
|
||||||
*/
|
*/
|
||||||
- (int) gState
|
- (NSInteger) gState
|
||||||
{
|
{
|
||||||
if (_allocate_gstate && (!_gstate || _renew_gstate))
|
if (_allocate_gstate && (!_gstate || _renew_gstate))
|
||||||
{
|
{
|
||||||
|
@ -2576,12 +2576,12 @@ static void autoresize(CGFloat oldContainerSize,
|
||||||
*/
|
*/
|
||||||
if (_rFlags.has_subviews == YES)
|
if (_rFlags.has_subviews == YES)
|
||||||
{
|
{
|
||||||
unsigned count = [_sub_views count];
|
NSUInteger count = [_sub_views count];
|
||||||
|
|
||||||
if (count > 0)
|
if (count > 0)
|
||||||
{
|
{
|
||||||
NSView *array[count];
|
NSView *array[count];
|
||||||
unsigned i;
|
NSUInteger i;
|
||||||
|
|
||||||
[_sub_views getObjects: array];
|
[_sub_views getObjects: array];
|
||||||
|
|
||||||
|
@ -2673,7 +2673,7 @@ static void autoresize(CGFloat oldContainerSize,
|
||||||
- (BOOL) needsToDrawRect: (NSRect)aRect
|
- (BOOL) needsToDrawRect: (NSRect)aRect
|
||||||
{
|
{
|
||||||
const NSRect *rects;
|
const NSRect *rects;
|
||||||
int i, count;
|
NSInteger i, count;
|
||||||
|
|
||||||
[self getRectsBeingDrawn: &rects count: &count];
|
[self getRectsBeingDrawn: &rects count: &count];
|
||||||
for (i = 0; i < count; i++)
|
for (i = 0; i < count; i++)
|
||||||
|
@ -2684,7 +2684,7 @@ static void autoresize(CGFloat oldContainerSize,
|
||||||
return NO;
|
return NO;
|
||||||
}
|
}
|
||||||
|
|
||||||
- (void) getRectsBeingDrawn: (const NSRect **)rects count: (int *)count
|
- (void) getRectsBeingDrawn: (const NSRect **)rects count: (NSInteger *)count
|
||||||
{
|
{
|
||||||
// FIXME
|
// FIXME
|
||||||
static NSRect rect;
|
static NSRect rect;
|
||||||
|
@ -2987,7 +2987,7 @@ in the main thread.
|
||||||
return NO;
|
return NO;
|
||||||
}
|
}
|
||||||
|
|
||||||
- (void) getRectsExposedDuringLiveResize: (NSRect[4])exposedRects count: (int *)count
|
- (void) getRectsExposedDuringLiveResize: (NSRect[4])exposedRects count: (NSInteger *)count
|
||||||
{
|
{
|
||||||
// FIXME
|
// FIXME
|
||||||
if (count != NULL)
|
if (count != NULL)
|
||||||
|
@ -3195,7 +3195,7 @@ Returns YES iff any scrolling was done.
|
||||||
{
|
{
|
||||||
if (_rFlags.has_currects != 0)
|
if (_rFlags.has_currects != 0)
|
||||||
{
|
{
|
||||||
unsigned count = [_cursor_rects count];
|
NSUInteger count = [_cursor_rects count];
|
||||||
|
|
||||||
if (count > 0)
|
if (count > 0)
|
||||||
{
|
{
|
||||||
|
@ -3205,7 +3205,7 @@ Returns YES iff any scrolling was done.
|
||||||
if (_rFlags.valid_rects != 0)
|
if (_rFlags.valid_rects != 0)
|
||||||
{
|
{
|
||||||
NSPoint loc = _window->_lastPoint;
|
NSPoint loc = _window->_lastPoint;
|
||||||
unsigned i;
|
NSUInteger i;
|
||||||
|
|
||||||
for (i = 0; i < count; ++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;
|
NSUInteger i, count;
|
||||||
NSArray *sub = [view subviews];
|
NSArray *sub = [view subviews];
|
||||||
|
|
||||||
count = [sub count];
|
count = [sub count];
|
||||||
if (count > 0)
|
if (count > 0)
|
||||||
|
@ -3311,12 +3311,12 @@ static NSView* findByTag(NSView *view, int aTag, unsigned *level)
|
||||||
}
|
}
|
||||||
else if (_rFlags.has_subviews)
|
else if (_rFlags.has_subviews)
|
||||||
{
|
{
|
||||||
unsigned count = [_sub_views count];
|
NSUInteger count = [_sub_views count];
|
||||||
|
|
||||||
if (count > 0)
|
if (count > 0)
|
||||||
{
|
{
|
||||||
NSView *array[count];
|
NSView *array[count];
|
||||||
unsigned i;
|
NSUInteger i;
|
||||||
|
|
||||||
[_sub_views getObjects: array];
|
[_sub_views getObjects: array];
|
||||||
|
|
||||||
|
@ -3336,17 +3336,17 @@ static NSView* findByTag(NSView *view, int aTag, unsigned *level)
|
||||||
|
|
||||||
if (view == nil)
|
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
|
* our descendents and see which has the closest view matching
|
||||||
* the tag.
|
* the tag.
|
||||||
*/
|
*/
|
||||||
for (i = 0; i < count; i++)
|
for (i = 0; i < count; i++)
|
||||||
{
|
{
|
||||||
unsigned l = 0;
|
NSUInteger l = 0;
|
||||||
NSView *v;
|
NSView *v;
|
||||||
|
|
||||||
v = findByTag(array[i], aTag, &l);
|
v = findByTag(array[i], aTag, &l);
|
||||||
|
|
||||||
|
@ -3383,7 +3383,6 @@ static NSView* findByTag(NSView *view, int aTag, unsigned *level)
|
||||||
- (NSView*) hitTest: (NSPoint)aPoint
|
- (NSView*) hitTest: (NSPoint)aPoint
|
||||||
{
|
{
|
||||||
NSPoint p;
|
NSPoint p;
|
||||||
unsigned count;
|
|
||||||
NSView *v = nil, *w;
|
NSView *v = nil, *w;
|
||||||
|
|
||||||
/* If not within our frame then it can't be a hit.
|
/* 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)
|
if (_rFlags.has_subviews)
|
||||||
{
|
{
|
||||||
|
NSUInteger count;
|
||||||
|
|
||||||
count = [_sub_views count];
|
count = [_sub_views count];
|
||||||
if (count > 0)
|
if (count > 0)
|
||||||
{
|
{
|
||||||
NSView *array[count];
|
NSView *array[count];
|
||||||
|
|
||||||
[_sub_views getObjects: array];
|
[_sub_views getObjects: array];
|
||||||
|
|
||||||
|
@ -3451,7 +3452,7 @@ static NSView* findByTag(NSView *view, int aTag, unsigned *level)
|
||||||
|
|
||||||
- (BOOL) performKeyEquivalent: (NSEvent*)theEvent
|
- (BOOL) performKeyEquivalent: (NSEvent*)theEvent
|
||||||
{
|
{
|
||||||
unsigned i;
|
NSUInteger i;
|
||||||
|
|
||||||
for (i = 0; i < [_sub_views count]; i++)
|
for (i = 0; i < [_sub_views count]; i++)
|
||||||
if ([[_sub_views objectAtIndex: i] performKeyEquivalent: theEvent] == YES)
|
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
|
- (BOOL) performMnemonic: (NSString *)aString
|
||||||
{
|
{
|
||||||
unsigned i;
|
NSUInteger i;
|
||||||
|
|
||||||
for (i = 0; i < [_sub_views count]; i++)
|
for (i = 0; i < [_sub_views count]; i++)
|
||||||
if ([[_sub_views objectAtIndex: i] performMnemonic: aString] == YES)
|
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
|
- (void) removeTrackingRect: (NSTrackingRectTag)tag
|
||||||
{
|
{
|
||||||
unsigned i, j;
|
NSUInteger i, j;
|
||||||
GSTrackingRect *m;
|
GSTrackingRect *m;
|
||||||
|
|
||||||
j = [_tracking_rects count];
|
j = [_tracking_rects count];
|
||||||
|
@ -3507,7 +3508,7 @@ static NSView* findByTag(NSView *view, int aTag, unsigned *level)
|
||||||
assumeInside: (BOOL)flag
|
assumeInside: (BOOL)flag
|
||||||
{
|
{
|
||||||
NSTrackingRectTag t;
|
NSTrackingRectTag t;
|
||||||
unsigned i, j;
|
NSUInteger i, j;
|
||||||
GSTrackingRect *m;
|
GSTrackingRect *m;
|
||||||
|
|
||||||
t = 0;
|
t = 0;
|
||||||
|
@ -3584,7 +3585,7 @@ static NSView* findByTag(NSView *view, int aTag, unsigned *level)
|
||||||
- (void) setNextKeyView: (NSView *)aView
|
- (void) setNextKeyView: (NSView *)aView
|
||||||
{
|
{
|
||||||
NSView *tmp;
|
NSView *tmp;
|
||||||
unsigned count;
|
NSUInteger count;
|
||||||
|
|
||||||
if (aView != nil && [aView isKindOfClass: viewClass] == NO)
|
if (aView != nil && [aView isKindOfClass: viewClass] == NO)
|
||||||
{
|
{
|
||||||
|
@ -4183,7 +4184,7 @@ static NSView* findByTag(NSView *view, int aTag, unsigned *level)
|
||||||
return location;
|
return location;
|
||||||
}
|
}
|
||||||
|
|
||||||
- (NSRect) rectForPage: (int)page
|
- (NSRect) rectForPage: (NSInteger)page
|
||||||
{
|
{
|
||||||
return NSZeroRect;
|
return NSZeroRect;
|
||||||
}
|
}
|
||||||
|
@ -4529,7 +4530,7 @@ static NSView* findByTag(NSView *view, int aTag, unsigned *level)
|
||||||
{
|
{
|
||||||
if ([aCoder allowsKeyedCoding])
|
if ([aCoder allowsKeyedCoding])
|
||||||
{
|
{
|
||||||
int vFlags = 0;
|
NSUInteger vFlags = 0;
|
||||||
|
|
||||||
// encoding
|
// encoding
|
||||||
[aCoder encodeConditionalObject: [self nextKeyView]
|
[aCoder encodeConditionalObject: [self nextKeyView]
|
||||||
|
@ -4664,7 +4665,7 @@ static NSView* findByTag(NSView *view, int aTag, unsigned *level)
|
||||||
}
|
}
|
||||||
if ([aDecoder containsValueForKey: @"NSvFlags"])
|
if ([aDecoder containsValueForKey: @"NSvFlags"])
|
||||||
{
|
{
|
||||||
int vFlags = [aDecoder decodeIntForKey: @"NSvFlags"];
|
NSUInteger vFlags = [aDecoder decodeIntForKey: @"NSvFlags"];
|
||||||
|
|
||||||
// We are lucky here, Apple use the same constants
|
// We are lucky here, Apple use the same constants
|
||||||
// in the lower bits of the flags
|
// in the lower bits of the flags
|
||||||
|
@ -4770,7 +4771,7 @@ static NSView* findByTag(NSView *view, int aTag, unsigned *level)
|
||||||
_autoresizes_subviews = flag;
|
_autoresizes_subviews = flag;
|
||||||
}
|
}
|
||||||
|
|
||||||
- (void) setAutoresizingMask: (unsigned int)mask
|
- (void) setAutoresizingMask: (NSUInteger)mask
|
||||||
{
|
{
|
||||||
_autoresizingMask = mask;
|
_autoresizingMask = mask;
|
||||||
}
|
}
|
||||||
|
@ -4786,7 +4787,7 @@ static NSView* findByTag(NSView *view, int aTag, unsigned *level)
|
||||||
return _autoresizes_subviews;
|
return _autoresizes_subviews;
|
||||||
}
|
}
|
||||||
|
|
||||||
- (unsigned int) autoresizingMask
|
- (NSUInteger) autoresizingMask
|
||||||
{
|
{
|
||||||
return _autoresizingMask;
|
return _autoresizingMask;
|
||||||
}
|
}
|
||||||
|
@ -5057,7 +5058,7 @@ static NSView* findByTag(NSView *view, int aTag, unsigned *level)
|
||||||
|
|
||||||
@implementation NSView(KeyViewLoop)
|
@implementation NSView(KeyViewLoop)
|
||||||
|
|
||||||
static int
|
static NSComparisonResult
|
||||||
cmpFrame(id view1, id view2, void *context)
|
cmpFrame(id view1, id view2, void *context)
|
||||||
{
|
{
|
||||||
BOOL flippedSuperView = [(NSView *)context isFlipped];
|
BOOL flippedSuperView = [(NSView *)context isFlipped];
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue