More CGFloat, NSUInteger and NSInteger changes.

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@36163 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
fredkiefer 2013-02-17 22:44:47 +00:00
parent 6880e50086
commit 8793a644bd
20 changed files with 211 additions and 182 deletions

View file

@ -1,3 +1,26 @@
2013-02-17 Fred Kiefer <FredKiefer@gmx.de>
* Headers/AppKit/NSScrollView.h
* Headers/AppKit/NSScroller.h
* Headers/AppKit/NSSlider.h
* Headers/AppKit/NSSliderCell.h
* Headers/AppKit/NSTableColumn.h
* Headers/AppKit/NSTableHeaderView.h
* Headers/AppKit/NSTableView.h
* Headers/AppKit/NSTextContainer.h
* Headers/AppKit/NSTextTable.h
* Source/NSScrollView.m
* Source/NSScroller.m
* Source/NSSlider.m
* Source/NSSliderCell.m
* Source/NSTableColumn.m
* Source/NSTableHeaderView.m
* Source/NSTableView.m
* Source/NSTextBlock.m
* Source/NSTextContainer.m
* Source/NSTextTable.m
More CGFloat, NSUInteger and NSInteger changes.
2013-02-17 Fred Kiefer <FredKiefer@gmx.de> 2013-02-17 Fred Kiefer <FredKiefer@gmx.de>
* Headers/AppKit/NSGraphicsContext.h * Headers/AppKit/NSGraphicsContext.h

View file

@ -119,21 +119,21 @@
- (BOOL)rulersVisible; - (BOOL)rulersVisible;
/* Setting scrolling behavior */ /* Setting scrolling behavior */
- (void)setLineScroll:(float)aFloat; - (void)setLineScroll:(CGFloat)aFloat;
- (float)lineScroll; - (CGFloat)lineScroll;
- (void)setPageScroll:(float)aFloat; - (void)setPageScroll:(CGFloat)aFloat;
- (float)pageScroll; - (CGFloat)pageScroll;
- (void)setScrollsDynamically:(BOOL)flag; - (void)setScrollsDynamically:(BOOL)flag;
- (BOOL)scrollsDynamically; - (BOOL)scrollsDynamically;
#if OS_API_VERSION(GS_API_MACOSX, GS_API_LATEST) #if OS_API_VERSION(GS_API_MACOSX, GS_API_LATEST)
- (float) horizontalLineScroll; - (CGFloat) horizontalLineScroll;
- (float) horizontalPageScroll; - (CGFloat) horizontalPageScroll;
- (float) verticalLineScroll; - (CGFloat) verticalLineScroll;
- (float) verticalPageScroll; - (CGFloat) verticalPageScroll;
- (void) setHorizontalLineScroll: (float)aFloat; - (void) setHorizontalLineScroll: (CGFloat)aFloat;
- (void) setHorizontalPageScroll: (float)aFloat; - (void) setHorizontalPageScroll: (CGFloat)aFloat;
- (void) setVerticalLineScroll: (float)aFloat; - (void) setVerticalLineScroll: (CGFloat)aFloat;
- (void) setVerticalPageScroll: (float)aFloat; - (void) setVerticalPageScroll: (CGFloat)aFloat;
/* Setting the background drawing */ /* Setting the background drawing */
- (void)setDrawsBackground:(BOOL)flag; - (void)setDrawsBackground:(BOOL)flag;
- (BOOL)drawsBackground; - (BOOL)drawsBackground;

View file

