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:
Fred Kiefer 2013-02-17 22:44:47 +00:00
parent b1fc7cb066
commit 0c95f32580
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>
* Headers/AppKit/NSGraphicsContext.h

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

@ -97,7 +97,7 @@ typedef NSUInteger NSLineMovementDirection;
id _textView;
NSRect _containerRect;
float _lineFragmentPadding;
CGFloat _lineFragmentPadding;
BOOL _observingFrameChanges;
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
a line fragment rectangle by the standard typesetter. The default is 0.0.
*/
- (void) setLineFragmentPadding: (float)aFloat;
- (float) lineFragmentPadding;
- (void) setLineFragmentPadding: (CGFloat)aFloat;
- (CGFloat) lineFragmentPadding;
@end

View file

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

View file

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

View file

@ -224,7 +224,7 @@ static float buttonsOffset = 1.0; // buttonsWidth = sw - 2*buttonsOffset
{
BOOL flag;
[aCoder encodeValueOfObjCType: @encode(unsigned int) at: &_arrowsPosition];
[aCoder encodeValueOfObjCType: @encode(NSUInteger) at: &_arrowsPosition];
flag = _scFlags.isEnabled;
[aCoder encodeValueOfObjCType: @encode(BOOL) at: &flag];
[aCoder encodeConditionalObject: _target];
@ -329,7 +329,7 @@ static float buttonsOffset = 1.0; // buttonsWidth = sw - 2*buttonsOffset
_doubleValue = 1.0;
}
[aDecoder decodeValueOfObjCType: @encode(unsigned int)
[aDecoder decodeValueOfObjCType: @encode(NSUInteger)
at: &_arrowsPosition];
[aDecoder decodeValueOfObjCType: @encode(BOOL) at: &flag];
_scFlags.isEnabled = flag;
@ -473,8 +473,8 @@ static float buttonsOffset = 1.0; // buttonsWidth = sw - 2*buttonsOffset
- (void) checkSpaceForParts
{
NSSize frameSize = _frame.size;
float size = (_scFlags.isHorizontal ? frameSize.width : frameSize.height);
int buttonsWidth = [[self class] scrollerWidth] - 2*buttonsOffset;
CGFloat size = (_scFlags.isHorizontal ? frameSize.width : frameSize.height);
CGFloat buttonsWidth = [[self class] scrollerWidth] - 2*buttonsOffset;
if (_arrowsPosition == NSScrollerArrowsNone)
{
@ -1145,10 +1145,10 @@ static float buttonsOffset = 1.0; // buttonsWidth = sw - 2*buttonsOffset
- (NSRect) rectForPart: (NSScrollerPart)partCode
{
NSRect scrollerFrame = _frame;
float x, y;
float width, height;
float buttonsWidth;
float buttonsSize;
CGFloat x, y;
CGFloat width, height;
CGFloat buttonsWidth;
CGFloat buttonsSize;
NSUsableScrollerParts usableParts;
NSInterfaceStyle interfaceStyle;
BOOL arrowsSameEnd = NO;
@ -1220,7 +1220,7 @@ static float buttonsOffset = 1.0; // buttonsWidth = sw - 2*buttonsOffset
slotHeight = height - (_arrowsPosition == NSScrollerArrowsNone
? 0 : buttonsSize);
knobHeight = _knobProportion * slotHeight;
knobHeight = (float)floor(knobHeight);
knobHeight = floor(knobHeight);
if (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
displayed, this method returns -1. Generally, a slider is
considered vertical if its height is greater than its width. */
- (int) isVertical
- (NSInteger) isVertical
{
return [_cell isVertical];
}
@ -132,7 +132,7 @@ static Class cellClass;
/**
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. */
- (float) knobThickness
- (CGFloat) 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
slider's track.</p><p>See Also: -knobThickness</p>
*/
- (void) setKnobThickness: (float)aFloat
- (void) setKnobThickness: (CGFloat)aFloat
{
[_cell setKnobThickness: aFloat];
}

View file

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

View file

@ -202,9 +202,9 @@
is redisplayed (by calling tile), and the
NSTableViewColumnDidResizeNotification is posted on behalf of the
table view. */
- (void) setWidth: (float)newWidth
- (void) setWidth: (CGFloat)newWidth
{
float oldWidth = _width;
CGFloat oldWidth = _width;
if (newWidth > _max_width)
newWidth = _max_width;
@ -233,7 +233,7 @@
/** Return the width of the table column. The
default width is 100. */
- (float) width
- (CGFloat) width
{
return _width;
}
@ -242,7 +242,7 @@
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
way a table column can be made smaller than its min width. */
- (void) setMinWidth: (float)minWidth
- (void) setMinWidth: (CGFloat)minWidth
{
_min_width = minWidth;
if (_width < _min_width)
@ -253,7 +253,7 @@
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
10. */
- (float) minWidth
- (CGFloat) minWidth
{
return _min_width;
}
@ -262,7 +262,7 @@
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
way a table column can be made bigger than its max width. */
- (void) setMaxWidth: (float)maxWidth
- (void) setMaxWidth: (CGFloat)maxWidth
{
_max_width = maxWidth;
if (_width > _max_width)
@ -273,7 +273,7 @@
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
100000. */
- (float) maxWidth
- (CGFloat) maxWidth
{
return _max_width;
}
@ -329,7 +329,7 @@ it resizes. */
smaller than the column header width, it is increased to it). */
- (void) sizeToFit
{
float new_width;
CGFloat new_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;
}
- (NSCell*) dataCellForRow: (int)row
- (NSCell*) dataCellForRow: (NSInteger)row
{
return [self dataCell];
}

View file

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

View file

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

View file

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

View file

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

View file

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