@ -37,16 +37,17 @@
@class NSEvent; @class NSEvent;
typedef enum _NSScrollArrowPosition { enum _NSScrollArrowPosition {
#if OS_API_VERSION(MAC_OS_X_VERSION_10_1, GS_API_LATEST) #if OS_API_VERSION(MAC_OS_X_VERSION_10_1, GS_API_LATEST)
NSScrollerArrowsDefaultSetting = 0, NSScrollerArrowsDefaultSetting = 0,
#endif #endif
NSScrollerArrowsMaxEnd = 0, NSScrollerArrowsMaxEnd = 0,
NSScrollerArrowsMinEnd, NSScrollerArrowsMinEnd,
NSScrollerArrowsNone NSScrollerArrowsNone
} NSScrollArrowPosition; };
typedef NSUInteger NSScrollArrowPosition;
typedef enum _NSScrollerPart { enum _NSScrollerPart {
NSScrollerNoPart = 0, NSScrollerNoPart = 0,
NSScrollerDecrementPage, NSScrollerDecrementPage,
NSScrollerKnob, NSScrollerKnob,
@ -54,18 +55,21 @@ typedef enum _NSScrollerPart {
NSScrollerDecrementLine, NSScrollerDecrementLine,
NSScrollerIncrementLine, NSScrollerIncrementLine,
NSScrollerKnobSlot NSScrollerKnobSlot
} NSScrollerPart; };
typedef NSUInteger NSScrollerPart;
typedef enum _NSScrollerUsablePart { enum _NSScrollerUsablePart {
NSNoScrollerParts = 0, NSNoScrollerParts = 0,
NSOnlyScrollerArrows, NSOnlyScrollerArrows,
NSAllScrollerParts NSAllScrollerParts
} NSUsableScrollerParts; };
typedef NSUInteger NSUsableScrollerParts;
typedef enum _NSScrollerArrow { enum _NSScrollerArrow {
NSScrollerIncrementArrow = 0, NSScrollerIncrementArrow = 0,
NSScrollerDecrementArrow NSScrollerDecrementArrow
} NSScrollerArrow; };
typedef NSUInteger NSScrollerArrow;
@interface NSScroller : NSControl <NSCoding> @interface NSScroller : NSControl <NSCoding>
{ {

View file

@ -42,11 +42,11 @@
// appearance // appearance
- (double) altIncrementValue; - (double) altIncrementValue;
- (NSImage*) image; - (NSImage*) image;
- (int) isVertical; - (NSInteger) isVertical;
- (float) knobThickness; - (CGFloat) knobThickness;
- (void) setAltIncrementValue: (double)increment; - (void) setAltIncrementValue: (double)increment;
- (void) setImage: (NSImage*)backgroundImage; - (void) setImage: (NSImage*)backgroundImage;
- (void) setKnobThickness: (float)aFloat; - (void) setKnobThickness: (CGFloat)aFloat;
// title // title
- (NSString*) title; - (NSString*) title;

View file

@ -79,8 +79,8 @@ typedef enum _NSSliderType
- (void) drawKnob: (NSRect)knobRect; - (void) drawKnob: (NSRect)knobRect;
/* Asking about the cell's appearance */ /* Asking about the cell's appearance */
- (float) knobThickness; - (CGFloat) knobThickness;
- (int) isVertical; - (NSInteger) isVertical;
- (NSString*) title; - (NSString*) title;
- (id) titleCell; - (id) titleCell;
- (NSColor*) titleColor; - (NSColor*) titleColor;
@ -88,7 +88,7 @@ typedef enum _NSSliderType
- (NSSliderType) sliderType; - (NSSliderType) sliderType;
/* Changing the cell's appearance */ /* Changing the cell's appearance */
- (void) setKnobThickness: (float)thickness; - (void) setKnobThickness: (CGFloat)thickness;
- (void) setTitle: (NSString*)title; - (void) setTitle: (NSString*)title;
- (void) setTitleCell: (NSCell*)aCell; - (void) setTitleCell: (NSCell*)aCell;
- (void) setTitleColor: (NSColor*)color; - (void) setTitleColor: (NSColor*)color;

View file

@ -89,12 +89,12 @@ enum {
/* /*
* Controlling size & visibility * Controlling size & visibility
*/ */
- (void) setWidth: (float)newWidth; - (void) setWidth: (CGFloat)newWidth;
- (float) width; - (CGFloat) width;
- (void) setMinWidth: (float)minWidth; - (void) setMinWidth: (CGFloat)minWidth;
- (float) minWidth; - (CGFloat) minWidth;
- (void) setMaxWidth: (float)maxWidth; - (void) setMaxWidth: (CGFloat)maxWidth;
- (float) maxWidth; - (CGFloat) maxWidth;
- (void) setResizable: (BOOL)flag; - (void) setResizable: (BOOL)flag;
- (BOOL) isResizable; - (BOOL) isResizable;
#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)
@ -122,7 +122,7 @@ enum {
#endif #endif
- (void) setDataCell: (NSCell *)aCell; - (void) setDataCell: (NSCell *)aCell;
- (NSCell *) dataCell; - (NSCell *) dataCell;
- (NSCell *) dataCellForRow: (int)row; - (NSCell *) dataCellForRow: (NSInteger)row;
/* /*
* Sorting * Sorting
*/ */

View file

@ -49,13 +49,13 @@
/* /*
* Checking altered columns * Checking altered columns
*/ */
- (int) draggedColumn; - (NSInteger) draggedColumn;
- (float) draggedDistance; - (CGFloat) draggedDistance;
- (int) resizedColumn; - (NSInteger) resizedColumn;
/* /*
* Utility methods * Utility methods
*/ */
- (int) columnAtPoint: (NSPoint)aPoint; - (NSInteger) columnAtPoint: (NSPoint)aPoint;
- (NSRect) headerRectOfColumn: (int)columnIndex; - (NSRect) headerRectOfColumn: (NSInteger)columnIndex;
@end @end
#endif #endif

View file

@ -178,8 +178,8 @@ typedef enum _NSTableViewColumnAutoresizingStyle
/* Drawing Attributes */ /* Drawing Attributes */
- (void) setIntercellSpacing: (NSSize)aSize; - (void) setIntercellSpacing: (NSSize)aSize;
- (NSSize) intercellSpacing; - (NSSize) intercellSpacing;
- (void) setRowHeight: (float)rowHeight; - (void) setRowHeight: (CGFloat)rowHeight;
- (float) rowHeight; - (CGFloat) rowHeight;
- (void) setBackgroundColor: (NSColor *)aColor; - (void) setBackgroundColor: (NSColor *)aColor;
- (NSColor *) backgroundColor; - (NSColor *) backgroundColor;
#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)
@ -434,8 +434,8 @@ dataCellForTableColumn: (NSTableColumn *)aTableColumn
- (void) tableViewSelectionDidChange: (NSNotification *)aNotification; - (void) tableViewSelectionDidChange: (NSNotification *)aNotification;
- (void) tableViewSelectionIsChanging: (NSNotification *)aNotification; - (void) tableViewSelectionIsChanging: (NSNotification *)aNotification;
#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)
- (float) tableView: (NSTableView *)tableView - (CGFloat) tableView: (NSTableView *)tableView
heightOfRow: (NSInteger)row; heightOfRow: (NSInteger)row;
- (NSString *) tableView: (NSTableView *)tableView - (NSString *) tableView: (NSTableView *)tableView
toolTipForCell: (NSCell *)cell toolTipForCell: (NSCell *)cell
rect: (NSRect *)rect rect: (NSRect *)rect

View file

@ -97,7 +97,7 @@ typedef NSUInteger NSLineMovementDirection;
id _textView; id _textView;
NSRect _containerRect; NSRect _containerRect;
float _lineFragmentPadding; CGFloat _lineFragmentPadding;
BOOL _observingFrameChanges; BOOL _observingFrameChanges;
BOOL _widthTracksTextView; BOOL _widthTracksTextView;
@ -260,8 +260,8 @@ Line fragment padding<br />
The line fragment padding is an amount of space left empty at each end of The line fragment padding is an amount of space left empty at each end of
a line fragment rectangle by the standard typesetter. The default is 0.0. a line fragment rectangle by the standard typesetter. The default is 0.0.
*/ */
- (void) setLineFragmentPadding: (float)aFloat; - (void) setLineFragmentPadding: (CGFloat)aFloat;
- (float) lineFragmentPadding; - (CGFloat) lineFragmentPadding;
@end @end

View file

@ -72,14 +72,14 @@ typedef enum _NSTextBlockVerticalAlignment
@interface NSTextBlock : NSObject <NSCoding, NSCopying> @interface NSTextBlock : NSObject <NSCoding, NSCopying>
{ {
NSColor *_backgroundColor; NSColor *_backgroundColor;
NSColor *_borderColorForEdge[NSMaxYEdge + 1]; NSColor *_borderColorForEdge[NSMaxYEdge + 1];
NSTextBlockVerticalAlignment _verticalAlignment; NSTextBlockVerticalAlignment _verticalAlignment;
// The following ivars come in pairs // The following ivars come in pairs
float _value[NSTextBlockMaximumHeight + 1]; CGFloat _value[NSTextBlockMaximumHeight + 1];
NSTextBlockValueType _valueType[NSTextBlockMaximumHeight + 1]; NSTextBlockValueType _valueType[NSTextBlockMaximumHeight + 1];
float _width[NSTextBlockMargin + 1][NSMaxYEdge + 1]; CGFloat _width[NSTextBlockMargin + 1][NSMaxYEdge + 1];
NSTextBlockValueType _widthType[NSTextBlockMargin + 1][NSMaxYEdge + 1]; NSTextBlockValueType _widthType[NSTextBlockMargin + 1][NSMaxYEdge + 1];
} }
- (NSColor *) backgroundColor; - (NSColor *) backgroundColor;
@ -88,7 +88,7 @@ typedef enum _NSTextBlockVerticalAlignment
inRect: (NSRect)rect inRect: (NSRect)rect
textContainer: (NSTextContainer *)container textContainer: (NSTextContainer *)container
characterRange: (NSRange)range; characterRange: (NSRange)range;
- (float) contentWidth; - (CGFloat) contentWidth;
- (NSTextBlockValueType) contentWidthValueType; - (NSTextBlockValueType) contentWidthValueType;
- (void) drawBackgroundWithFrame: (NSRect)rect - (void) drawBackgroundWithFrame: (NSRect)rect
inView: (NSView *)view inView: (NSView *)view
@ -102,22 +102,22 @@ typedef enum _NSTextBlockVerticalAlignment
- (void) setBackgroundColor: (NSColor *)color; - (void) setBackgroundColor: (NSColor *)color;
- (void) setBorderColor: (NSColor *)color; - (void) setBorderColor: (NSColor *)color;
- (void) setBorderColor: (NSColor *)color forEdge: (NSRectEdge)edge; - (void) setBorderColor: (NSColor *)color forEdge: (NSRectEdge)edge;
- (void) setContentWidth: (float)val type: (NSTextBlockValueType)type; - (void) setContentWidth: (CGFloat)val type: (NSTextBlockValueType)type;
- (void) setValue: (float)val - (void) setValue: (CGFloat)val
type: (NSTextBlockValueType)type type: (NSTextBlockValueType)type
forDimension: (NSTextBlockDimension)dimension; forDimension: (NSTextBlockDimension)dimension;
- (void) setVerticalAlignment: (NSTextBlockVerticalAlignment)alignment; - (void) setVerticalAlignment: (NSTextBlockVerticalAlignment)alignment;
- (void) setWidth: (float)val - (void) setWidth: (CGFloat)val
type: (NSTextBlockValueType)type type: (NSTextBlockValueType)type
forLayer: (NSTextBlockLayer)layer; forLayer: (NSTextBlockLayer)layer;
- (void) setWidth: (float)val - (void) setWidth: (CGFloat)val
type: (NSTextBlockValueType)type type: (NSTextBlockValueType)type
forLayer: (NSTextBlockLayer)layer forLayer: (NSTextBlockLayer)layer
edge: (NSRectEdge)edge; edge: (NSRectEdge)edge;
- (float) valueForDimension: (NSTextBlockDimension)dimension; - (CGFloat) valueForDimension: (NSTextBlockDimension)dimension;
- (NSTextBlockValueType) valueTypeForDimension: (NSTextBlockDimension)dimension; - (NSTextBlockValueType) valueTypeForDimension: (NSTextBlockDimension)dimension;
- (NSTextBlockVerticalAlignment) verticalAlignment; - (NSTextBlockVerticalAlignment) verticalAlignment;
- (float) widthForLayer: (NSTextBlockLayer)layer edge: (NSRectEdge)edge; - (CGFloat) widthForLayer: (NSTextBlockLayer)layer edge: (NSRectEdge)edge;
- (NSTextBlockValueType) widthValueTypeForLayer: (NSTextBlockLayer)layer - (NSTextBlockValueType) widthValueTypeForLayer: (NSTextBlockLayer)layer
edge: (NSRectEdge)edge; edge: (NSRectEdge)edge;
@end @end
@ -129,10 +129,10 @@ typedef enum _NSTextTableLayoutAlgorithm {
@interface NSTextTable : NSTextBlock @interface NSTextTable : NSTextBlock
{ {
NSTextTableLayoutAlgorithm _layoutAlgorithm; NSTextTableLayoutAlgorithm _layoutAlgorithm;
unsigned int _numberOfColumns; NSUInteger _numberOfColumns;
BOOL _collapsesBorders; BOOL _collapsesBorders;
BOOL _hidesEmptyCells; BOOL _hidesEmptyCells;
} }
- (NSRect) boundsRectForBlock: (NSTextTableBlock *)block - (NSRect) boundsRectForBlock: (NSTextTableBlock *)block
@ -148,7 +148,7 @@ typedef enum _NSTextTableLayoutAlgorithm {
layoutManager: (NSLayoutManager *)manager; layoutManager: (NSLayoutManager *)manager;
- (BOOL) hidesEmptyCells; - (BOOL) hidesEmptyCells;
- (NSTextTableLayoutAlgorithm) layoutAlgorithm; - (NSTextTableLayoutAlgorithm) layoutAlgorithm;
- (unsigned int) numberOfColumns; - (NSUInteger) numberOfColumns;
- (NSRect) rectForBlock: (NSTextTableBlock *)block - (NSRect) rectForBlock: (NSTextTableBlock *)block
layoutAtPoint: (NSPoint)start layoutAtPoint: (NSPoint)start
inRect: (NSRect)rect inRect: (NSRect)rect
@ -157,17 +157,17 @@ typedef enum _NSTextTableLayoutAlgorithm {
- (void) setCollapsesBorders: (BOOL)flag; - (void) setCollapsesBorders: (BOOL)flag;
- (void) setHidesEmptyCells: (BOOL)flag; - (void) setHidesEmptyCells: (BOOL)flag;
- (void) setLayoutAlgorithm: (NSTextTableLayoutAlgorithm)algorithm; - (void) setLayoutAlgorithm: (NSTextTableLayoutAlgorithm)algorithm;
- (void) setNumberOfColumns: (unsigned int)numCols; - (void) setNumberOfColumns: (NSUInteger)numCols;
@end @end
@interface NSTextTableBlock : NSTextBlock @interface NSTextTableBlock : NSTextBlock
{ {
NSTextTable *_table; NSTextTable *_table;
int _row; int _row;
int _rowSpan; int _rowSpan;
int _col; int _col;
int _colSpan; int _colSpan;
} }
- (id) initWithTable: (NSTextTable *)table - (id) initWithTable: (NSTextTable *)table

View file

@ -114,7 +114,7 @@ typedef struct _scrollViewFlags
* Class variables * Class variables
*/ */
static Class rulerViewClass = nil; static Class rulerViewClass = nil;
static float scrollerWidth; static CGFloat scrollerWidth;
/* /*
* Class methods * Class methods
@ -146,7 +146,7 @@ static float scrollerWidth;
{ {
NSSize size = frameSize; NSSize size = frameSize;
NSSize border = [[GSTheme theme] sizeForBorderType: borderType]; NSSize border = [[GSTheme theme] sizeForBorderType: borderType];
float innerBorderWidth = [[NSUserDefaults standardUserDefaults] CGFloat innerBorderWidth = [[NSUserDefaults standardUserDefaults]
boolForKey: @"GSScrollViewNoInnerBorder"] ? 0.0 : 1.0; boolForKey: @"GSScrollViewNoInnerBorder"] ? 0.0 : 1.0;
/* /*
@ -176,7 +176,7 @@ static float scrollerWidth;
{ {
NSSize size = contentSize; NSSize size = contentSize;
NSSize border = [[GSTheme theme] sizeForBorderType: borderType]; NSSize border = [[GSTheme theme] sizeForBorderType: borderType];
float innerBorderWidth = [[NSUserDefaults standardUserDefaults] CGFloat innerBorderWidth = [[NSUserDefaults standardUserDefaults]
boolForKey: @"GSScrollViewNoInnerBorder"] ? 0.0 : 1.0; boolForKey: @"GSScrollViewNoInnerBorder"] ? 0.0 : 1.0;
/* /*
@ -401,9 +401,9 @@ static float scrollerWidth;
- (void) scrollWheel: (NSEvent *)theEvent - (void) scrollWheel: (NSEvent *)theEvent
{ {
NSRect clipViewBounds; NSRect clipViewBounds;
float deltaY = [theEvent deltaY]; CGFloat deltaY = [theEvent deltaY];
float deltaX = [theEvent deltaX]; CGFloat deltaX = [theEvent deltaX];
float amount; CGFloat amount;
NSPoint point; NSPoint point;
if (_contentView == nil) if (_contentView == nil)
@ -500,7 +500,7 @@ static float scrollerWidth;
{ {
NSRect clipViewBounds; NSRect clipViewBounds;
NSPoint point; NSPoint point;
float amount; CGFloat amount;
if (_contentView == nil) if (_contentView == nil)
{ {
@ -528,7 +528,7 @@ static float scrollerWidth;
{ {
NSRect clipViewBounds; NSRect clipViewBounds;
NSPoint point; NSPoint point;
float amount; CGFloat amount;
if (_contentView == nil) if (_contentView == nil)
{ {
@ -563,7 +563,7 @@ static float scrollerWidth;
{ {
NSRect clipViewBounds; NSRect clipViewBounds;
NSPoint point; NSPoint point;
float amount; CGFloat amount;
if (_contentView == nil) if (_contentView == nil)
{ {
@ -607,7 +607,7 @@ static float scrollerWidth;
{ {
NSRect clipViewBounds; NSRect clipViewBounds;
NSPoint point; NSPoint point;
float amount; CGFloat amount;
if (_contentView == nil) if (_contentView == nil)
{ {
@ -641,7 +641,7 @@ static float scrollerWidth;
NSScrollerPart hitPart = [scroller hitPart]; NSScrollerPart hitPart = [scroller hitPart];
NSRect clipViewBounds; NSRect clipViewBounds;
NSRect documentRect; NSRect documentRect;
float amount = 0; CGFloat amount = 0;
NSPoint point; NSPoint point;
if (_contentView == nil) if (_contentView == nil)
@ -808,7 +808,7 @@ static float scrollerWidth;
NSRect documentFrame = NSZeroRect; NSRect documentFrame = NSZeroRect;
NSRect clipViewBounds = NSZeroRect; NSRect clipViewBounds = NSZeroRect;
float floatValue; float floatValue;
float knobProportion; CGFloat knobProportion;
id documentView; id documentView;
if (aClipView != _contentView) if (aClipView != _contentView)
@ -1069,10 +1069,10 @@ static float scrollerWidth;
NSRect headerRect, contentRect; NSRect headerRect, contentRect;
NSSize border = [[GSTheme theme] sizeForBorderType: _borderType]; NSSize border = [[GSTheme theme] sizeForBorderType: _borderType];
NSRectEdge bottomEdge, topEdge; NSRectEdge bottomEdge, topEdge;
float headerViewHeight = 0; CGFloat headerViewHeight = 0;
NSRectEdge verticalScrollerEdge = NSMinXEdge; NSRectEdge verticalScrollerEdge = NSMinXEdge;
NSInterfaceStyle style; NSInterfaceStyle style;
float innerBorderWidth = [[NSUserDefaults standardUserDefaults] CGFloat innerBorderWidth = [[NSUserDefaults standardUserDefaults]
boolForKey: @"GSScrollViewNoInnerBorder"] ? 0.0 : 1.0; boolForKey: @"GSScrollViewNoInnerBorder"] ? 0.0 : 1.0;
style = NSInterfaceStyleForKey(@"NSScrollViewInterfaceStyle", nil); style = NSInterfaceStyleForKey(@"NSScrollViewInterfaceStyle", nil);
@ -1355,23 +1355,23 @@ static float scrollerWidth;
return _rulersVisible; return _rulersVisible;
} }
- (void) setLineScroll: (float)aFloat - (void) setLineScroll: (CGFloat)aFloat
{ {
_hLineScroll = aFloat; _hLineScroll = aFloat;
_vLineScroll = aFloat; _vLineScroll = aFloat;
} }
- (void) setHorizontalLineScroll: (float)aFloat - (void) setHorizontalLineScroll: (CGFloat)aFloat
{ {
_hLineScroll = aFloat; _hLineScroll = aFloat;
} }
- (void) setVerticalLineScroll: (float)aFloat - (void) setVerticalLineScroll: (CGFloat)aFloat
{ {
_vLineScroll = aFloat; _vLineScroll = aFloat;
} }
- (float) lineScroll - (CGFloat) lineScroll
{ {
if (_hLineScroll != _vLineScroll) if (_hLineScroll != _vLineScroll)
[NSException raise: NSInternalInconsistencyException [NSException raise: NSInternalInconsistencyException
@ -1379,33 +1379,33 @@ static float scrollerWidth;
return _vLineScroll; return _vLineScroll;
} }
- (float) horizontalLineScroll - (CGFloat) horizontalLineScroll
{ {
return _hLineScroll; return _hLineScroll;
} }
- (float) verticalLineScroll - (CGFloat) verticalLineScroll
{ {
return _vLineScroll; return _vLineScroll;
} }
- (void) setPageScroll: (float)aFloat - (void) setPageScroll: (CGFloat)aFloat
{ {
_hPageScroll = aFloat; _hPageScroll = aFloat;
_vPageScroll = aFloat; _vPageScroll = aFloat;
} }
- (void) setHorizontalPageScroll: (float)aFloat - (void) setHorizontalPageScroll: (CGFloat)aFloat
{ {
_hPageScroll = aFloat; _hPageScroll = aFloat;
} }
- (void) setVerticalPageScroll: (float)aFloat - (void) setVerticalPageScroll: (CGFloat)aFloat
{ {
_vPageScroll = aFloat; _vPageScroll = aFloat;
} }
- (float) pageScroll - (CGFloat) pageScroll
{ {
if (_hPageScroll != _vPageScroll) if (_hPageScroll != _vPageScroll)
[NSException raise: NSInternalInconsistencyException [NSException raise: NSInternalInconsistencyException
@ -1413,12 +1413,12 @@ static float scrollerWidth;
return _vPageScroll; return _vPageScroll;
} }
- (float) horizontalPageScroll - (CGFloat) horizontalPageScroll
{ {
return _hPageScroll; return _hPageScroll;
} }
- (float) verticalPageScroll - (CGFloat) verticalPageScroll
{ {
return _vPageScroll; return _vPageScroll;
} }
@ -1478,7 +1478,8 @@ static float scrollerWidth;
else else
{ {
[aCoder encodeObject: _contentView]; [aCoder encodeObject: _contentView];
[aCoder encodeValueOfObjCType: @encode(int) at: &_borderType]; // Was int, we need to stay compatible
[aCoder encodeValueOfObjCType: @encode(NSInteger) at: &_borderType];
[aCoder encodeValueOfObjCType: @encode(BOOL) at: &_scrollsDynamically]; [aCoder encodeValueOfObjCType: @encode(BOOL) at: &_scrollsDynamically];
[aCoder encodeValueOfObjCType: @encode(BOOL) at: &_rulersVisible]; [aCoder encodeValueOfObjCType: @encode(BOOL) at: &_rulersVisible];
[aCoder encodeValueOfObjCType: @encode(float) at: &_hLineScroll]; [aCoder encodeValueOfObjCType: @encode(float) at: &_hLineScroll];
@ -1595,7 +1596,8 @@ static float scrollerWidth;
int version = [aDecoder versionForClassName: @"NSScrollView"]; int version = [aDecoder versionForClassName: @"NSScrollView"];
NSDebugLLog(@"NSScrollView", @"NSScrollView: start decoding\n"); NSDebugLLog(@"NSScrollView", @"NSScrollView: start decoding\n");
_contentView = [aDecoder decodeObject]; _contentView = [aDecoder decodeObject];
[aDecoder decodeValueOfObjCType: @encode(int) at: &_borderType]; // Was int, we need to stay compatible
[aDecoder decodeValueOfObjCType: @encode(NSInteger) at: &_borderType];
[aDecoder decodeValueOfObjCType: @encode(BOOL) at: &_scrollsDynamically]; [aDecoder decodeValueOfObjCType: @encode(BOOL) at: &_scrollsDynamically];
[aDecoder decodeValueOfObjCType: @encode(BOOL) at: &_rulersVisible]; [aDecoder decodeValueOfObjCType: @encode(BOOL) at: &_rulersVisible];
[aDecoder decodeValueOfObjCType: @encode(float) at: &_hLineScroll]; [aDecoder decodeValueOfObjCType: @encode(float) at: &_hLineScroll];

View file

@ -224,7 +224,7 @@ static float buttonsOffset = 1.0; // buttonsWidth = sw - 2*buttonsOffset
{ {
BOOL flag; BOOL flag;
[aCoder encodeValueOfObjCType: @encode(unsigned int) at: &_arrowsPosition]; [aCoder encodeValueOfObjCType: @encode(NSUInteger) at: &_arrowsPosition];
flag = _scFlags.isEnabled; flag = _scFlags.isEnabled;
[aCoder encodeValueOfObjCType: @encode(BOOL) at: &flag]; [aCoder encodeValueOfObjCType: @encode(BOOL) at: &flag];
[aCoder encodeConditionalObject: _target]; [aCoder encodeConditionalObject: _target];
@ -329,7 +329,7 @@ static float buttonsOffset = 1.0; // buttonsWidth = sw - 2*buttonsOffset
_doubleValue = 1.0; _doubleValue = 1.0;
} }
[aDecoder decodeValueOfObjCType: @encode(unsigned int) [aDecoder decodeValueOfObjCType: @encode(NSUInteger)
at: &_arrowsPosition]; at: &_arrowsPosition];
[aDecoder decodeValueOfObjCType: @encode(BOOL) at: &flag]; [aDecoder decodeValueOfObjCType: @encode(BOOL) at: &flag];
_scFlags.isEnabled = flag; _scFlags.isEnabled = flag;
@ -473,8 +473,8 @@ static float buttonsOffset = 1.0; // buttonsWidth = sw - 2*buttonsOffset
- (void) checkSpaceForParts - (void) checkSpaceForParts
{ {
NSSize frameSize = _frame.size; NSSize frameSize = _frame.size;
float size = (_scFlags.isHorizontal ? frameSize.width : frameSize.height); CGFloat size = (_scFlags.isHorizontal ? frameSize.width : frameSize.height);
int buttonsWidth = [[self class] scrollerWidth] - 2*buttonsOffset; CGFloat buttonsWidth = [[self class] scrollerWidth] - 2*buttonsOffset;
if (_arrowsPosition == NSScrollerArrowsNone) if (_arrowsPosition == NSScrollerArrowsNone)
{ {
@ -1145,10 +1145,10 @@ static float buttonsOffset = 1.0; // buttonsWidth = sw - 2*buttonsOffset
- (NSRect) rectForPart: (NSScrollerPart)partCode - (NSRect) rectForPart: (NSScrollerPart)partCode
{ {
NSRect scrollerFrame = _frame; NSRect scrollerFrame = _frame;
float x, y; CGFloat x, y;
float width, height; CGFloat width, height;
float buttonsWidth; CGFloat buttonsWidth;
float buttonsSize; CGFloat buttonsSize;
NSUsableScrollerParts usableParts; NSUsableScrollerParts usableParts;
NSInterfaceStyle interfaceStyle; NSInterfaceStyle interfaceStyle;
BOOL arrowsSameEnd = NO; BOOL arrowsSameEnd = NO;
@ -1220,7 +1220,7 @@ static float buttonsOffset = 1.0; // buttonsWidth = sw - 2*buttonsOffset
slotHeight = height - (_arrowsPosition == NSScrollerArrowsNone slotHeight = height - (_arrowsPosition == NSScrollerArrowsNone
? 0 : buttonsSize); ? 0 : buttonsSize);
knobHeight = _knobProportion * slotHeight; knobHeight = _knobProportion * slotHeight;
knobHeight = (float)floor(knobHeight); knobHeight = floor(knobHeight);
if (knobHeight < buttonsWidth) if (knobHeight < buttonsWidth)
knobHeight = buttonsWidth; knobHeight = buttonsWidth;

View file

@ -124,7 +124,7 @@ static Class cellClass;
this cannot be determined, for such reasons as the slider is not yet this cannot be determined, for such reasons as the slider is not yet
displayed, this method returns -1. Generally, a slider is displayed, this method returns -1. Generally, a slider is
considered vertical if its height is greater than its width. */ considered vertical if its height is greater than its width. */
- (int) isVertical - (NSInteger) isVertical
{ {
return [_cell isVertical]; return [_cell isVertical];
} }
@ -132,7 +132,7 @@ static Class cellClass;
/** /**
Returns the thickness of the slider's knob. This value is in Returns the thickness of the slider's knob. This value is in
pixels, and is the size of the knob along the slider's track. */ pixels, and is the size of the knob along the slider's track. */
- (float) knobThickness - (CGFloat) knobThickness
{ {
return [_cell knobThickness]; return [_cell knobThickness];
} }
@ -158,7 +158,7 @@ static Class cellClass;
This value sets the amount of space which the knob takes up in the This value sets the amount of space which the knob takes up in the
slider's track.</p><p>See Also: -knobThickness</p> slider's track.</p><p>See Also: -knobThickness</p>
*/ */
- (void) setKnobThickness: (float)aFloat - (void) setKnobThickness: (CGFloat)aFloat
{ {
[_cell setKnobThickness: aFloat]; [_cell setKnobThickness: aFloat];
} }

View file

@ -57,7 +57,7 @@
static inline static inline
float _floatValueForMousePoint (NSPoint point, NSRect knobRect, float _floatValueForMousePoint (NSPoint point, NSRect knobRect,
NSRect slotRect, BOOL isVertical, NSRect slotRect, BOOL isVertical,
float minValue, float maxValue, double minValue, double maxValue,
NSSliderCell *theCell, BOOL flipped, NSSliderCell *theCell, BOOL flipped,
BOOL isCircular) BOOL isCircular)
{ {
@ -417,7 +417,7 @@ float _floatValueForMousePoint (NSPoint point, NSRect knobRect,
pixels, and is the size of the knob along the slider's track.</p> pixels, and is the size of the knob along the slider's track.</p>
<p>See Also: -setKnobThickness:</p> <p>See Also: -setKnobThickness:</p>
*/ */
- (float) knobThickness - (CGFloat) knobThickness
{ {
NSImage *image = [_knobCell image]; NSImage *image = [_knobCell image];
NSSize size; NSSize size;
@ -438,7 +438,7 @@ float _floatValueForMousePoint (NSPoint point, NSRect knobRect,
This value sets the amount of space which the knob takes up in the This value sets the amount of space which the knob takes up in the
slider's track.</p><p>See Also: -knobThickness</p> slider's track.</p><p>See Also: -knobThickness</p>
*/ */
- (void) setKnobThickness: (float)thickness - (void) setKnobThickness: (CGFloat)thickness
{ {
NSImage *image = [_knobCell image]; NSImage *image = [_knobCell image];
NSSize size; NSSize size;
@ -609,7 +609,7 @@ float _floatValueForMousePoint (NSPoint point, NSRect knobRect,
not yet displayed, this method returns -1. Generally, a slider is not yet displayed, this method returns -1. Generally, a slider is
considered vertical if its height is greater than its width. considered vertical if its height is greater than its width.
*/ */
- (int) isVertical - (NSInteger) isVertical
{ {
return _isVertical; return _isVertical;
} }
@ -722,7 +722,7 @@ float _floatValueForMousePoint (NSPoint point, NSRect knobRect,
- (NSRect) rectOfTickMarkAtIndex: (NSInteger)index - (NSRect) rectOfTickMarkAtIndex: (NSInteger)index
{ {
NSRect rect = _trackRect; NSRect rect = _trackRect;
float d; CGFloat d;
if ((index < 0) || (index >= _numberOfTickMarks)) if ((index < 0) || (index >= _numberOfTickMarks))
{ {
@ -818,8 +818,8 @@ float _floatValueForMousePoint (NSPoint point, NSRect knobRect,
float oldFloatValue = [self floatValue]; float oldFloatValue = [self floatValue];
NSRect slotRect = [self trackRect]; NSRect slotRect = [self trackRect];
BOOL isVertical = [self isVertical]; BOOL isVertical = [self isVertical];
float minValue = [self minValue]; double minValue = [self minValue];
float maxValue = [self maxValue]; double maxValue = [self maxValue];
BOOL isFlipped = [controlView isFlipped]; BOOL isFlipped = [controlView isFlipped];
NSPoint location = [theEvent locationInWindow]; NSPoint location = [theEvent locationInWindow];
NSPoint point = [controlView convertPoint: location fromView: nil]; NSPoint point = [controlView convertPoint: location fromView: nil];
@ -953,7 +953,7 @@ float _floatValueForMousePoint (NSPoint point, NSRect knobRect,
if ([decoder versionForClassName: @"NSSliderCell"] >= 2) if ([decoder versionForClassName: @"NSSliderCell"] >= 2)
{ {
[decoder decodeValueOfObjCType: @encode(BOOL) at: &_allowsTickMarkValuesOnly]; [decoder decodeValueOfObjCType: @encode(BOOL) at: &_allowsTickMarkValuesOnly];
[decoder decodeValueOfObjCType: @encode(int) at: &_numberOfTickMarks]; [decoder decodeValueOfObjCType: @encode(NSInteger) at: &_numberOfTickMarks];
[decoder decodeValueOfObjCType: @encode(int) at: &_tickMarkPosition]; [decoder decodeValueOfObjCType: @encode(int) at: &_tickMarkPosition];
} }
} }
@ -982,7 +982,7 @@ float _floatValueForMousePoint (NSPoint point, NSRect knobRect,
[coder encodeValueOfObjCType: @encode(id) at: &_knobCell]; [coder encodeValueOfObjCType: @encode(id) at: &_knobCell];
// New for version 2 // New for version 2
[coder encodeValueOfObjCType: @encode(BOOL) at: &_allowsTickMarkValuesOnly]; [coder encodeValueOfObjCType: @encode(BOOL) at: &_allowsTickMarkValuesOnly];
[coder encodeValueOfObjCType: @encode(int) at: &_numberOfTickMarks]; [coder encodeValueOfObjCType: @encode(NSInteger) at: &_numberOfTickMarks];
[coder encodeValueOfObjCType: @encode(int) at: &_tickMarkPosition]; [coder encodeValueOfObjCType: @encode(int) at: &_tickMarkPosition];
} }
} }

View file

@ -202,9 +202,9 @@
is redisplayed (by calling tile), and the is redisplayed (by calling tile), and the
NSTableViewColumnDidResizeNotification is posted on behalf of the NSTableViewColumnDidResizeNotification is posted on behalf of the
table view. */ table view. */
- (void) setWidth: (float)newWidth - (void) setWidth: (CGFloat)newWidth
{ {
float oldWidth = _width; CGFloat oldWidth = _width;
if (newWidth > _max_width) if (newWidth > _max_width)
newWidth = _max_width; newWidth = _max_width;
@ -233,7 +233,7 @@
/** Return the width of the table column. The /** Return the width of the table column. The
default width is 100. */ default width is 100. */
- (float) width - (CGFloat) width
{ {
return _width; return _width;
} }
@ -242,7 +242,7 @@
Set the min width of the table column, eventually adjusting the Set the min width of the table column, eventually adjusting the
width of the column if it is smaller than the new min width. In no width of the column if it is smaller than the new min width. In no
way a table column can be made smaller than its min width. */ way a table column can be made smaller than its min width. */
- (void) setMinWidth: (float)minWidth - (void) setMinWidth: (CGFloat)minWidth
{ {
_min_width = minWidth; _min_width = minWidth;
if (_width < _min_width) if (_width < _min_width)
@ -253,7 +253,7 @@
Return the column's min width. The column can in no way be resized Return the column's min width. The column can in no way be resized
to a width smaller than this min width. The default min width is to a width smaller than this min width. The default min width is
10. */ 10. */
- (float) minWidth - (CGFloat) minWidth
{ {
return _min_width; return _min_width;
} }
@ -262,7 +262,7 @@
Set the max width of the table column, eventually adjusting the Set the max width of the table column, eventually adjusting the
width of the column if it is bigger than the new max width. In no width of the column if it is bigger than the new max width. In no
way a table column can be made bigger than its max width. */ way a table column can be made bigger than its max width. */
- (void) setMaxWidth: (float)maxWidth - (void) setMaxWidth: (CGFloat)maxWidth
{ {
_max_width = maxWidth; _max_width = maxWidth;
if (_width > _max_width) if (_width > _max_width)
@ -273,7 +273,7 @@
Return the column's max width. The column can in no way be resized Return the column's max width. The column can in no way be resized
to a width bigger than this max width. The default max width is to a width bigger than this max width. The default max width is
100000. */ 100000. */
- (float) maxWidth - (CGFloat) maxWidth
{ {
return _max_width; return _max_width;
} }
@ -329,7 +329,7 @@ it resizes. */
smaller than the column header width, it is increased to it). */ smaller than the column header width, it is increased to it). */
- (void) sizeToFit - (void) sizeToFit
{ {
float new_width; CGFloat new_width;
new_width = [_headerCell cellSize].width; new_width = [_headerCell cellSize].width;
@ -443,7 +443,7 @@ Return the toop tip text displayed when the pointer is in the header area. */
return _dataCell; return _dataCell;
} }
- (NSCell*) dataCellForRow: (int)row - (NSCell*) dataCellForRow: (NSInteger)row
{ {
return [self dataCell]; return [self dataCell];
} }

View file

@ -118,24 +118,24 @@
/* /*
* Checking altered columns * Checking altered columns
*/ */
- (int) draggedColumn - (NSInteger) draggedColumn
{ {
// TODO // TODO
return -1; return -1;
} }
- (float) draggedDistance - (CGFloat) draggedDistance
{ {
// TODO // TODO
return -1; return -1;
} }
- (int) resizedColumn - (NSInteger) resizedColumn
{ {
return _resizedColumn; return _resizedColumn;
} }
/* /*
* Utility methods * Utility methods
*/ */
- (int) columnAtPoint: (NSPoint)aPoint - (NSInteger) columnAtPoint: (NSPoint)aPoint
{ {
if (_tableView == nil) if (_tableView == nil)
return -1; return -1;
@ -146,7 +146,7 @@
return [_tableView columnAtPoint: aPoint]; return [_tableView columnAtPoint: aPoint];
} }
- (NSRect)headerRectOfColumn: (int)columnIndex - (NSRect)headerRectOfColumn: (NSInteger)columnIndex
{ {
NSRect rect; NSRect rect;
@ -204,8 +204,8 @@
- (void) mouseDown: (NSEvent*)event - (void) mouseDown: (NSEvent*)event
{ {
NSPoint location = [event locationInWindow]; NSPoint location = [event locationInWindow];
int clickCount; NSInteger clickCount;
int columnIndex; NSInteger columnIndex;
NSTableColumn *currentColumn; NSTableColumn *currentColumn;
clickCount = [event clickCount]; clickCount = [event clickCount];
@ -271,7 +271,7 @@
/* Resizing */ /* Resizing */
if (_resizedColumn != -1) if (_resizedColumn != -1)
{ {
float p; CGFloat p;
NSEvent *e; NSEvent *e;
BOOL lit; BOOL lit;
NSUInteger eventMask; NSUInteger eventMask;
@ -287,11 +287,11 @@
NSArray *columns = [_tableView tableColumns]; NSArray *columns = [_tableView tableColumns];
/* Column on the left of resizing bound */ /* Column on the left of resizing bound */
NSTableColumn *column = [columns objectAtIndex: _resizedColumn]; NSTableColumn *column = [columns objectAtIndex: _resizedColumn];
const float columnMinX = NSMinX([self headerRectOfColumn: _resizedColumn]); const CGFloat columnMinX = NSMinX([self headerRectOfColumn: _resizedColumn]);
const float columnMinWidth = [column minWidth]; const CGFloat columnMinWidth = [column minWidth];
const float columnMaxWidth = [column maxWidth]; const CGFloat columnMaxWidth = [column maxWidth];
float newColumnWidth = [column width]; CGFloat newColumnWidth = [column width];
float newColumnMaxX; CGFloat newColumnMaxX;
NSRect oldHighlightRect; NSRect oldHighlightRect;
NSRect highlightRect = [self visibleRect]; NSRect highlightRect = [self visibleRect];
highlightRect.size.width = divWidth; highlightRect.size.width = divWidth;
@ -454,15 +454,15 @@
If mouse is not dragged but released, select/deselect the column. */ If mouse is not dragged but released, select/deselect the column. */
if ([_tableView allowsColumnReordering]) if ([_tableView allowsColumnReordering])
{ {
int i = columnIndex; NSInteger i = columnIndex;
int j = columnIndex; NSInteger j = columnIndex;
float minCoord; CGFloat minCoord;
float maxCoord; CGFloat maxCoord;
float minVisCoord; CGFloat minVisCoord;
float maxVisCoord; CGFloat maxVisCoord;
float *_cO; CGFloat *_cO;
float *_cO_minus1; CGFloat *_cO_minus1;
int numberOfColumns = [_tableView numberOfColumns]; NSInteger numberOfColumns = [_tableView numberOfColumns];
NSUInteger eventMask = (NSLeftMouseUpMask NSUInteger eventMask = (NSLeftMouseUpMask
| NSLeftMouseDraggedMask | NSLeftMouseDraggedMask
| NSPeriodicMask); | NSPeriodicMask);
@ -477,7 +477,7 @@
BOOL liveResize = ![[NSUserDefaults standardUserDefaults] boolForKey: @"GSUseGhostResize"]; BOOL liveResize = ![[NSUserDefaults standardUserDefaults] boolForKey: @"GSUseGhostResize"];
BOOL mouseDragged = NO; BOOL mouseDragged = NO;
float p; CGFloat p;
NSPoint unconverted; NSPoint unconverted;
minVisCoord = NSMinX (visibleRect); minVisCoord = NSMinX (visibleRect);
maxVisCoord = NSMaxX (visibleRect); maxVisCoord = NSMaxX (visibleRect);
@ -488,9 +488,9 @@
} }
{ {
float *_c = [_tableView _columnOrigins]; float *_c = [_tableView _columnOrigins];
_cO_minus1 = malloc((numberOfColumns + 3) * sizeof(float)); _cO_minus1 = malloc((numberOfColumns + 3) * sizeof(CGFloat));
_cO = _cO_minus1 + 1; _cO = _cO_minus1 + 1;
memcpy(_cO, _c, numberOfColumns * sizeof(float)); memcpy(_cO, _c, numberOfColumns * sizeof(CGFloat));
_cO[numberOfColumns] = maxCoord; _cO[numberOfColumns] = maxCoord;
_cO[numberOfColumns + 1] = maxCoord; _cO[numberOfColumns + 1] = maxCoord;
_cO[-1] = minCoord; _cO[-1] = minCoord;

View file

@ -168,7 +168,7 @@ typedef struct _tableViewFlags
* This is used by the -sizeToFit method * This is used by the -sizeToFit method
*/ */
typedef struct { typedef struct {
float width; CGFloat width;
BOOL isMax; BOOL isMax;
} columnSorting; } columnSorting;
@ -180,7 +180,7 @@ void quick_sort_internal(columnSorting *data, int p, int r)
{ {
int q; int q;
{ {
float x = data[p].width; CGFloat x = data[p].width;
BOOL y = data[p].isMax; BOOL y = data[p].isMax;
int i = p - 1; int i = p - 1;
int j = r + 1; int j = r + 1;
@ -2532,13 +2532,13 @@ static void computeNewSelection
return _intercellSpacing; return _intercellSpacing;
} }
- (void) setRowHeight: (float)rowHeight - (void) setRowHeight: (CGFloat)rowHeight
{ {
_rowHeight = rowHeight; _rowHeight = rowHeight;
[self tile]; [self tile];
} }
- (float) rowHeight - (CGFloat) rowHeight
{ {
return _rowHeight; return _rowHeight;
} }
@ -5076,7 +5076,7 @@ This method is deprecated, use -columnIndexesInRect:. */
{ {
NSRect columnRect = [self rectOfColumn: columnIndex]; NSRect columnRect = [self rectOfColumn: columnIndex];
NSRect visibleRect = [self visibleRect]; NSRect visibleRect = [self visibleRect];
float diff; CGFloat diff;
// If the row is out on the left, or it is partially visible // If the row is out on the left, or it is partially visible
// on the left // on the left

View file

@ -84,7 +84,7 @@
ASSIGN(_borderColorForEdge[NSMaxYEdge], color); ASSIGN(_borderColorForEdge[NSMaxYEdge], color);
} }
- (float) contentWidth - (CGFloat) contentWidth
{ {
return [self valueForDimension: NSTextBlockWidth]; return [self valueForDimension: NSTextBlockWidth];
} }
@ -94,7 +94,7 @@
return [self valueTypeForDimension: NSTextBlockWidth]; return [self valueTypeForDimension: NSTextBlockWidth];
} }
- (void) setContentWidth: (float)val type: (NSTextBlockValueType)type - (void) setContentWidth: (CGFloat)val type: (NSTextBlockValueType)type
{ {
[self setValue: val type: type forDimension: NSTextBlockWidth]; [self setValue: val type: type forDimension: NSTextBlockWidth];
} }
@ -109,7 +109,7 @@
_verticalAlignment = alignment; _verticalAlignment = alignment;
} }
- (float) valueForDimension: (NSTextBlockDimension)dimension - (CGFloat) valueForDimension: (NSTextBlockDimension)dimension
{ {
if (dimension >= sizeof(_valueType) / sizeof(_valueType[0])) if (dimension >= sizeof(_valueType) / sizeof(_valueType[0]))
[NSException raise: NSInvalidArgumentException [NSException raise: NSInvalidArgumentException
@ -125,7 +125,7 @@
return _valueType[dimension]; return _valueType[dimension];
} }
- (float) _scaledValue: (NSTextBlockDimension)dimension : (NSSize)size - (CGFloat) _scaledValue: (NSTextBlockDimension)dimension : (NSSize)size
{ {
if (_valueType[dimension] == NSTextBlockAbsoluteValueType) if (_valueType[dimension] == NSTextBlockAbsoluteValueType)
{ {
@ -149,7 +149,7 @@
return 0.0; return 0.0;
} }
- (void) setValue: (float)val - (void) setValue: (CGFloat)val
type: (NSTextBlockValueType)type type: (NSTextBlockValueType)type
forDimension: (NSTextBlockDimension)dimension forDimension: (NSTextBlockDimension)dimension
{ {
@ -160,7 +160,7 @@
_valueType[dimension] = type; _valueType[dimension] = type;
} }
- (float) widthForLayer: (NSTextBlockLayer)layer edge: (NSRectEdge)edge - (CGFloat) widthForLayer: (NSTextBlockLayer)layer edge: (NSRectEdge)edge
{ {
if (layer >= sizeof(_width) / sizeof(_width[0])) if (layer >= sizeof(_width) / sizeof(_width[0]))
[NSException raise: NSInvalidArgumentException [NSException raise: NSInvalidArgumentException
@ -183,7 +183,7 @@
return _widthType[layer][edge]; return _widthType[layer][edge];
} }
- (void) setWidth: (float)val - (void) setWidth: (CGFloat)val
type: (NSTextBlockValueType)type type: (NSTextBlockValueType)type
forLayer: (NSTextBlockLayer)layer forLayer: (NSTextBlockLayer)layer
edge: (NSRectEdge)edge edge: (NSRectEdge)edge
@ -198,7 +198,7 @@
_widthType[layer][edge] = type; _widthType[layer][edge] = type;
} }
- (void) setWidth: (float)val - (void) setWidth: (CGFloat)val
type: (NSTextBlockValueType)type type: (NSTextBlockValueType)type
forLayer: (NSTextBlockLayer)layer forLayer: (NSTextBlockLayer)layer
{ {
@ -215,7 +215,7 @@
_widthType[layer][NSMaxYEdge] = type; _widthType[layer][NSMaxYEdge] = type;
} }
- (float) _scaledWidthValue: (NSTextBlockLayer) layer : (NSRectEdge) edge : (NSSize) size - (CGFloat) _scaledWidthValue: (NSTextBlockLayer) layer : (NSRectEdge) edge : (NSSize) size
{ {
if (_widthType[layer][edge] == NSTextBlockAbsoluteValueType) if (_widthType[layer][edge] == NSTextBlockAbsoluteValueType)
{ {
@ -243,18 +243,18 @@
textContainer: (NSTextContainer *)container textContainer: (NSTextContainer *)container
characterRange: (NSRange)range characterRange: (NSRange)range
{ {
float minx = [self _scaledWidthValue: NSTextBlockPadding : NSMinXEdge: rect.size] CGFloat minx = [self _scaledWidthValue: NSTextBlockPadding : NSMinXEdge: rect.size]
+ [self _scaledWidthValue: NSTextBlockBorder : NSMinXEdge : rect.size] + [self _scaledWidthValue: NSTextBlockBorder : NSMinXEdge : rect.size]
+ [self _scaledWidthValue: NSTextBlockMargin : NSMinXEdge : rect.size]; + [self _scaledWidthValue: NSTextBlockMargin : NSMinXEdge : rect.size];
float maxx = [self _scaledWidthValue: NSTextBlockPadding: NSMaxXEdge: rect.size] CGFloat maxx = [self _scaledWidthValue: NSTextBlockPadding: NSMaxXEdge: rect.size]
+ [self _scaledWidthValue: NSTextBlockBorder : NSMaxXEdge : rect.size] + [self _scaledWidthValue: NSTextBlockBorder : NSMaxXEdge : rect.size]
+ [self _scaledWidthValue: NSTextBlockMargin : NSMaxXEdge : rect.size]; + [self _scaledWidthValue: NSTextBlockMargin : NSMaxXEdge : rect.size];
float miny= [self _scaledWidthValue: NSTextBlockPadding : NSMinYEdge: rect.size] CGFloat miny= [self _scaledWidthValue: NSTextBlockPadding : NSMinYEdge: rect.size]
+ [self _scaledWidthValue: NSTextBlockBorder : NSMinYEdge : rect.size] + [self _scaledWidthValue: NSTextBlockBorder : NSMinYEdge : rect.size]
+ [self _scaledWidthValue: NSTextBlockMargin : NSMinYEdge : rect.size]; + [self _scaledWidthValue: NSTextBlockMargin : NSMinYEdge : rect.size];
float maxy = [self _scaledWidthValue: NSTextBlockPadding: NSMaxYEdge: rect.size] CGFloat maxy = [self _scaledWidthValue: NSTextBlockPadding: NSMaxYEdge: rect.size]
+ [self _scaledWidthValue: NSTextBlockBorder : NSMaxYEdge : rect.size] + [self _scaledWidthValue: NSTextBlockBorder : NSMaxYEdge : rect.size]
+ [self _scaledWidthValue: NSTextBlockMargin : NSMaxYEdge : rect.size]; + [self _scaledWidthValue: NSTextBlockMargin : NSMaxYEdge : rect.size];
@ -304,10 +304,10 @@
characterRange: (NSRange)range characterRange: (NSRange)range
layoutManager: (NSLayoutManager *)lm layoutManager: (NSLayoutManager *)lm
{ {
float minx = [self _scaledWidthValue: NSTextBlockPadding : NSMinXEdge : rect.size]; CGFloat minx = [self _scaledWidthValue: NSTextBlockPadding : NSMinXEdge : rect.size];
float maxx = [self _scaledWidthValue: NSTextBlockPadding : NSMaxXEdge : rect.size]; CGFloat maxx = [self _scaledWidthValue: NSTextBlockPadding : NSMaxXEdge : rect.size];
float miny = [self _scaledWidthValue: NSTextBlockPadding : NSMinYEdge : rect.size]; CGFloat miny = [self _scaledWidthValue: NSTextBlockPadding : NSMinYEdge : rect.size];
float maxy = [self _scaledWidthValue: NSTextBlockPadding : NSMaxYEdge : rect.size]; CGFloat maxy = [self _scaledWidthValue: NSTextBlockPadding : NSMaxYEdge : rect.size];
// FIXME - inset from frame by margin in the first step // FIXME - inset from frame by margin in the first step
rect.origin.x -= minx; rect.origin.x -= minx;

View file

@ -163,7 +163,7 @@ framework intact.
{ {
NSTextStorage *textStorage = [_layoutManager textStorage]; NSTextStorage *textStorage = [_layoutManager textStorage];
NSArray *textContainers = [_layoutManager textContainers]; NSArray *textContainers = [_layoutManager textContainers];
unsigned int i, count = [textContainers count]; NSUInteger i, count = [textContainers count];
GSLayoutManager *oldLayoutManager = _layoutManager; GSLayoutManager *oldLayoutManager = _layoutManager;
RETAIN(oldLayoutManager); RETAIN(oldLayoutManager);
@ -339,7 +339,7 @@ framework intact.
return _heightTracksTextView; return _heightTracksTextView;
} }
- (void) setLineFragmentPadding: (float)aFloat - (void) setLineFragmentPadding: (CGFloat)aFloat
{ {
_lineFragmentPadding = aFloat; _lineFragmentPadding = aFloat;
@ -347,7 +347,7 @@ framework intact.
[_layoutManager textContainerChangedGeometry: self]; [_layoutManager textContainerChangedGeometry: self];
} }
- (float) lineFragmentPadding - (CGFloat) lineFragmentPadding
{ {
return _lineFragmentPadding; return _lineFragmentPadding;
} }
@ -357,8 +357,8 @@ framework intact.
movementDirection: (NSLineMovementDirection)moveDir movementDirection: (NSLineMovementDirection)moveDir
remainingRect: (NSRect *)remainingRect remainingRect: (NSRect *)remainingRect
{ {
float minx, maxx, miny, maxy; CGFloat minx, maxx, miny, maxy;
float cminx, cmaxx, cminy, cmaxy; CGFloat cminx, cmaxx, cminy, cmaxy;
minx = NSMinX(proposedRect); minx = NSMinX(proposedRect);
maxx = NSMaxX(proposedRect); maxx = NSMaxX(proposedRect);

View file

@ -63,12 +63,12 @@
_layoutAlgorithm = algorithm; _layoutAlgorithm = algorithm;
} }
- (unsigned int) numberOfColumns - (NSUInteger) numberOfColumns
{ {
return _numberOfColumns; return _numberOfColumns;
} }
- (void) setNumberOfColumns: (unsigned int)numCols - (void) setNumberOfColumns: (NSUInteger)numCols
{ {
_numberOfColumns = numCols; _numberOfColumns = numCols;
} }