More CGFloat, NSUInteger and NSInteger changes.

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@36148 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
fredkiefer 2013-02-16 00:08:33 +00:00
parent 9a8f8f4e07
commit a4abfc354f
22 changed files with 391 additions and 368 deletions

View file

@ -1,3 +1,28 @@
2013-02-16 Fred Kiefer <FredKiefer@gmx.de>
* Headers/Additions/GNUstepGUI/GSWindowDecorationView.h
* Headers/AppKit/NSBitmapImageRep.h
* Headers/AppKit/NSForm.h
* Headers/AppKit/NSImage.h
* Headers/AppKit/NSMenuItem.h
* Headers/AppKit/NSRulerMarker.h
* Headers/AppKit/NSRulerView.h
* Headers/AppKit/NSSegmentedCell.h
* Headers/AppKit/NSSegmentedControl.h
* Headers/AppKit/NSWindow.h
* Source/GSStandardWindowDecorationView.m
* Source/GSWindowDecorationView.m
* Source/NSBitmapImageRep.m
* Source/NSForm.m
* Source/NSImage.m
* Source/NSMenuItem.m
* Source/NSRulerMarker.m
* Source/NSRulerView.m
* Source/NSSegmentedCell.m
* Source/NSSegmentedControl.m
* Source/NSWindow.m
More CGFloat, NSUInteger and NSInteger changes.
2013-02-14 Quentin Mathe <quentin.mathe@gmail.com> 2013-02-14 Quentin Mathe <quentin.mathe@gmail.com>
* Headers/AppKit/NSTableView.h * Headers/AppKit/NSTableView.h

View file

@ -40,8 +40,8 @@
styleMask: (NSUInteger)aStyle; styleMask: (NSUInteger)aStyle;
- (NSRect) frameRectForContentRect: (NSRect)aRect - (NSRect) frameRectForContentRect: (NSRect)aRect
styleMask: (NSUInteger)aStyle; styleMask: (NSUInteger)aStyle;
- (float) minFrameWidthWithTitle: (NSString *)aTitle - (CGFloat) minFrameWidthWithTitle: (NSString *)aTitle
styleMask: (NSUInteger)aStyle; styleMask: (NSUInteger)aStyle;
@end @end
@ -70,7 +70,7 @@ this, either directly, or indirectly (by using the backend).
styleMask: (NSUInteger)aStyle; styleMask: (NSUInteger)aStyle;
- (void) layout; - (void) layout;
- (void) changeWindowHeight: (float)difference; - (void) changeWindowHeight: (CGFloat)difference;
- (void) setBackgroundColor: (NSColor *)color; - (void) setBackgroundColor: (NSColor *)color;
- (void) setContentView: (NSView *)contentView; - (void) setContentView: (NSView *)contentView;

View file

@ -125,17 +125,17 @@ APPKIT_EXPORT NSString *NSImageEXIFData; // No GNUstep support yet; for reading
@interface NSBitmapImageRep : NSImageRep @interface NSBitmapImageRep : NSImageRep
{ {
// Attributes // Attributes
unsigned int _bytesPerRow; NSInteger _bytesPerRow;
unsigned int _numColors; NSInteger _numColors;
unsigned int _bitsPerPixel; NSInteger _bitsPerPixel;
unsigned short _compression; unsigned short _compression;
float _comp_factor; float _comp_factor;
NSMutableDictionary *_properties; NSMutableDictionary *_properties;
BOOL _isPlanar; BOOL _isPlanar;
unsigned char **_imagePlanes; unsigned char **_imagePlanes;
NSData *_imageData; NSData *_imageData;
#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)
NSBitmapFormat _format; NSBitmapFormat _format;
#else #else
unsigned int _format; unsigned int _format;
#endif #endif
@ -149,18 +149,18 @@ APPKIT_EXPORT NSString *NSImageEXIFData; // No GNUstep support yet; for reading
- (id) initWithData: (NSData*)imageData; - (id) initWithData: (NSData*)imageData;
- (id) initWithFocusedViewRect: (NSRect)rect; - (id) initWithFocusedViewRect: (NSRect)rect;
- (id) initWithBitmapDataPlanes: (unsigned char**)planes - (id) initWithBitmapDataPlanes: (unsigned char**)planes
pixelsWide: (int)width pixelsWide: (NSInteger)width
pixelsHigh: (int)height pixelsHigh: (NSInteger)height
bitsPerSample: (int)bitsPerSample bitsPerSample: (NSInteger)bitsPerSample
samplesPerPixel: (int)samplesPerPixel samplesPerPixel: (NSInteger)samplesPerPixel
hasAlpha: (BOOL)alpha hasAlpha: (BOOL)alpha
isPlanar: (BOOL)isPlanar isPlanar: (BOOL)isPlanar
colorSpaceName: (NSString*)colorSpaceName colorSpaceName: (NSString*)colorSpaceName
bytesPerRow: (int)rowBytes bytesPerRow: (NSInteger)rowBytes
bitsPerPixel: (int)pixelBits; bitsPerPixel: (NSInteger)pixelBits;
#if OS_API_VERSION(GS_API_MACOSX, GS_API_LATEST) #if OS_API_VERSION(GS_API_MACOSX, GS_API_LATEST)
- (void)colorizeByMappingGray:(float)midPoint - (void)colorizeByMappingGray:(CGFloat)midPoint
toColor:(NSColor *)midPointColor toColor:(NSColor *)midPointColor
blackMapping:(NSColor *)shadowColor blackMapping:(NSColor *)shadowColor
whiteMapping:(NSColor *)lightColor; whiteMapping:(NSColor *)lightColor;
@ -169,32 +169,32 @@ APPKIT_EXPORT NSString *NSImageEXIFData; // No GNUstep support yet; for reading
#endif #endif
#if OS_API_VERSION(MAC_OS_X_VERSION_10_2, GS_API_LATEST) #if OS_API_VERSION(MAC_OS_X_VERSION_10_2, GS_API_LATEST)
- (int) incrementalLoadFromData: (NSData *)data complete: (BOOL)complete; - (NSInteger) incrementalLoadFromData: (NSData *)data complete: (BOOL)complete;
- (id) initForIncrementalLoad; - (id) initForIncrementalLoad;
#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)
- (id) initWithBitmapDataPlanes: (unsigned char**)planes - (id) initWithBitmapDataPlanes: (unsigned char**)planes
pixelsWide: (int)width pixelsWide: (NSInteger)width
pixelsHigh: (int)height pixelsHigh: (NSInteger)height
bitsPerSample: (int)bps bitsPerSample: (NSInteger)bps
samplesPerPixel: (int)spp samplesPerPixel: (NSInteger)spp
hasAlpha: (BOOL)alpha hasAlpha: (BOOL)alpha
isPlanar: (BOOL)isPlanar isPlanar: (BOOL)isPlanar
colorSpaceName: (NSString*)colorSpaceName colorSpaceName: (NSString*)colorSpaceName
bitmapFormat: (NSBitmapFormat)bitmapFormat bitmapFormat: (NSBitmapFormat)bitmapFormat
bytesPerRow: (int)rowBytes bytesPerRow: (NSInteger)rowBytes
bitsPerPixel: (int)pixelBits; bitsPerPixel: (NSInteger)pixelBits;
#endif #endif
// //
// Getting Information about the Image // Getting Information about the Image
// //
- (int) bitsPerPixel; - (NSInteger) bitsPerPixel;
- (int) samplesPerPixel; - (NSInteger) samplesPerPixel;
- (BOOL) isPlanar; - (BOOL) isPlanar;
- (int) numberOfPlanes; - (NSInteger) numberOfPlanes;
- (int) bytesPerPlane; - (NSInteger) bytesPerPlane;
- (int) bytesPerRow; - (NSInteger) bytesPerRow;
// //
// Getting Image Data // Getting Image Data
@ -204,10 +204,10 @@ APPKIT_EXPORT NSString *NSImageEXIFData; // No GNUstep support yet; for reading
#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)
- (NSBitmapFormat) bitmapFormat; - (NSBitmapFormat) bitmapFormat;
- (void) getPixel: (unsigned int[])pixelData atX: (int)x y: (int)y; - (void) getPixel: (NSUInteger[])pixelData atX: (NSInteger)x y: (NSInteger)y;
- (void) setPixel: (unsigned int[])pixelData atX: (int)x y: (int)y; - (void) setPixel: (NSUInteger[])pixelData atX: (NSInteger)x y: (NSInteger)y;
- (NSColor*) colorAtX: (int)x y: (int)y; - (NSColor*) colorAtX: (NSInteger)x y: (NSInteger)y;
- (void) setColor: (NSColor*)color atX: (int)x y: (int)y; - (void) setColor: (NSColor*)color atX: (NSInteger)x y: (NSInteger)y;
#endif #endif
// //
@ -233,7 +233,7 @@ APPKIT_EXPORT NSString *NSImageEXIFData; // No GNUstep support yet; for reading
// Setting and Checking Compression Types // Setting and Checking Compression Types
// //
+ (void) getTIFFCompressionTypes: (const NSTIFFCompression**)list + (void) getTIFFCompressionTypes: (const NSTIFFCompression**)list
count: (int*)numTypes; count: (NSInteger*)numTypes;
+ (NSString*) localizedNameForTIFFCompressionType: (NSTIFFCompression)type; + (NSString*) localizedNameForTIFFCompressionType: (NSTIFFCompression)type;
- (BOOL) canBeCompressedUsing: (NSTIFFCompression)compression; - (BOOL) canBeCompressedUsing: (NSTIFFCompression)compression;
- (void) getCompression: (NSTIFFCompression*)compression - (void) getCompression: (NSTIFFCompression*)compression

View file

@ -60,7 +60,7 @@
// //
- (void)setBezeled:(BOOL)flag; - (void)setBezeled:(BOOL)flag;
- (void)setBordered:(BOOL)flag; - (void)setBordered:(BOOL)flag;
- (void)setTextAlignment:(int)aMode; - (void)setTextAlignment:(NSTextAlignment)aMode;
- (void)setTextFont:(NSFont*)fontObject; - (void)setTextFont:(NSFont*)fontObject;
- (void)setTitleAlignment:(NSTextAlignment)aMode; - (void)setTitleAlignment:(NSTextAlignment)aMode;
- (void)setTitleFont:(NSFont*)fontObject; - (void)setTitleFont:(NSFont*)fontObject;

View file

@ -240,19 +240,19 @@ typedef enum {
fromRect: (NSRect)aRect fromRect: (NSRect)aRect
operation: (NSCompositingOperation)op; operation: (NSCompositingOperation)op;
- (void) dissolveToPoint: (NSPoint)aPoint - (void) dissolveToPoint: (NSPoint)aPoint
fraction: (float)aFloat; fraction: (CGFloat)aFloat;
- (void) dissolveToPoint: (NSPoint)aPoint - (void) dissolveToPoint: (NSPoint)aPoint
fromRect: (NSRect)aRect fromRect: (NSRect)aRect
fraction: (float)aFloat; fraction: (CGFloat)aFloat;
#if OS_API_VERSION(GS_API_MACOSX, GS_API_LATEST) #if OS_API_VERSION(GS_API_MACOSX, GS_API_LATEST)
- (void) compositeToPoint: (NSPoint)aPoint - (void) compositeToPoint: (NSPoint)aPoint
fromRect: (NSRect)srcRect fromRect: (NSRect)srcRect
operation: (NSCompositingOperation)op operation: (NSCompositingOperation)op
fraction: (float)delta; fraction: (CGFloat)delta;
- (void) compositeToPoint: (NSPoint)aPoint - (void) compositeToPoint: (NSPoint)aPoint
operation: (NSCompositingOperation)op operation: (NSCompositingOperation)op
fraction: (float)delta; fraction: (CGFloat)delta;
#endif #endif
// //
@ -332,7 +332,7 @@ typedef enum {
- (void) drawAtPoint: (NSPoint)point - (void) drawAtPoint: (NSPoint)point
fromRect: (NSRect)srcRect fromRect: (NSRect)srcRect
operation: (NSCompositingOperation)op operation: (NSCompositingOperation)op
fraction: (float)delta; fraction: (CGFloat)delta;
/** <p>Takes the part of the receiver given by <code>srcRect</code> and /** <p>Takes the part of the receiver given by <code>srcRect</code> and
* draws it in <code>dstRect</code> in the current coordinate system, * draws it in <code>dstRect</code> in the current coordinate system,
@ -350,7 +350,7 @@ typedef enum {
- (void) drawInRect: (NSRect)dstRect - (void) drawInRect: (NSRect)dstRect
fromRect: (NSRect)srcRect fromRect: (NSRect)srcRect
operation: (NSCompositingOperation)op operation: (NSCompositingOperation)op
fraction: (float)delta; fraction: (CGFloat)delta;
#endif #endif
#if OS_API_VERSION(MAC_OS_X_VERSION_10_6, GS_API_LATEST) #if OS_API_VERSION(MAC_OS_X_VERSION_10_6, GS_API_LATEST)
@ -358,7 +358,7 @@ typedef enum {
- (void) drawInRect: (NSRect)dstRect - (void) drawInRect: (NSRect)dstRect
fromRect: (NSRect)srcRect fromRect: (NSRect)srcRect
operation: (NSCompositingOperation)op operation: (NSCompositingOperation)op
fraction: (float)delta fraction: (CGFloat)delta
respectFlipped: (BOOL)respectFlipped respectFlipped: (BOOL)respectFlipped
hints: (NSDictionary*)hints; hints: (NSDictionary*)hints;

View file

@ -107,7 +107,7 @@
Returns the indentation level, a number between 0 and 15. Returns the indentation level, a number between 0 and 15.
</p> </p>
*/ */
- (int)indentationLevel; - (NSInteger)indentationLevel;
#endif #endif
/** /**
@ -219,7 +219,7 @@
- (void) setImage: (NSImage*)menuImage; - (void) setImage: (NSImage*)menuImage;
#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)
- (void)setIndentationLevel: (int)level; - (void)setIndentationLevel: (NSInteger)level;
#endif #endif
/** /**

View file

@ -45,14 +45,14 @@
NSImage *_image; NSImage *_image;
id <NSCopying> _representedObject; id <NSCopying> _representedObject;
NSPoint _imageOrigin; NSPoint _imageOrigin;
float _location; CGFloat _location;
BOOL _isMovable; BOOL _isMovable;
BOOL _isRemovable; BOOL _isRemovable;
BOOL _isDragging; BOOL _isDragging;
} }
- (id)initWithRulerView:(NSRulerView *)aRulerView - (id)initWithRulerView:(NSRulerView *)aRulerView
markerLocation:(float)location markerLocation:(CGFloat)location
image:(NSImage *)anImage image:(NSImage *)anImage
imageOrigin:(NSPoint)imageOrigin; imageOrigin:(NSPoint)imageOrigin;
@ -64,15 +64,15 @@
- (void)setImageOrigin:(NSPoint)aPoint; - (void)setImageOrigin:(NSPoint)aPoint;
- (NSPoint)imageOrigin; - (NSPoint)imageOrigin;
- (NSRect)imageRectInRuler; - (NSRect)imageRectInRuler;
- (float)thicknessRequiredInRuler; - (CGFloat)thicknessRequiredInRuler;
- (void)setMovable:(BOOL)flag; - (void)setMovable:(BOOL)flag;
- (BOOL)isMovable; - (BOOL)isMovable;
- (void)setRemovable:(BOOL)flag; - (void)setRemovable:(BOOL)flag;
- (BOOL)isRemovable; - (BOOL)isRemovable;
- (void)setMarkerLocation:(float)location; - (void)setMarkerLocation:(CGFloat)location;
- (float)markerLocation; - (CGFloat)markerLocation;
- (void)setRepresentedObject:(id <NSCopying>)anObject; - (void)setRepresentedObject:(id <NSCopying>)anObject;
- (id <NSCopying>)representedObject; - (id <NSCopying>)representedObject;

View file

@ -58,12 +58,12 @@ typedef enum {
NSScrollView *_scrollView; NSScrollView *_scrollView;
NSView *_clientView; // Not retained NSView *_clientView; // Not retained
NSView *_accessoryView; NSView *_accessoryView;
float _originOffset; CGFloat _originOffset;
NSMutableArray *_markers; NSMutableArray *_markers;
NSRulerOrientation _orientation; NSRulerOrientation _orientation;
float _ruleThickness; CGFloat _ruleThickness;
float _reservedThicknessForAccessoryView; CGFloat _reservedThicknessForAccessoryView;
float _reservedThicknessForMarkers; CGFloat _reservedThicknessForMarkers;
/* Cached values. It's a little expensive to calculate them and they /* Cached values. It's a little expensive to calculate them and they
* change only when the unit or the originOffset is changed or when * change only when the unit or the originOffset is changed or when
@ -80,12 +80,12 @@ typedef enum {
NSString *_labelFormat; NSString *_labelFormat;
} }
- (id) initWithScrollView: (NSScrollView *)aScrollView - (id) initWithScrollView:(NSScrollView *)aScrollView
orientation: (NSRulerOrientation)o; orientation:(NSRulerOrientation)o;
+ (void) registerUnitWithName: (NSString *)uName + (void) registerUnitWithName:(NSString *)uName
abbreviation:(NSString *)abbreviation abbreviation:(NSString *)abbreviation
unitToPointsConversionFactor:(float)conversionFactor unitToPointsConversionFactor:(CGFloat)conversionFactor
stepUpCycle:(NSArray *)stepUpCycle stepUpCycle:(NSArray *)stepUpCycle
stepDownCycle:(NSArray *)stepDownCycle; stepDownCycle:(NSArray *)stepDownCycle;
@ -98,8 +98,8 @@ typedef enum {
- (void) setAccessoryView: (NSView *)aView; - (void) setAccessoryView: (NSView *)aView;
- (NSView *) accessoryView; - (NSView *) accessoryView;
- (void) setOriginOffset: (float)offset; - (void) setOriginOffset: (CGFloat)offset;
- (float) originOffset; - (CGFloat) originOffset;
- (void) setMarkers: (NSArray *)newMarkers; - (void) setMarkers: (NSArray *)newMarkers;
- (NSArray *) markers; - (NSArray *) markers;
@ -108,7 +108,7 @@ typedef enum {
- (BOOL) trackMarker: (NSRulerMarker *)aMarker - (BOOL) trackMarker: (NSRulerMarker *)aMarker
withMouseEvent: (NSEvent *)theEvent; withMouseEvent: (NSEvent *)theEvent;
- (void) moveRulerlineFromLocation: (float)oldLoc toLocation: (float)newLoc; - (void) moveRulerlineFromLocation: (CGFloat)oldLoc toLocation: (CGFloat)newLoc;
- (void) drawHashMarksAndLabelsInRect: (NSRect)aRect; - (void) drawHashMarksAndLabelsInRect: (NSRect)aRect;
- (void) drawMarkersInRect: (NSRect)aRect; - (void) drawMarkersInRect: (NSRect)aRect;
@ -119,14 +119,14 @@ typedef enum {
- (void) setOrientation: (NSRulerOrientation)o; - (void) setOrientation: (NSRulerOrientation)o;
- (NSRulerOrientation) orientation; - (NSRulerOrientation) orientation;
- (void) setReservedThicknessForAccessoryView: (float)thickness; - (void) setReservedThicknessForAccessoryView: (CGFloat)thickness;
- (float) reservedThicknessForAccessoryView; - (CGFloat) reservedThicknessForAccessoryView;
- (void) setReservedThicknessForMarkers: (float)thickness; - (void) setReservedThicknessForMarkers: (CGFloat)thickness;
- (float) reservedThicknessForMarkers; - (CGFloat) reservedThicknessForMarkers;
- (void) setRuleThickness: (float)thickness; - (void) setRuleThickness: (CGFloat)thickness;
- (float) ruleThickness; - (CGFloat) ruleThickness;
- (float) requiredThickness; - (CGFloat) requiredThickness;
- (float) baselineLocation; - (CGFloat) baselineLocation;
- (BOOL) isFlipped; - (BOOL) isFlipped;
@end @end

View file

@ -46,7 +46,7 @@ typedef enum {
@interface NSSegmentedCell : NSActionCell @interface NSSegmentedCell : NSActionCell
{ {
@private @private
int _selected_segment; NSInteger _selected_segment;
int _key_selection; int _key_selection;
NSMutableArray *_items; NSMutableArray *_items;
struct { struct {
@ -62,14 +62,14 @@ typedef enum {
} }
// Specifying number of segments... // Specifying number of segments...
- (void) setSegmentCount: (int) count; - (void) setSegmentCount: (NSInteger) count;
- (int) segmentCount; - (NSInteger) segmentCount;
// Specifying selected segment... // Specifying selected segment...
- (void) setSelectedSegment: (int) segment; - (void) setSelectedSegment: (NSInteger) segment;
- (void) setSelected: (BOOL)flag forSegment: (int)segment; - (void) setSelected: (BOOL)flag forSegment: (NSInteger)segment;
- (int) selectedSegment; - (NSInteger) selectedSegment;
- (void) selectSegmentWithTag: (int) tag; - (void) selectSegmentWithTag: (NSInteger)tag;
- (void) makeNextSegmentKey; - (void) makeNextSegmentKey;
- (void) makePreviousSegmentKey; - (void) makePreviousSegmentKey;
@ -78,24 +78,24 @@ typedef enum {
- (NSSegmentSwitchTracking) trackingMode; - (NSSegmentSwitchTracking) trackingMode;
// Working with individual segments... // Working with individual segments...
- (void) setWidth: (float)width forSegment: (int)segment; - (void) setWidth: (CGFloat)width forSegment: (NSInteger)segment;
- (float) widthForSegment: (int)segment; - (CGFloat) widthForSegment: (NSInteger)segment;
- (void) setImage: (NSImage *)image forSegment: (int)segment; - (void) setImage: (NSImage *)image forSegment: (NSInteger)segment;
- (NSImage *) imageForSegment: (int)segment; - (NSImage *) imageForSegment: (NSInteger)segment;
- (void) setLabel: (NSString *)label forSegment: (int)segment; - (void) setLabel: (NSString *)label forSegment: (NSInteger)segment;
- (NSString *) labelForSegment: (int)segment; - (NSString *) labelForSegment: (NSInteger)segment;
- (BOOL) isSelectedForSegment: (int)segment; - (BOOL) isSelectedForSegment: (NSInteger)segment;
- (void) setEnabled: (BOOL)flag forSegment: (int)segment; - (void) setEnabled: (BOOL)flag forSegment: (NSInteger)segment;
- (BOOL) isEnabledForSegment: (int)segment; - (BOOL) isEnabledForSegment: (NSInteger)segment;
- (void) setMenu: (NSMenu *)menu forSegment: (int)segment; - (void) setMenu: (NSMenu *)menu forSegment: (NSInteger)segment;
- (NSMenu *) menuForSegment: (int)segment; - (NSMenu *) menuForSegment: (NSInteger)segment;
- (void) setToolTip: (NSString *) toolTip forSegment: (int)segment; - (void) setToolTip: (NSString *) toolTip forSegment: (NSInteger)segment;
- (NSString *) toolTipForSegment: (int)segment; - (NSString *) toolTipForSegment: (NSInteger)segment;
- (void) setTag: (int)tag forSegment: (int)segment; - (void) setTag: (NSInteger)tag forSegment: (NSInteger)segment;
- (int) tagForSegment: (int)segment; - (NSInteger) tagForSegment: (NSInteger)segment;
// Drawing custom content // Drawing custom content
- (void) drawSegment: (int)segment - (void) drawSegment: (NSInteger)segment
inFrame: (NSRect)frame inFrame: (NSRect)frame
withView: (NSView *)view; withView: (NSView *)view;

View file

@ -43,27 +43,27 @@ typedef enum _NSSegmentStyle {
@interface NSSegmentedControl : NSControl @interface NSSegmentedControl : NSControl
// Specifying number of segments... // Specifying number of segments...
- (void) setSegmentCount: (int) count; - (void) setSegmentCount: (NSInteger)count;
- (int) segmentCount; - (NSInteger) segmentCount;
// Specifying selected segment... // Specifying selected segment...
- (void) setSelectedSegment: (int) segment; - (void) setSelectedSegment: (NSInteger)segment;
- (int) selectedSegment; - (NSInteger) selectedSegment;
- (void) selectSegmentWithTag: (int) tag; - (void) selectSegmentWithTag: (NSInteger)tag;
// Working with individual segments... // Working with individual segments...
- (void) setWidth: (float)width forSegment: (int)segment; - (void) setWidth: (CGFloat)width forSegment: (NSInteger)segment;
- (float) widthForSegment: (int)segment; - (CGFloat) widthForSegment: (NSInteger)segment;
- (void) setImage: (NSImage *)image forSegment: (int)segment; - (void) setImage: (NSImage *)image forSegment: (NSInteger)segment;
- (NSImage *) imageForSegment: (int)segment; - (NSImage *) imageForSegment: (NSInteger)segment;
- (void) setLabel: (NSString *)label forSegment: (int)segment; - (void) setLabel: (NSString *)label forSegment: (NSInteger)segment;
- (NSString *) labelForSegment: (int)segment; - (NSString *) labelForSegment: (NSInteger)segment;
- (void) setMenu: (NSMenu *)menu forSegment: (int)segment; - (void) setMenu: (NSMenu *)menu forSegment: (NSInteger)segment;
- (NSMenu *) menuForSegment: (int)segment; - (NSMenu *) menuForSegment: (NSInteger)segment;
- (void) setSelected: (BOOL)flag forSegment: (int)segment; - (void) setSelected: (BOOL)flag forSegment: (NSInteger)segment;
- (BOOL) isSelectedForSegment: (int)segment; - (BOOL) isSelectedForSegment: (NSInteger)segment;
- (void) setEnabled: (BOOL)flag forSegment: (int)segment; - (void) setEnabled: (BOOL)flag forSegment: (NSInteger)segment;
- (BOOL) isEnabledForSegment: (int)segment; - (BOOL) isEnabledForSegment: (NSInteger)segment;
// Setting the style of the segments // Setting the style of the segments
#if OS_API_VERSION(GS_API_MACOSX, GS_API_LATEST) #if OS_API_VERSION(GS_API_MACOSX, GS_API_LATEST)

View file

@ -206,7 +206,7 @@ PACKAGE_SCOPE
NSWindowDepth _depthLimit; NSWindowDepth _depthLimit;
NSWindowController *_windowController; NSWindowController *_windowController;
NSInteger _counterpart; NSInteger _counterpart;
float _alphaValue; CGFloat _alphaValue;
NSMutableArray *_children; NSMutableArray *_children;
NSWindow *_parent; NSWindow *_parent;
@ -292,8 +292,8 @@ PACKAGE_SCOPE
* and style. This is the on-screen width of the window including * and style. This is the on-screen width of the window including
* decorations. * decorations.
*/ */
+ (float) minFrameWidthWithTitle: (NSString *)aTitle + (CGFloat) minFrameWidthWithTitle: (NSString *)aTitle
styleMask: (NSUInteger)aStyle; styleMask: (NSUInteger)aStyle;
#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)
- (NSRect) contentRectForFrameRect: (NSRect)frameRect; - (NSRect) contentRectForFrameRect: (NSRect)frameRect;
@ -506,7 +506,7 @@ PACKAGE_SCOPE
- (void) setOneShot: (BOOL)flag; - (void) setOneShot: (BOOL)flag;
#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)
- (NSGraphicsContext*) graphicsContext; - (NSGraphicsContext*) graphicsContext;
- (float) userSpaceScaleFactor; - (CGFloat) userSpaceScaleFactor;
#endif #endif
@ -677,8 +677,8 @@ PACKAGE_SCOPE
#if OS_API_VERSION(GS_API_MACOSX, GS_API_LATEST) #if OS_API_VERSION(GS_API_MACOSX, GS_API_LATEST)
- (void) setHasShadow: (BOOL)hasShadow; - (void) setHasShadow: (BOOL)hasShadow;
- (BOOL) hasShadow; - (BOOL) hasShadow;
- (void) setAlphaValue: (float)windowAlpha; - (void) setAlphaValue: (CGFloat)windowAlpha;
- (float) alphaValue; - (CGFloat) alphaValue;
- (void) setOpaque: (BOOL)isOpaque; - (void) setOpaque: (BOOL)isOpaque;
- (BOOL) isOpaque; - (BOOL) isOpaque;
#endif #endif

View file

@ -75,7 +75,7 @@
} }
} }
+ (float) minFrameWidthWithTitle: (NSString *)aTitle + (CGFloat) minFrameWidthWithTitle: (NSString *)aTitle
styleMask: (NSUInteger)aStyle styleMask: (NSUInteger)aStyle
{ {
float l, r, t, b, width; float l, r, t, b, width;
@ -97,7 +97,7 @@
if (hasTitleBar) if (hasTitleBar)
{ {
float titleHeight = [theme titlebarHeight]; CGFloat titleHeight = [theme titlebarHeight];
titleBarRect = NSMakeRect(0.0, [self bounds].size.height - titleHeight, titleBarRect = NSMakeRect(0.0, [self bounds].size.height - titleHeight,
[self bounds].size.width, titleHeight); [self bounds].size.width, titleHeight);

View file

@ -130,8 +130,8 @@ static inline NSRect RectWithSizeScaledByFactor(NSRect aRect, CGFloat factor)
return aRect; return aRect;
} }
+ (float) minFrameWidthWithTitle: (NSString *)aTitle + (CGFloat) minFrameWidthWithTitle: (NSString *)aTitle
styleMask: (NSUInteger)aStyle styleMask: (NSUInteger)aStyle
{ {
[self subclassResponsibility: _cmd]; [self subclassResponsibility: _cmd];
return 0.0; return 0.0;
@ -192,9 +192,8 @@ static inline NSRect RectWithSizeScaledByFactor(NSRect aRect, CGFloat factor)
if ([_window menu] != nil) if ([_window menu] != nil)
{ {
float menubarHeight = [[GSTheme theme] CGFloat menubarHeight =
menuHeightForWindow: [[GSTheme theme] menuHeightForWindow: _window];
_window];
content.size.height -= menubarHeight; content.size.height -= menubarHeight;
} }
@ -216,9 +215,8 @@ static inline NSRect RectWithSizeScaledByFactor(NSRect aRect, CGFloat factor)
if ([_window menu] != nil) if ([_window menu] != nil)
{ {
float menubarHeight = [[GSTheme theme] CGFloat menubarHeight =
menuHeightForWindow: [[GSTheme theme] menuHeightForWindow: _window];
_window];
aRect.size.height += menubarHeight; aRect.size.height += menubarHeight;
} }
@ -296,7 +294,7 @@ static inline NSRect RectWithSizeScaledByFactor(NSRect aRect, CGFloat factor)
{ {
NSMenuView *menuView = nil; NSMenuView *menuView = nil;
GSTheme *theme = [GSTheme theme]; GSTheme *theme = [GSTheme theme];
float menuBarHeight = [theme menuHeightForWindow: _window]; CGFloat menuBarHeight = [theme menuHeightForWindow: _window];
NSRect menuRect = NSRect menuRect =
NSMakeRect(contentViewFrame.origin.x, NSMakeRect(contentViewFrame.origin.x,
(NSMaxY(contentRect) + 1) - menuBarHeight, (NSMaxY(contentRect) + 1) - menuBarHeight,
@ -320,7 +318,7 @@ static inline NSRect RectWithSizeScaledByFactor(NSRect aRect, CGFloat factor)
if (hasToolbar) if (hasToolbar)
{ {
GSToolbarView *tv = [tb _toolbarView]; GSToolbarView *tv = [tb _toolbarView];
float newToolbarViewHeight; CGFloat newToolbarViewHeight;
NSRect toolbarRect; NSRect toolbarRect;
// If the width changed we may need to recalculate the height // If the width changed we may need to recalculate the height
if (contentViewFrame.size.width != [tv frame].size.width) if (contentViewFrame.size.width != [tv frame].size.width)
@ -351,7 +349,7 @@ static inline NSRect RectWithSizeScaledByFactor(NSRect aRect, CGFloat factor)
} }
} }
- (void) changeWindowHeight: (float)difference - (void) changeWindowHeight: (CGFloat)difference
{ {
NSRect orgWindowFrame; NSRect orgWindowFrame;
NSRect windowFrame; NSRect windowFrame;
@ -459,8 +457,8 @@ static inline NSRect RectWithSizeScaledByFactor(NSRect aRect, CGFloat factor)
- (void) addToolbarView: (GSToolbarView*)toolbarView - (void) addToolbarView: (GSToolbarView*)toolbarView
{ {
float newToolbarViewHeight; CGFloat newToolbarViewHeight;
float contentYOrigin; CGFloat contentYOrigin;
hasToolbar = YES; hasToolbar = YES;
[toolbarView setFrameSize: NSMakeSize(contentRect.size.width, 100)]; [toolbarView setFrameSize: NSMakeSize(contentRect.size.width, 100)];
@ -472,7 +470,7 @@ static inline NSRect RectWithSizeScaledByFactor(NSRect aRect, CGFloat factor)
contentYOrigin = NSMaxY(contentRect); contentYOrigin = NSMaxY(contentRect);
if (hasMenu) if (hasMenu)
{ {
float menuBarHeight = [[GSTheme theme] menuHeightForWindow: _window]; CGFloat menuBarHeight = [[GSTheme theme] menuHeightForWindow: _window];
contentYOrigin -= menuBarHeight; contentYOrigin -= menuBarHeight;
} }
@ -489,7 +487,7 @@ static inline NSRect RectWithSizeScaledByFactor(NSRect aRect, CGFloat factor)
- (void) removeToolbarView: (GSToolbarView *)toolbarView - (void) removeToolbarView: (GSToolbarView *)toolbarView
{ {
float toolbarViewHeight = [toolbarView frame].size.height; CGFloat toolbarViewHeight = [toolbarView frame].size.height;
// Unplug the toolbar view // Unplug the toolbar view
hasToolbar = NO; hasToolbar = NO;
@ -502,8 +500,8 @@ static inline NSRect RectWithSizeScaledByFactor(NSRect aRect, CGFloat factor)
{ {
// Frame and height // Frame and height
NSRect toolbarViewFrame = [toolbarView frame]; NSRect toolbarViewFrame = [toolbarView frame];
float toolbarViewHeight = toolbarViewFrame.size.height; CGFloat toolbarViewHeight = toolbarViewFrame.size.height;
float newToolbarViewHeight = [toolbarView _heightFromLayout]; CGFloat newToolbarViewHeight = [toolbarView _heightFromLayout];
if (toolbarViewHeight != newToolbarViewHeight) if (toolbarViewHeight != newToolbarViewHeight)
{ {
@ -523,7 +521,7 @@ static inline NSRect RectWithSizeScaledByFactor(NSRect aRect, CGFloat factor)
- (void) addMenuView: (NSMenuView*)menuView - (void) addMenuView: (NSMenuView*)menuView
{ {
float menubarHeight = [[GSTheme theme] CGFloat menubarHeight = [[GSTheme theme]
menuHeightForWindow: menuHeightForWindow:
_window]; _window];
NSRect menuRect = NSMakeRect(contentRect.origin.x, NSRect menuRect = NSMakeRect(contentRect.origin.x,
@ -540,9 +538,9 @@ static inline NSRect RectWithSizeScaledByFactor(NSRect aRect, CGFloat factor)
- (NSMenuView*) removeMenuView - (NSMenuView*) removeMenuView
{ {
NSEnumerator *e = [[self subviews] objectEnumerator]; NSEnumerator *e = [[self subviews] objectEnumerator];
NSView *v; NSView *v;
float menubarHeight = [[GSTheme theme] CGFloat menubarHeight = [[GSTheme theme]
menuHeightForWindow: menuHeightForWindow:
_window]; _window];
@ -576,8 +574,8 @@ static inline NSRect RectWithSizeScaledByFactor(NSRect aRect, CGFloat factor)
[GSCurrentServer() styleoffsets: l : r : t : b : style]; [GSCurrentServer() styleoffsets: l : r : t : b : style];
} }
+ (float) minFrameWidthWithTitle: (NSString *)aTitle + (CGFloat) minFrameWidthWithTitle: (NSString *)aTitle
styleMask: (NSUInteger)aStyle styleMask: (NSUInteger)aStyle
{ {
/* TODO: we could at least guess... */ /* TODO: we could at least guess... */
return 0.0; return 0.0;

View file

@ -68,14 +68,14 @@
+ (NSTIFFCompression) _compressionTypeFromLocal: (int)type; + (NSTIFFCompression) _compressionTypeFromLocal: (int)type;
- (void) _premultiply; - (void) _premultiply;
- (void) _unpremultiply; - (void) _unpremultiply;
- (NSBitmapImageRep *) _convertToFormatBitsPerSample: (int)bps - (NSBitmapImageRep *) _convertToFormatBitsPerSample: (NSInteger)bps
samplesPerPixel: (int)spp samplesPerPixel: (NSInteger)spp
hasAlpha: (BOOL)alpha hasAlpha: (BOOL)alpha
isPlanar: (BOOL)isPlanar isPlanar: (BOOL)isPlanar
colorSpaceName: (NSString*)colorSpaceName colorSpaceName: (NSString*)colorSpaceName
bitmapFormat: (NSBitmapFormat)bitmapFormat bitmapFormat: (NSBitmapFormat)bitmapFormat
bytesPerRow: (int)rowBytes bytesPerRow: (NSInteger)rowBytes
bitsPerPixel: (int)pixelBits; bitsPerPixel: (NSInteger)pixelBits;
@end @end
/** /**
@ -331,7 +331,7 @@
/** Initialize with bitmap data from a rect within the focused view */ /** Initialize with bitmap data from a rect within the focused view */
- (id) initWithFocusedViewRect: (NSRect)rect - (id) initWithFocusedViewRect: (NSRect)rect
{ {
int bps, spp, alpha, format; NSInteger bps, spp, alpha, format;
NSSize size; NSSize size;
NSString *space; NSString *space;
unsigned char *planes[4]; unsigned char *planes[4];
@ -449,15 +449,15 @@
</deflist> </deflist>
*/ */
- (id) initWithBitmapDataPlanes: (unsigned char **)planes - (id) initWithBitmapDataPlanes: (unsigned char **)planes
pixelsWide: (int)width pixelsWide: (NSInteger)width
pixelsHigh: (int)height pixelsHigh: (NSInteger)height
bitsPerSample: (int)bitsPerSample bitsPerSample: (NSInteger)bitsPerSample
samplesPerPixel: (int)samplesPerPixel samplesPerPixel: (NSInteger)samplesPerPixel
hasAlpha: (BOOL)alpha hasAlpha: (BOOL)alpha
isPlanar: (BOOL)isPlanar isPlanar: (BOOL)isPlanar
colorSpaceName: (NSString *)colorSpaceName colorSpaceName: (NSString *)colorSpaceName
bytesPerRow: (int)rowBytes bytesPerRow: (NSInteger)rowBytes
bitsPerPixel: (int)pixelBits bitsPerPixel: (NSInteger)pixelBits
{ {
return [self initWithBitmapDataPlanes: planes return [self initWithBitmapDataPlanes: planes
pixelsWide: width pixelsWide: width
@ -473,19 +473,19 @@
} }
- (id) initWithBitmapDataPlanes: (unsigned char**)planes - (id) initWithBitmapDataPlanes: (unsigned char**)planes
pixelsWide: (int)width pixelsWide: (NSInteger)width
pixelsHigh: (int)height pixelsHigh: (NSInteger)height
bitsPerSample: (int)bps bitsPerSample: (NSInteger)bps
samplesPerPixel: (int)spp samplesPerPixel: (NSInteger)spp
hasAlpha: (BOOL)alpha hasAlpha: (BOOL)alpha
isPlanar: (BOOL)isPlanar isPlanar: (BOOL)isPlanar
colorSpaceName: (NSString*)colorSpaceName colorSpaceName: (NSString*)colorSpaceName
bitmapFormat: (NSBitmapFormat)bitmapFormat bitmapFormat: (NSBitmapFormat)bitmapFormat
bytesPerRow: (int)rowBytes bytesPerRow: (NSInteger)rowBytes
bitsPerPixel: (int)pixelBits bitsPerPixel: (NSInteger)pixelBits
{ {
NSDebugLLog(@"NSImage", @"Creating bitmap image with pw %d ph %d bps %d spp %d alpha %d, planar %d cs %@", NSDebugLLog(@"NSImage", @"Creating bitmap image with pw %d ph %d bps %d spp %d alpha %d, planar %d cs %@",
width, height, bps, spp, alpha, isPlanar, colorSpaceName); (int)width,(int) height, (int)bps, (int)spp, alpha, isPlanar, colorSpaceName);
if (!bps || !spp || !width || !height) if (!bps || !spp || !width || !height)
{ {
[NSException raise: NSInvalidArgumentException [NSException raise: NSInvalidArgumentException
@ -577,7 +577,7 @@
return self; return self;
} }
- (void)colorizeByMappingGray:(float)midPoint - (void)colorizeByMappingGray:(CGFloat)midPoint
toColor:(NSColor *)midPointColor toColor:(NSColor *)midPointColor
blackMapping:(NSColor *)shadowColor blackMapping:(NSColor *)shadowColor
whiteMapping:(NSColor *)lightColor whiteMapping:(NSColor *)lightColor
@ -605,14 +605,14 @@
return self; return self;
} }
- (int) incrementalLoadFromData: (NSData *)data complete: (BOOL)complete - (NSInteger) incrementalLoadFromData: (NSData *)data complete: (BOOL)complete
{ {
if (!complete) if (!complete)
{ {
// we don't implement it really // we don't implement it really
return NSImageRepLoadStatusWillNeedAllData; return NSImageRepLoadStatusWillNeedAllData;
} }
return [self initWithData:data] ? NSImageRepLoadStatusCompleted : NSImageRepLoadStatusUnexpectedEOF; return [self initWithData: data] ? NSImageRepLoadStatusCompleted : NSImageRepLoadStatusUnexpectedEOF;
} }
- (void) dealloc - (void) dealloc
@ -629,14 +629,14 @@
/** Returns the number of bits need to contain one pixels worth of data. /** Returns the number of bits need to contain one pixels worth of data.
This is normally the number of samples per pixel times the number of This is normally the number of samples per pixel times the number of
bits in one sample. */ bits in one sample. */
- (int) bitsPerPixel - (NSInteger) bitsPerPixel
{ {
return _bitsPerPixel; return _bitsPerPixel;
} }
/** Returns the number of samples in a pixel. For instance, a normal RGB /** Returns the number of samples in a pixel. For instance, a normal RGB
image with transparency would have a samplesPerPixel of 4. */ image with transparency would have a samplesPerPixel of 4. */
- (int) samplesPerPixel - (NSInteger) samplesPerPixel
{ {
return _numColors; return _numColors;
} }
@ -652,14 +652,14 @@
/** Returns the number of planes in an image. Typically this is /** Returns the number of planes in an image. Typically this is
equal to the number of samples in a planar image or 1 for a non-planar equal to the number of samples in a planar image or 1 for a non-planar
image. */ image. */
- (int) numberOfPlanes - (NSInteger) numberOfPlanes
{ {
return (_isPlanar) ? _numColors : 1; return (_isPlanar) ? _numColors : 1;
} }
/** Returns the number of bytes in a plane. This is the number of bytes /** Returns the number of bytes in a plane. This is the number of bytes
in a row times tne height of the image. */ in a row times tne height of the image. */
- (int) bytesPerPlane - (NSInteger) bytesPerPlane
{ {
return _bytesPerRow*_pixelsHigh; return _bytesPerRow*_pixelsHigh;
} }
@ -669,7 +669,7 @@
in medhed configuration). However it may differ from this if set in medhed configuration). However it may differ from this if set
explicitly in -initWithBitmapDataPlanes:pixelsWide:pixelsHigh:bitsPerSample:samplesPerPixel:hasAlpha:isPlanar:colorSpaceName:bytesPerRow:bitsPerPixel:. explicitly in -initWithBitmapDataPlanes:pixelsWide:pixelsHigh:bitsPerSample:samplesPerPixel:hasAlpha:isPlanar:colorSpaceName:bytesPerRow:bitsPerPixel:.
*/ */
- (int) bytesPerRow - (NSInteger) bytesPerRow
{ {
return _bytesPerRow; return _bytesPerRow;
} }
@ -749,11 +749,11 @@ _get_bit_value(unsigned char *base, long msb_off, int bit_width)
* Returns the values of the components of pixel (x,y), where (0,0) is the * Returns the values of the components of pixel (x,y), where (0,0) is the
* top-left pixel in the image, by storing them in the array pixelData. * top-left pixel in the image, by storing them in the array pixelData.
*/ */
- (void) getPixel: (unsigned int[])pixelData atX: (int)x y: (int)y - (void) getPixel: (NSUInteger[])pixelData atX: (NSInteger)x y: (NSInteger)y
{ {
int i; NSInteger i;
long int offset; NSInteger offset;
long int line_offset; NSInteger line_offset;
if (x < 0 || y < 0 || x >= _pixelsWide || y >= _pixelsHigh) if (x < 0 || y < 0 || x >= _pixelsWide || y >= _pixelsHigh)
{ {
@ -842,13 +842,13 @@ _set_bit_value(unsigned char *base, long msb_off, int bit_width,
* Sets the components of pixel (x,y), where (0,0) is the top-left pixel in * Sets the components of pixel (x,y), where (0,0) is the top-left pixel in
* the image, to the given array of pixel components. * the image, to the given array of pixel components.
*/ */
- (void) setPixel: (unsigned int[])pixelData atX: (int)x y: (int)y - (void) setPixel: (NSUInteger[])pixelData atX: (NSInteger)x y: (NSInteger)y
{ {
int i; NSInteger i;
long int offset; NSInteger offset;
long int line_offset; NSInteger line_offset;
if (x < 0 || y < 0 || x >= _pixelsWide || y >= _pixelsHigh) if (x < 0 || y < 0 || x >= _pixelsWide || y >= _pixelsHigh)
{ {
// outside // outside
return; return;
@ -880,7 +880,7 @@ _set_bit_value(unsigned char *base, long msb_off, int bit_width,
offset, _bitsPerSample, pixelData[i]); offset, _bitsPerSample, pixelData[i]);
} }
} }
} }
else else
{ {
if (_bitsPerSample == 8) if (_bitsPerSample == 8)
@ -908,21 +908,21 @@ _set_bit_value(unsigned char *base, long msb_off, int bit_width,
* Returns an NSColor object representing the color of the pixel (x,y), where * Returns an NSColor object representing the color of the pixel (x,y), where
* (0,0) is the top-left pixel in the image. * (0,0) is the top-left pixel in the image.
*/ */
- (NSColor*) colorAtX: (int)x y: (int)y - (NSColor*) colorAtX: (NSInteger)x y: (NSInteger)y
{ {
unsigned int pixelData[5]; NSUInteger pixelData[5];
if (x < 0 || y < 0 || x >= _pixelsWide || y >= _pixelsHigh) if (x < 0 || y < 0 || x >= _pixelsWide || y >= _pixelsHigh)
{ {
// outside // outside
return nil; return nil;
} }
[self getPixel: pixelData atX: x y: y]; [self getPixel: pixelData atX: x y: y];
if ([_colorSpace isEqualToString: NSCalibratedRGBColorSpace] if ([_colorSpace isEqualToString: NSCalibratedRGBColorSpace]
|| [_colorSpace isEqualToString: NSDeviceRGBColorSpace]) || [_colorSpace isEqualToString: NSDeviceRGBColorSpace])
{ {
unsigned int ir, ig, ib, ia; NSUInteger ir, ig, ib, ia;
CGFloat fr, fg, fb, fa; CGFloat fr, fg, fb, fa;
CGFloat scale; CGFloat scale;
@ -985,11 +985,11 @@ _set_bit_value(unsigned char *base, long msb_off, int bit_width,
blue: fb blue: fb
alpha: fa]; alpha: fa];
} }
} }
else if ([_colorSpace isEqual: NSDeviceWhiteColorSpace] else if ([_colorSpace isEqual: NSDeviceWhiteColorSpace]
|| [_colorSpace isEqual: NSCalibratedWhiteColorSpace]) || [_colorSpace isEqual: NSCalibratedWhiteColorSpace])
{ {
unsigned int iw, ia; NSUInteger iw, ia;
CGFloat fw, fa; CGFloat fw, fa;
CGFloat scale; CGFloat scale;
@ -1041,7 +1041,7 @@ _set_bit_value(unsigned char *base, long msb_off, int bit_width,
else if ([_colorSpace isEqual: NSDeviceBlackColorSpace] else if ([_colorSpace isEqual: NSDeviceBlackColorSpace]
|| [_colorSpace isEqual: NSCalibratedBlackColorSpace]) || [_colorSpace isEqual: NSCalibratedBlackColorSpace])
{ {
unsigned int ib, ia; NSUInteger ib, ia;
CGFloat fw, fa; CGFloat fw, fa;
CGFloat scale; CGFloat scale;
@ -1090,7 +1090,7 @@ _set_bit_value(unsigned char *base, long msb_off, int bit_width,
} }
else if ([_colorSpace isEqual: NSDeviceCMYKColorSpace]) else if ([_colorSpace isEqual: NSDeviceCMYKColorSpace])
{ {
unsigned int ic, im, iy, ib, ia; NSUInteger ic, im, iy, ib, ia;
CGFloat fc, fm, fy, fb, fa; CGFloat fc, fm, fy, fb, fa;
CGFloat scale; CGFloat scale;
@ -1153,19 +1153,19 @@ _set_bit_value(unsigned char *base, long msb_off, int bit_width,
alpha: fa]; alpha: fa];
} }
return nil; return nil;
} }
/** /**
* Sets the color of pixel (x,y), where (0,0) is the top-left pixel in the * Sets the color of pixel (x,y), where (0,0) is the top-left pixel in the
* image. * image.
*/ */
- (void) setColor: (NSColor*)color atX: (int)x y: (int)y - (void) setColor: (NSColor*)color atX: (NSInteger)x y: (NSInteger)y
{ {
unsigned int pixelData[5]; NSUInteger pixelData[5];
NSColor *conv; NSColor *conv;
if (x < 0 || y < 0 || x >= _pixelsWide || y >= _pixelsHigh) if (x < 0 || y < 0 || x >= _pixelsWide || y >= _pixelsHigh)
{ {
// outside // outside
return; return;
@ -1180,7 +1180,7 @@ _set_bit_value(unsigned char *base, long msb_off, int bit_width,
if ([_colorSpace isEqualToString: NSCalibratedRGBColorSpace] if ([_colorSpace isEqualToString: NSCalibratedRGBColorSpace]
|| [_colorSpace isEqualToString: NSDeviceRGBColorSpace]) || [_colorSpace isEqualToString: NSDeviceRGBColorSpace])
{ {
unsigned int ir, ig, ib, ia; NSUInteger ir, ig, ib, ia;
CGFloat fr, fg, fb, fa; CGFloat fr, fg, fb, fa;
CGFloat scale; CGFloat scale;
@ -1231,10 +1231,10 @@ _set_bit_value(unsigned char *base, long msb_off, int bit_width,
pixelData[2] = ib; pixelData[2] = ib;
} }
} }
else if ([_colorSpace isEqual: NSDeviceWhiteColorSpace] else if ([_colorSpace isEqual: NSDeviceWhiteColorSpace]
|| [_colorSpace isEqual: NSCalibratedWhiteColorSpace]) || [_colorSpace isEqual: NSCalibratedWhiteColorSpace])
{ {
unsigned int iw, ia; NSUInteger iw, ia;
CGFloat fw, fa; CGFloat fw, fa;
CGFloat scale; CGFloat scale;
@ -1273,7 +1273,7 @@ _set_bit_value(unsigned char *base, long msb_off, int bit_width,
else if ([_colorSpace isEqual: NSDeviceBlackColorSpace] else if ([_colorSpace isEqual: NSDeviceBlackColorSpace]
|| [_colorSpace isEqual: NSCalibratedBlackColorSpace]) || [_colorSpace isEqual: NSCalibratedBlackColorSpace])
{ {
unsigned int iw, ia; NSUInteger iw, ia;
CGFloat fw, fa; CGFloat fw, fa;
CGFloat scale; CGFloat scale;
@ -1311,7 +1311,7 @@ _set_bit_value(unsigned char *base, long msb_off, int bit_width,
} }
else if ([_colorSpace isEqual: NSDeviceCMYKColorSpace]) else if ([_colorSpace isEqual: NSDeviceCMYKColorSpace])
{ {
unsigned int ic, im, iy, ib, ia; NSUInteger ic, im, iy, ib, ia;
CGFloat fc, fm, fy, fb, fa; CGFloat fc, fm, fy, fb, fa;
CGFloat scale; CGFloat scale;
@ -1372,7 +1372,7 @@ _set_bit_value(unsigned char *base, long msb_off, int bit_width,
return; return;
} }
[self setPixel: pixelData atX: x y: y]; [self setPixel: pixelData atX: x y: y];
} }
/** Draws the image in the current window according the information /** Draws the image in the current window according the information
@ -1605,7 +1605,7 @@ _set_bit_value(unsigned char *base, long msb_off, int bit_width,
/** Returns a C-array of available TIFF compression types. /** Returns a C-array of available TIFF compression types.
*/ */
+ (void) getTIFFCompressionTypes: (const NSTIFFCompression **)list + (void) getTIFFCompressionTypes: (const NSTIFFCompression **)list
count: (int *)numTypes count: (NSInteger *)numTypes
{ {
// the GNUstep supported types // the GNUstep supported types
static NSTIFFCompression types[] = { static NSTIFFCompression types[] = {
@ -1620,7 +1620,7 @@ _set_bit_value(unsigned char *base, long msb_off, int bit_width,
}; };
// check with libtiff to see what is really available // check with libtiff to see what is really available
int i, j; NSInteger i, j;
static NSTIFFCompression checkedTypes[8]; static NSTIFFCompression checkedTypes[8];
for (i = 0, j = 0; i < 8; i++) for (i = 0, j = 0; i < 8; i++)
{ {
@ -1941,9 +1941,9 @@ _set_bit_value(unsigned char *base, long msb_off, int bit_width,
- (void) _premultiply - (void) _premultiply
{ {
int x, y; NSInteger x, y;
unsigned int pixelData[5]; NSUInteger pixelData[5];
int start, end, i, ai; NSInteger start, end, i, ai;
SEL getPSel = @selector(getPixel:atX:y:); SEL getPSel = @selector(getPixel:atX:y:);
SEL setPSel = @selector(setPixel:atX:y:); SEL setPSel = @selector(setPixel:atX:y:);
IMP getP = [self methodForSelector: getPSel]; IMP getP = [self methodForSelector: getPSel];
@ -1967,7 +1967,7 @@ _set_bit_value(unsigned char *base, long msb_off, int bit_width,
if (_bitsPerSample == 8) if (_bitsPerSample == 8)
{ {
unsigned int a; NSUInteger a;
for (y = 0; y < _pixelsHigh; y++) for (y = 0; y < _pixelsHigh; y++)
{ {
@ -1980,7 +1980,7 @@ _set_bit_value(unsigned char *base, long msb_off, int bit_width,
{ {
for (i = start; i < end; i++) for (i = start; i < end; i++)
{ {
unsigned int t = a * pixelData[i] + 0x80; NSUInteger t = a * pixelData[i] + 0x80;
pixelData[i] = ((t >> 8) + t) >> 8; pixelData[i] = ((t >> 8) + t) >> 8;
} }
@ -2018,9 +2018,9 @@ _set_bit_value(unsigned char *base, long msb_off, int bit_width,
- (void) _unpremultiply - (void) _unpremultiply
{ {
int x, y; NSInteger x, y;
unsigned int pixelData[5]; NSUInteger pixelData[5];
int start, end, i, ai; NSInteger start, end, i, ai;
SEL getPSel = @selector(getPixel:atX:y:); SEL getPSel = @selector(getPixel:atX:y:);
SEL setPSel = @selector(setPixel:atX:y:); SEL setPSel = @selector(setPixel:atX:y:);
IMP getP = [self methodForSelector: getPSel]; IMP getP = [self methodForSelector: getPSel];
@ -2044,7 +2044,7 @@ _set_bit_value(unsigned char *base, long msb_off, int bit_width,
if (_bitsPerSample == 8) if (_bitsPerSample == 8)
{ {
unsigned int a; NSUInteger a;
for (y = 0; y < _pixelsHigh; y++) for (y = 0; y < _pixelsHigh; y++)
{ {
@ -2057,7 +2057,7 @@ _set_bit_value(unsigned char *base, long msb_off, int bit_width,
{ {
for (i = start; i < end; i++) for (i = start; i < end; i++)
{ {
unsigned int c; NSUInteger c;
c = (pixelData[i] * 255) / a; c = (pixelData[i] * 255) / a;
if (c >= 255) if (c >= 255)
@ -2083,7 +2083,7 @@ _set_bit_value(unsigned char *base, long msb_off, int bit_width,
scale = (CGFloat)((1 << _bitsPerSample) - 1); scale = (CGFloat)((1 << _bitsPerSample) - 1);
for (y = 0; y < _pixelsHigh; y++) for (y = 0; y < _pixelsHigh; y++)
{ {
unsigned int a; NSUInteger a;
for (x = 0; x < _pixelsWide; x++) for (x = 0; x < _pixelsWide; x++)
{ {
@ -2116,14 +2116,14 @@ _set_bit_value(unsigned char *base, long msb_off, int bit_width,
_format |= NSAlphaNonpremultipliedBitmapFormat; _format |= NSAlphaNonpremultipliedBitmapFormat;
} }
- (NSBitmapImageRep *) _convertToFormatBitsPerSample: (int)bps - (NSBitmapImageRep *) _convertToFormatBitsPerSample: (NSInteger)bps
samplesPerPixel: (int)spp samplesPerPixel: (NSInteger)spp
hasAlpha: (BOOL)alpha hasAlpha: (BOOL)alpha
isPlanar: (BOOL)isPlanar isPlanar: (BOOL)isPlanar
colorSpaceName: (NSString*)colorSpaceName colorSpaceName: (NSString*)colorSpaceName
bitmapFormat: (NSBitmapFormat)bitmapFormat bitmapFormat: (NSBitmapFormat)bitmapFormat
bytesPerRow: (int)rowBytes bytesPerRow: (NSInteger)rowBytes
bitsPerPixel: (int)pixelBits bitsPerPixel: (NSInteger)pixelBits
{ {
if (!pixelBits) if (!pixelBits)
pixelBits = bps * ((isPlanar) ? 1 : spp); pixelBits = bps * ((isPlanar) ? 1 : spp);
@ -2166,8 +2166,8 @@ _set_bit_value(unsigned char *base, long msb_off, int bit_width,
SEL setPSel = @selector(setPixel:atX:y:); SEL setPSel = @selector(setPixel:atX:y:);
IMP getP = [self methodForSelector: getPSel]; IMP getP = [self methodForSelector: getPSel];
IMP setP = [new methodForSelector: setPSel]; IMP setP = [new methodForSelector: setPSel];
unsigned int pixelData[5]; NSUInteger pixelData[5];
int x, y; NSInteger x, y;
CGFloat _scale; CGFloat _scale;
CGFloat scale; CGFloat scale;
@ -2188,9 +2188,9 @@ _set_bit_value(unsigned char *base, long msb_off, int bit_width,
{ {
for (x = 0; x < _pixelsWide; x++) for (x = 0; x < _pixelsWide; x++)
{ {
unsigned int iv[4], ia; NSUInteger iv[4], ia;
CGFloat fv[4], fa; CGFloat fv[4], fa;
int i; NSInteger i;
//[self getPixel: pixelData atX: x y: y]; //[self getPixel: pixelData atX: x y: y];
getP(self, getPSel, pixelData, x, y); getP(self, getPSel, pixelData, x, y);
@ -2306,11 +2306,11 @@ _set_bit_value(unsigned char *base, long msb_off, int bit_width,
SEL setPSel = @selector(setPixel:atX:y:); SEL setPSel = @selector(setPixel:atX:y:);
IMP getP = [self methodForSelector: getPSel]; IMP getP = [self methodForSelector: getPSel];
IMP setP = [new methodForSelector: setPSel]; IMP setP = [new methodForSelector: setPSel];
unsigned int pixelData[4]; NSUInteger pixelData[4];
int x, y; NSInteger x, y;
CGFloat _scale; CGFloat _scale;
CGFloat scale; CGFloat scale;
int max = (1 << _bitsPerSample) - 1; NSInteger max = (1 << _bitsPerSample) - 1;
BOOL isWhite = [_colorSpace isEqualToString: NSCalibratedWhiteColorSpace] BOOL isWhite = [_colorSpace isEqualToString: NSCalibratedWhiteColorSpace]
|| [_colorSpace isEqualToString: NSDeviceWhiteColorSpace]; || [_colorSpace isEqualToString: NSDeviceWhiteColorSpace];
@ -2331,7 +2331,7 @@ _set_bit_value(unsigned char *base, long msb_off, int bit_width,
{ {
for (x = 0; x < _pixelsWide; x++) for (x = 0; x < _pixelsWide; x++)
{ {
unsigned int iv, ia; NSUInteger iv, ia;
CGFloat fv, fa; CGFloat fv, fa;
//[self getPixel: pixelData atX: x y: y]; //[self getPixel: pixelData atX: x y: y];
@ -2426,7 +2426,7 @@ _set_bit_value(unsigned char *base, long msb_off, int bit_width,
SEL setCSel = @selector(setColor:atX:y:); SEL setCSel = @selector(setColor:atX:y:);
IMP getC = [self methodForSelector: getCSel]; IMP getC = [self methodForSelector: getCSel];
IMP setC = [new methodForSelector: setCSel]; IMP setC = [new methodForSelector: setCSel];
int i, j; NSInteger i, j;
NSDebugLLog(@"NSImage", @"Slow converting %@ bitmap data to %@", NSDebugLLog(@"NSImage", @"Slow converting %@ bitmap data to %@",
_colorSpace, colorSpaceName); _colorSpace, colorSpaceName);

View file

@ -244,7 +244,7 @@ static Class defaultCellClass = nil;
informations. The default text alignment is NSRightTextAlignment</p> informations. The default text alignment is NSRightTextAlignment</p>
<p>See Also: -setTitleAlignment: [NSCell-setAlignment:]</p> <p>See Also: -setTitleAlignment: [NSCell-setAlignment:]</p>
*/ */
- (void) setTextAlignment: (int)aMode - (void) setTextAlignment: (NSTextAlignment)aMode
{ {
NSInteger i, count = [self numberOfRows]; NSInteger i, count = [self numberOfRows];

View file

@ -68,8 +68,8 @@ BOOL NSImageForceCaching = NO; /* use on missmatch */
if ((ext == nil) || [ext isEqualToString:@""]) if ((ext == nil) || [ext isEqualToString:@""])
{ {
NSArray *types = [NSImage imageUnfilteredFileTypes]; NSArray *types = [NSImage imageUnfilteredFileTypes];
unsigned c = [types count]; NSUInteger c = [types count];
unsigned i; NSUInteger i;
for (i = 0; path == nil && i < c; i++) for (i = 0; path == nil && i < c; i++)
{ {
@ -614,7 +614,7 @@ repd_for_rep(NSArray *_reps, NSImageRep *rep)
- (BOOL) isValid - (BOOL) isValid
{ {
BOOL valid = NO; BOOL valid = NO;
unsigned i, count; NSUInteger i, count;
if (_flags.syncLoad) if (_flags.syncLoad)
{ {
@ -645,7 +645,7 @@ repd_for_rep(NSArray *_reps, NSImageRep *rep)
- (void) recache - (void) recache
{ {
unsigned i; NSUInteger i;
i = [_reps count]; i = [_reps count];
while (i--) while (i--)
@ -709,7 +709,7 @@ repd_for_rep(NSArray *_reps, NSImageRep *rep)
- (void) compositeToPoint: (NSPoint)aPoint - (void) compositeToPoint: (NSPoint)aPoint
operation: (NSCompositingOperation)op operation: (NSCompositingOperation)op
fraction: (float)delta fraction: (CGFloat)delta
{ {
[self compositeToPoint: aPoint [self compositeToPoint: aPoint
fromRect: NSZeroRect fromRect: NSZeroRect
@ -720,7 +720,7 @@ repd_for_rep(NSArray *_reps, NSImageRep *rep)
- (void) compositeToPoint: (NSPoint)aPoint - (void) compositeToPoint: (NSPoint)aPoint
fromRect: (NSRect)srcRect fromRect: (NSRect)srcRect
operation: (NSCompositingOperation)op operation: (NSCompositingOperation)op
fraction: (float)delta fraction: (CGFloat)delta
{ {
NSGraphicsContext *ctxt = GSCurrentContext(); NSGraphicsContext *ctxt = GSCurrentContext();
@ -753,7 +753,7 @@ repd_for_rep(NSArray *_reps, NSImageRep *rep)
} }
} }
- (void) dissolveToPoint: (NSPoint)aPoint fraction: (float)aFloat - (void) dissolveToPoint: (NSPoint)aPoint fraction: (CGFloat)aFloat
{ {
[self dissolveToPoint: aPoint [self dissolveToPoint: aPoint
fromRect: NSZeroRect fromRect: NSZeroRect
@ -762,7 +762,7 @@ repd_for_rep(NSArray *_reps, NSImageRep *rep)
- (void) dissolveToPoint: (NSPoint)aPoint - (void) dissolveToPoint: (NSPoint)aPoint
fromRect: (NSRect)aRect fromRect: (NSRect)aRect
fraction: (float)aFloat fraction: (CGFloat)aFloat
{ {
[self compositeToPoint: aPoint [self compositeToPoint: aPoint
fromRect: aRect fromRect: aRect
@ -804,7 +804,7 @@ repd_for_rep(NSArray *_reps, NSImageRep *rep)
- (void) drawAtPoint: (NSPoint)point - (void) drawAtPoint: (NSPoint)point
fromRect: (NSRect)srcRect fromRect: (NSRect)srcRect
operation: (NSCompositingOperation)op operation: (NSCompositingOperation)op
fraction: (float)delta fraction: (CGFloat)delta
{ {
[self drawInRect: NSMakeRect(point.x, point.y, srcRect.size.width, srcRect.size.height) [self drawInRect: NSMakeRect(point.x, point.y, srcRect.size.width, srcRect.size.height)
fromRect: srcRect fromRect: srcRect
@ -817,7 +817,7 @@ repd_for_rep(NSArray *_reps, NSImageRep *rep)
- (void) drawInRect: (NSRect)dstRect - (void) drawInRect: (NSRect)dstRect
fromRect: (NSRect)srcRect fromRect: (NSRect)srcRect
operation: (NSCompositingOperation)op operation: (NSCompositingOperation)op
fraction: (float)delta fraction: (CGFloat)delta
{ {
[self drawInRect: dstRect [self drawInRect: dstRect
fromRect: srcRect fromRect: srcRect
@ -833,7 +833,7 @@ repd_for_rep(NSArray *_reps, NSImageRep *rep)
- (void) drawInRect: (NSRect)dstRect // Negative width/height => Nothing draws. - (void) drawInRect: (NSRect)dstRect // Negative width/height => Nothing draws.
fromRect: (NSRect)srcRect fromRect: (NSRect)srcRect
operation: (NSCompositingOperation)op operation: (NSCompositingOperation)op
fraction: (float)delta fraction: (CGFloat)delta
respectFlipped: (BOOL)respectFlipped respectFlipped: (BOOL)respectFlipped
hints: (NSDictionary*)hints hints: (NSDictionary*)hints
{ {
@ -918,7 +918,7 @@ repd_for_rep(NSArray *_reps, NSImageRep *rep)
- (void) addRepresentations: (NSArray *)imageRepArray - (void) addRepresentations: (NSArray *)imageRepArray
{ {
unsigned i, count; NSUInteger i, count;
GSRepData *repd; GSRepData *repd;
count = [imageRepArray count]; count = [imageRepArray count];
@ -933,7 +933,7 @@ repd_for_rep(NSArray *_reps, NSImageRep *rep)
- (void) removeRepresentation: (NSImageRep *)imageRep - (void) removeRepresentation: (NSImageRep *)imageRep
{ {
unsigned i; NSUInteger i;
GSRepData *repd; GSRepData *repd;
i = [_reps count]; i = [_reps count];
@ -1319,7 +1319,7 @@ static NSSize GSResolutionOfImageRep(NSImageRep *rep)
- (NSMutableArray *) _representationsWithCachedImages: (BOOL)flag - (NSMutableArray *) _representationsWithCachedImages: (BOOL)flag
{ {
unsigned count; NSUInteger count;
if (_flags.syncLoad) if (_flags.syncLoad)
{ {
@ -1337,7 +1337,7 @@ static NSSize GSResolutionOfImageRep(NSImageRep *rep)
else else
{ {
id repList[count]; id repList[count];
unsigned i, j; NSUInteger i, j;
[_reps getObjects: repList]; [_reps getObjects: repList];
j = 0; j = 0;
@ -2084,15 +2084,15 @@ iterate_reps_for_types(NSArray* imageReps, SEL method)
* for this image rep. If none is found create a cache to be used to * for this image rep. If none is found create a cache to be used to
* render the image rep into, and switch to the cached rep. * render the image rep into, and switch to the cached rep.
*/ */
unsigned count = [_reps count]; NSUInteger count = [_reps count];
if (count > 0) if (count > 0)
{ {
GSRepData *invalidCache = nil; GSRepData *invalidCache = nil;
GSRepData *partialCache = nil; GSRepData *partialCache = nil;
GSRepData *reps[count]; GSRepData *reps[count];
unsigned partialCount = 0; NSUInteger partialCount = 0;
unsigned i; NSUInteger i;
BOOL opaque = [rep isOpaque]; BOOL opaque = [rep isOpaque];
[_reps getObjects: reps]; [_reps getObjects: reps];
@ -2163,7 +2163,7 @@ iterate_reps_for_types(NSArray* imageReps, SEL method)
GSRepData *repd; GSRepData *repd;
NSSize imageSize = [self size]; NSSize imageSize = [self size];
NSSize repSize; NSSize repSize;
int pixelsWide, pixelsHigh; NSInteger pixelsWide, pixelsHigh;
if (rep != nil) if (rep != nil)
{ {

View file

@ -520,12 +520,12 @@ static Class imageClass;
[self setTitle: [title string]]; [self setTitle: [title string]];
} }
- (int)indentationLevel - (NSInteger)indentationLevel
{ {
return _indentation; return _indentation;
} }
- (void)setIndentationLevel: (int)level - (void)setIndentationLevel: (NSInteger)level
{ {
_indentation = level; _indentation = level;
} }

View file

@ -38,7 +38,7 @@
@implementation NSRulerMarker @implementation NSRulerMarker
- (id)initWithRulerView:(NSRulerView *)aRulerView - (id)initWithRulerView:(NSRulerView *)aRulerView
markerLocation:(float)location markerLocation:(CGFloat)location
image:(NSImage *)anImage image:(NSImage *)anImage
imageOrigin:(NSPoint)imageOrigin imageOrigin:(NSPoint)imageOrigin
{ {
@ -134,7 +134,7 @@
return NSZeroRect; return NSZeroRect;
} }
- (float)thicknessRequiredInRuler - (CGFloat)thicknessRequiredInRuler
{ {
NSSize size = [_image size]; NSSize size = [_image size];
@ -170,12 +170,12 @@
return _isRemovable; return _isRemovable;
} }
- (void)setMarkerLocation:(float)location - (void)setMarkerLocation:(CGFloat)location
{ {
_location = location; _location = location;
} }
- (float)markerLocation - (CGFloat)markerLocation
{ {
return _location; return _location;
} }
@ -234,7 +234,7 @@
NSPoint mousePositionInWindow; NSPoint mousePositionInWindow;
NSPoint previousMousePositionInWindow; NSPoint previousMousePositionInWindow;
NSPoint mouseOffset; NSPoint mouseOffset;
float location; CGFloat location;
NSRect drawRect; NSRect drawRect;
NSRect bounds = [_rulerView bounds]; NSRect bounds = [_rulerView bounds];
NSPoint drawPoint; NSPoint drawPoint;

View file

@ -71,24 +71,24 @@
{ {
NSString *_unitName; NSString *_unitName;
NSString *_abbreviation; NSString *_abbreviation;
float _conversionFactor; CGFloat _conversionFactor;
NSArray *_stepUpCycle; NSArray *_stepUpCycle;
NSArray *_stepDownCycle; NSArray *_stepDownCycle;
} }
+ (GSRulerUnit *) unitWithName: (NSString *)uName + (GSRulerUnit *) unitWithName: (NSString *)uName
abbreviation: (NSString *)abbrev abbreviation: (NSString *)abbrev
unitToPointsConversionFactor: (float)factor unitToPointsConversionFactor: (CGFloat)factor
stepUpCycle: (NSArray *)upCycle stepUpCycle: (NSArray *)upCycle
stepDownCycle: (NSArray *)downCycle; stepDownCycle: (NSArray *)downCycle;
- (id) initWithUnitName: (NSString *)uName - (id) initWithUnitName: (NSString *)uName
abbreviation: (NSString *)abbrev abbreviation: (NSString *)abbrev
unitToPointsConversionFactor: (float)factor unitToPointsConversionFactor: (CGFloat)factor
stepUpCycle: (NSArray *)upCycle stepUpCycle: (NSArray *)upCycle
stepDownCycle: (NSArray *)downCycle; stepDownCycle: (NSArray *)downCycle;
- (NSString *) unitName; - (NSString *) unitName;
- (NSString *) abbreviation; - (NSString *) abbreviation;
- (float) conversionFactor; - (CGFloat) conversionFactor;
- (NSArray *) stepUpCycle; - (NSArray *) stepUpCycle;
- (NSArray *) stepDownCycle; - (NSArray *) stepDownCycle;
@ -98,7 +98,7 @@ unitToPointsConversionFactor: (float)factor
+ (GSRulerUnit *) unitWithName: (NSString *)uName + (GSRulerUnit *) unitWithName: (NSString *)uName
abbreviation: (NSString *)abbrev abbreviation: (NSString *)abbrev
unitToPointsConversionFactor: (float)factor unitToPointsConversionFactor: (CGFloat)factor
stepUpCycle: (NSArray *)upCycle stepUpCycle: (NSArray *)upCycle
stepDownCycle: (NSArray *)downCycle stepDownCycle: (NSArray *)downCycle
{ {
@ -111,7 +111,7 @@ unitToPointsConversionFactor: (float)factor
- (id) initWithUnitName: (NSString *)uName - (id) initWithUnitName: (NSString *)uName
abbreviation: (NSString *)abbrev abbreviation: (NSString *)abbrev
unitToPointsConversionFactor: (float)factor unitToPointsConversionFactor: (CGFloat)factor
stepUpCycle: (NSArray *)upCycle stepUpCycle: (NSArray *)upCycle
stepDownCycle: (NSArray *)downCycle stepDownCycle: (NSArray *)downCycle
{ {
@ -138,7 +138,7 @@ unitToPointsConversionFactor: (float)factor
return _abbreviation; return _abbreviation;
} }
- (float) conversionFactor - (CGFloat) conversionFactor
{ {
return _conversionFactor; return _conversionFactor;
} }
@ -242,7 +242,7 @@ static NSMutableDictionary *units = nil;
+ (void) registerUnitWithName: (NSString *)uName + (void) registerUnitWithName: (NSString *)uName
abbreviation: (NSString *)abbreviation abbreviation: (NSString *)abbreviation
unitToPointsConversionFactor: (float)conversionFactor unitToPointsConversionFactor: (CGFloat)conversionFactor
stepUpCycle: (NSArray *)stepUpCycle stepUpCycle: (NSArray *)stepUpCycle
stepDownCycle: (NSArray *)stepDownCycle stepDownCycle: (NSArray *)stepDownCycle
{ {
@ -312,13 +312,13 @@ static NSMutableDictionary *units = nil;
return _accessoryView; return _accessoryView;
} }
- (void) setOriginOffset: (float)offset - (void) setOriginOffset: (CGFloat)offset
{ {
_originOffset = offset; _originOffset = offset;
[self invalidateHashMarks]; [self invalidateHashMarks];
} }
- (float) originOffset - (CGFloat) originOffset
{ {
return _originOffset; return _originOffset;
} }
@ -327,7 +327,7 @@ static NSMutableDictionary *units = nil;
{ {
NSEnumerator *en; NSEnumerator *en;
NSRulerMarker *marker; NSRulerMarker *marker;
float maxThickness = _reservedThicknessForMarkers; CGFloat maxThickness = _reservedThicknessForMarkers;
if (_markers == nil) if (_markers == nil)
{ {
@ -336,7 +336,7 @@ static NSMutableDictionary *units = nil;
en = [_markers objectEnumerator]; en = [_markers objectEnumerator];
while ((marker = [en nextObject]) != nil) while ((marker = [en nextObject]) != nil)
{ {
float markerThickness; CGFloat markerThickness;
markerThickness = [marker thicknessRequiredInRuler]; markerThickness = [marker thicknessRequiredInRuler];
if (markerThickness > maxThickness) if (markerThickness > maxThickness)
{ {
@ -375,7 +375,7 @@ static NSMutableDictionary *units = nil;
- (void) addMarker: (NSRulerMarker *)aMarker - (void) addMarker: (NSRulerMarker *)aMarker
{ {
float markerThickness = [aMarker thicknessRequiredInRuler]; CGFloat markerThickness = [aMarker thicknessRequiredInRuler];
if (_clientView == nil) if (_clientView == nil)
{ {
@ -506,8 +506,8 @@ static NSMutableDictionary *units = nil;
} }
} }
- (void) moveRulerlineFromLocation: (float)oldLoc - (void) moveRulerlineFromLocation: (CGFloat)oldLoc
toLocation: (float)newLoc toLocation: (CGFloat)newLoc
{ {
/* FIXME/TODO: not implemented */ /* FIXME/TODO: not implemented */
} }
@ -544,8 +544,8 @@ static NSMutableDictionary *units = nil;
if (! _cacheIsValid) if (! _cacheIsValid)
{ {
NSSize unitSize; NSSize unitSize;
float cf; CGFloat cf;
int convIndex; int convIndex;
/* calculate the size one unit in document view has in the ruler */ /* calculate the size one unit in document view has in the ruler */
cf = [_unit conversionFactor]; cf = [_unit conversionFactor];
@ -619,18 +619,18 @@ static NSMutableDictionary *units = nil;
NSRect docBounds; NSRect docBounds;
NSRect baselineRect; NSRect baselineRect;
NSRect visibleBaselineRect; NSRect visibleBaselineRect;
float firstBaselineLocation; CGFloat firstBaselineLocation;
float firstVisibleLocation; CGFloat firstVisibleLocation;
float lastVisibleLocation; CGFloat lastVisibleLocation;
int firstVisibleMark; int firstVisibleMark;
int lastVisibleMark; int lastVisibleMark;
int mark; int mark;
int firstVisibleLabel; int firstVisibleLabel;
int lastVisibleLabel; int lastVisibleLabel;
int label; int label;
float baselineLocation = [self baselineLocation]; CGFloat baselineLocation = [self baselineLocation];
NSPoint zeroPoint; NSPoint zeroPoint;
float zeroLocation; CGFloat zeroLocation;
NSBezierPath *path; NSBezierPath *path;
NSFont *font = [NSFont systemFontOfSize: [NSFont smallSystemFontSize]]; NSFont *font = [NSFont systemFontOfSize: [NSFont smallSystemFontSize]];
NSDictionary *attr = [[NSDictionary alloc] NSDictionary *attr = [[NSDictionary alloc]
@ -692,7 +692,7 @@ static NSMutableDictionary *units = nil;
for (mark = firstVisibleMark; mark <= lastVisibleMark; mark++) for (mark = firstVisibleMark; mark <= lastVisibleMark; mark++)
{ {
float markLocation; CGFloat markLocation;
markLocation = zeroLocation + mark * _markDistance; markLocation = zeroLocation + mark * _markDistance;
if (_orientation == NSHorizontalRuler) if (_orientation == NSHorizontalRuler)
@ -742,7 +742,8 @@ static NSMutableDictionary *units = nil;
for (label = firstVisibleLabel; label <= lastVisibleLabel; label++) for (label = firstVisibleLabel; label <= lastVisibleLabel; label++)
{ {
float labelLocation = zeroLocation + label * _marksToLabel * _markDistance; CGFloat labelLocation = zeroLocation + label * _marksToLabel * _markDistance;
// This has to be a float or we need to change the label format
float labelValue = (labelLocation - zeroLocation) / _unitToRuler; float labelValue = (labelLocation - zeroLocation) / _unitToRuler;
NSString *labelString = [NSString stringWithFormat: _labelFormat, labelValue]; NSString *labelString = [NSString stringWithFormat: _labelFormat, labelValue];
NSSize size = [labelString sizeWithAttributes: attr]; NSSize size = [labelString sizeWithAttributes: attr];
@ -803,53 +804,52 @@ static NSMutableDictionary *units = nil;
return _orientation; return _orientation;
} }
- (void) setReservedThicknessForAccessoryView: (float)thickness - (void) setReservedThicknessForAccessoryView: (CGFloat)thickness
{ {
_reservedThicknessForAccessoryView = thickness; _reservedThicknessForAccessoryView = thickness;
[_scrollView tile]; [_scrollView tile];
} }
- (float) reservedThicknessForAccessoryView - (CGFloat) reservedThicknessForAccessoryView
{ {
return _reservedThicknessForAccessoryView; return _reservedThicknessForAccessoryView;
} }
- (void) setReservedThicknessForMarkers: (float)thickness - (void) setReservedThicknessForMarkers: (CGFloat)thickness
{ {
_reservedThicknessForMarkers = thickness; _reservedThicknessForMarkers = thickness;
[_scrollView tile]; [_scrollView tile];
} }
- (float) reservedThicknessForMarkers - (CGFloat) reservedThicknessForMarkers
{ {
return _reservedThicknessForMarkers; return _reservedThicknessForMarkers;
} }
- (void) setRuleThickness: (float)thickness - (void) setRuleThickness: (CGFloat)thickness
{ {
_ruleThickness = thickness; _ruleThickness = thickness;
[_scrollView tile]; [_scrollView tile];
} }
- (float) ruleThickness - (CGFloat) ruleThickness
{ {
return _ruleThickness; return _ruleThickness;
} }
- (float) requiredThickness - (CGFloat) requiredThickness
{ {
return [self ruleThickness] return [self ruleThickness]
+ [self reservedThicknessForAccessoryView] + [self reservedThicknessForAccessoryView]
+ [self reservedThicknessForMarkers]; + [self reservedThicknessForMarkers];
} }
- (float) baselineLocation - (CGFloat) baselineLocation
{ {
return [self reservedThicknessForAccessoryView] return [self reservedThicknessForAccessoryView]
+ [self reservedThicknessForMarkers]; + [self reservedThicknessForMarkers];
} }
/* FIXME ... we cache isFlipped in NSView. */
- (BOOL) isFlipped - (BOOL) isFlipped
{ {
if (_orientation == NSVerticalRuler) if (_orientation == NSVerticalRuler)
@ -859,13 +859,13 @@ static NSMutableDictionary *units = nil;
return YES; return YES;
} }
- (void)encodeWithCoder:(NSCoder *)encoder - (void) encodeWithCoder: (NSCoder *)encoder
{ {
/* FIXME/TODO: not implemented */ /* FIXME/TODO: not implemented */
return; return;
} }
- (id)initWithCoder:(NSCoder *)decoder - (id) initWithCoder: (NSCoder *)decoder
{ {
/* FIXME/TODO: not implemented */ /* FIXME/TODO: not implemented */
return nil; return nil;

View file

@ -41,7 +41,7 @@
BOOL _selected; BOOL _selected;
BOOL _enabled; BOOL _enabled;
NSInteger _tag; NSInteger _tag;
float _width; CGFloat _width;
NSMenu *_menu; NSMenu *_menu;
NSString *_label; NSString *_label;
NSString *_tool_tip; NSString *_tool_tip;
@ -63,8 +63,8 @@
- (void) setImage: (NSImage *)image; - (void) setImage: (NSImage *)image;
- (NSInteger) tag; - (NSInteger) tag;
- (void) setTag: (NSInteger)tag; - (void) setTag: (NSInteger)tag;
- (float) width; - (CGFloat) width;
- (void) setWidth: (float)width; - (void) setWidth: (CGFloat)width;
- (NSRect) frame; - (NSRect) frame;
- (void) setFrame: (NSRect)frame; - (void) setFrame: (NSRect)frame;
@end @end
@ -162,12 +162,12 @@
_tag = tag; _tag = tag;
} }
- (float) width - (CGFloat) width
{ {
return _width; return _width;
} }
- (void) setWidth: (float)width - (void) setWidth: (CGFloat)width
{ {
_width = width; _width = width;
} }
@ -318,9 +318,9 @@
} }
// Specifying number of segments... // Specifying number of segments...
- (void) setSegmentCount: (int)count - (void) setSegmentCount: (NSInteger)count
{ {
int size; NSInteger size;
if ((count < 0) || (count > 2048)) if ((count < 0) || (count > 2048))
{ {
@ -340,23 +340,23 @@
} }
} }
- (int) segmentCount - (NSInteger) segmentCount
{ {
return [_items count]; return [_items count];
} }
// Specifying selected segment... // Specifying selected segment...
- (void) setSelectedSegment: (int)segment - (void) setSelectedSegment: (NSInteger)segment
{ {
[self setSelected: YES forSegment: segment]; [self setSelected: YES forSegment: segment];
} }
- (void) setSelected: (BOOL)flag forSegment: (int)seg - (void) setSelected: (BOOL)flag forSegment: (NSInteger)seg
{ {
NSSegmentItem *segment = [_items objectAtIndex: seg]; NSSegmentItem *segment = [_items objectAtIndex: seg];
NSSegmentItem *previous = nil; NSSegmentItem *previous = nil;
if(_selected_segment != -1) if (_selected_segment != -1)
{ {
previous = [_items objectAtIndex: _selected_segment]; previous = [_items objectAtIndex: _selected_segment];
if(_segmentCellFlags._tracking_mode == NSSegmentSwitchTrackingSelectOne) if(_segmentCellFlags._tracking_mode == NSSegmentSwitchTrackingSelectOne)
@ -365,7 +365,7 @@
} }
} }
if([segment isEnabled]) if ([segment isEnabled])
{ {
[segment setSelected: flag]; [segment setSelected: flag];
if (flag) if (flag)
@ -379,16 +379,16 @@
} }
} }
- (int) selectedSegment - (NSInteger) selectedSegment
{ {
return _selected_segment; return _selected_segment;
} }
- (void) selectSegmentWithTag: (int)tag - (void) selectSegmentWithTag: (NSInteger)tag
{ {
NSEnumerator *en = [_items objectEnumerator]; NSEnumerator *en = [_items objectEnumerator];
id o = nil; id o = nil;
int segment = 0; NSInteger segment = 0;
while ((o = [en nextObject]) != nil) while ((o = [en nextObject]) != nil)
{ {
@ -404,7 +404,7 @@
- (void) makeNextSegmentKey - (void) makeNextSegmentKey
{ {
int next; NSInteger next;
if (_selected_segment < [_items count]) if (_selected_segment < [_items count])
{ {
@ -420,7 +420,7 @@
- (void) makePreviousSegmentKey - (void) makePreviousSegmentKey
{ {
int prev; NSInteger prev;
if (_selected_segment > 0) if (_selected_segment > 0)
{ {
@ -448,98 +448,98 @@
// Working with individual segments... // Working with individual segments...
- (void) setWidth: (float)width forSegment: (int)seg - (void) setWidth: (CGFloat)width forSegment: (NSInteger)seg
{ {
id segment = [_items objectAtIndex: seg]; id segment = [_items objectAtIndex: seg];
[segment setWidth: width]; [segment setWidth: width];
} }
- (float) widthForSegment: (int)seg - (CGFloat) widthForSegment: (NSInteger)seg
{ {
id segment = [_items objectAtIndex: seg]; id segment = [_items objectAtIndex: seg];
return [segment width]; return [segment width];
} }
- (void) setImage: (NSImage *)image forSegment: (int)seg - (void) setImage: (NSImage *)image forSegment: (NSInteger)seg
{ {
id segment = [_items objectAtIndex: seg]; id segment = [_items objectAtIndex: seg];
[segment setImage: image]; [segment setImage: image];
} }
- (NSImage *) imageForSegment: (int)seg - (NSImage *) imageForSegment: (NSInteger)seg
{ {
id segment = [_items objectAtIndex: seg]; id segment = [_items objectAtIndex: seg];
return [segment image]; return [segment image];
} }
- (void) setLabel: (NSString *)label forSegment: (int)seg - (void) setLabel: (NSString *)label forSegment: (NSInteger)seg
{ {
id segment = [_items objectAtIndex: seg]; id segment = [_items objectAtIndex: seg];
[segment setLabel: label]; [segment setLabel: label];
} }
- (NSString *) labelForSegment: (int)seg - (NSString *) labelForSegment: (NSInteger)seg
{ {
id segment = [_items objectAtIndex: seg]; id segment = [_items objectAtIndex: seg];
return [segment label]; return [segment label];
} }
- (BOOL) isSelectedForSegment: (int)seg - (BOOL) isSelectedForSegment: (NSInteger)seg
{ {
id segment = [_items objectAtIndex: seg]; id segment = [_items objectAtIndex: seg];
return [segment isSelected]; return [segment isSelected];
} }
- (void) setEnabled: (BOOL)flag forSegment: (int)seg - (void) setEnabled: (BOOL)flag forSegment: (NSInteger)seg
{ {
id segment = [_items objectAtIndex: seg]; id segment = [_items objectAtIndex: seg];
return [segment setEnabled: flag]; return [segment setEnabled: flag];
} }
- (BOOL) isEnabledForSegment: (int)seg - (BOOL) isEnabledForSegment: (NSInteger)seg
{ {
id segment = [_items objectAtIndex: seg]; id segment = [_items objectAtIndex: seg];
return [segment isEnabled]; return [segment isEnabled];
} }
- (void) setMenu: (NSMenu *)menu forSegment: (int)seg - (void) setMenu: (NSMenu *)menu forSegment: (NSInteger)seg
{ {
id segment = [_items objectAtIndex: seg]; id segment = [_items objectAtIndex: seg];
return [segment setMenu: menu]; return [segment setMenu: menu];
} }
- (NSMenu *) menuForSegment: (int)seg - (NSMenu *) menuForSegment: (NSInteger)seg
{ {
id segment = [_items objectAtIndex: seg]; id segment = [_items objectAtIndex: seg];
return [segment menu]; return [segment menu];
} }
- (void) setToolTip: (NSString *) toolTip forSegment: (int)seg - (void) setToolTip: (NSString *) toolTip forSegment: (NSInteger)seg
{ {
id segment = [_items objectAtIndex: seg]; id segment = [_items objectAtIndex: seg];
return [segment setToolTip: toolTip]; return [segment setToolTip: toolTip];
} }
- (NSString *) toolTipForSegment: (int)seg - (NSString *) toolTipForSegment: (NSInteger)seg
{ {
id segment = [_items objectAtIndex: seg]; id segment = [_items objectAtIndex: seg];
return [segment toolTip]; return [segment toolTip];
} }
- (void) setTag: (int)tag forSegment: (int)seg - (void) setTag: (NSInteger)tag forSegment: (NSInteger)seg
{ {
id segment = [_items objectAtIndex: seg]; id segment = [_items objectAtIndex: seg];
return [segment setTag: tag]; return [segment setTag: tag];
} }
- (int) tagForSegment: (int)seg - (NSInteger) tagForSegment: (NSInteger)seg
{ {
id segment = [_items objectAtIndex: seg]; id segment = [_items objectAtIndex: seg];
return [segment tag]; return [segment tag];
} }
// Drawing custom content // Drawing custom content
- (void) drawSegment: (int)seg - (void) drawSegment: (NSInteger)seg
inFrame: (NSRect)frame inFrame: (NSRect)frame
withView: (NSView *)view withView: (NSView *)view
{ {
@ -547,7 +547,7 @@
NSString *label = [segment label]; NSString *label = [segment label];
NSSize textSize = [label sizeWithAttributes: [NSDictionary dictionary]]; NSSize textSize = [label sizeWithAttributes: [NSDictionary dictionary]];
NSRect textFrame = frame; NSRect textFrame = frame;
float x_offset = (frame.size.width - textSize.width) / 2; CGFloat x_offset = (frame.size.width - textSize.width) / 2;
GSThemeControlState state = GSThemeNormalState; GSThemeControlState state = GSThemeNormalState;
BOOL roundedLeft = NO; BOOL roundedLeft = NO;
BOOL roundedRight = NO; BOOL roundedRight = NO;
@ -580,8 +580,8 @@
- (void) drawInteriorWithFrame: (NSRect)cellFrame - (void) drawInteriorWithFrame: (NSRect)cellFrame
inView: (NSView*)controlView inView: (NSView*)controlView
{ {
int i; NSInteger i;
unsigned int count = [_items count]; NSUInteger count = [_items count];
NSRect frame = cellFrame; NSRect frame = cellFrame;
NSRect controlFrame = [controlView frame]; NSRect controlFrame = [controlView frame];
@ -601,12 +601,12 @@
} }
// Setting the style of the segments // Setting the style of the segments
- (void)setSegmentStyle:(NSSegmentStyle)style - (void) setSegmentStyle: (NSSegmentStyle)style
{ {
_segmentCellFlags._style = style; _segmentCellFlags._style = style;
} }
- (NSSegmentStyle)segmentStyle - (NSSegmentStyle) segmentStyle
{ {
return _segmentCellFlags._style; return _segmentCellFlags._style;
} }
@ -649,7 +649,7 @@
else else
_items = [[NSMutableArray alloc] initWithCapacity: 2]; _items = [[NSMutableArray alloc] initWithCapacity: 2];
for (i=0; i<[_items count]; i++) for (i = 0; i < [_items count]; i++)
{ {
if ([self isSelectedForSegment: i]) if ([self isSelectedForSegment: i])
_selected_segment = i; _selected_segment = i;
@ -684,15 +684,15 @@
inView: (NSView*)controlView inView: (NSView*)controlView
mouseIsUp: (BOOL)flag mouseIsUp: (BOOL)flag
{ {
int count = [self segmentCount]; NSInteger count = [self segmentCount];
int i = 0; NSInteger i = 0;
[super stopTracking: lastPoint [super stopTracking: lastPoint
at: stopPoint at: stopPoint
inView: controlView inView: controlView
mouseIsUp: (BOOL)flag]; mouseIsUp: (BOOL)flag];
for(i = 0; i < count; i++) for (i = 0; i < count; i++)
{ {
id segment = [_items objectAtIndex: i]; id segment = [_items objectAtIndex: i];
NSRect frame = [segment frame]; NSRect frame = [segment frame];

View file

@ -47,99 +47,99 @@ static Class segmentedControlCellClass;
} }
// Specifying number of segments... // Specifying number of segments...
- (void) setSegmentCount: (int) count - (void) setSegmentCount: (NSInteger) count
{ {
[_cell setSegmentCount: count]; [_cell setSegmentCount: count];
} }
- (int) segmentCount - (NSInteger) segmentCount
{ {
return [_cell segmentCount]; return [_cell segmentCount];
} }
// Specifying selected segment... // Specifying selected segment...
- (void) setSelectedSegment: (int) segment - (void) setSelectedSegment: (NSInteger) segment
{ {
[_cell setSelectedSegment: segment]; [_cell setSelectedSegment: segment];
} }
- (int) selectedSegment - (NSInteger) selectedSegment
{ {
return [_cell selectedSegment]; return [_cell selectedSegment];
} }
- (void) selectSegmentWithTag: (int) tag - (void) selectSegmentWithTag: (NSInteger) tag
{ {
[_cell selectSegmentWithTag: tag]; [_cell selectSegmentWithTag: tag];
} }
// Working with individual segments... // Working with individual segments...
- (void) setWidth: (float)width forSegment: (int)segment - (void) setWidth: (CGFloat)width forSegment: (NSInteger)segment
{ {
[_cell setWidth: width forSegment: segment]; [_cell setWidth: width forSegment: segment];
} }
- (float) widthForSegment: (int)segment - (CGFloat) widthForSegment: (NSInteger)segment
{ {
return [_cell widthForSegment: segment]; return [_cell widthForSegment: segment];
} }
- (void) setImage: (NSImage *)image forSegment: (int)segment - (void) setImage: (NSImage *)image forSegment: (NSInteger)segment
{ {
[_cell setImage: image forSegment: segment]; [_cell setImage: image forSegment: segment];
} }
- (NSImage *) imageForSegment: (int)segment - (NSImage *) imageForSegment: (NSInteger)segment
{ {
return [_cell imageForSegment: segment]; return [_cell imageForSegment: segment];
} }
- (void) setLabel: (NSString *)label forSegment: (int)segment - (void) setLabel: (NSString *)label forSegment: (NSInteger)segment
{ {
[_cell setLabel: label forSegment: segment]; [_cell setLabel: label forSegment: segment];
} }
- (NSString *) labelForSegment: (int)segment - (NSString *) labelForSegment: (NSInteger)segment
{ {
return [_cell labelForSegment: segment]; return [_cell labelForSegment: segment];
} }
- (void) setMenu: (NSMenu *)menu forSegment: (int)segment - (void) setMenu: (NSMenu *)menu forSegment: (NSInteger)segment
{ {
[_cell setMenu: menu forSegment: segment]; [_cell setMenu: menu forSegment: segment];
} }
- (NSMenu *) menuForSegment: (int)segment - (NSMenu *) menuForSegment: (NSInteger)segment
{ {
return [_cell menuForSegment: segment]; return [_cell menuForSegment: segment];
} }
- (void) setSelected: (BOOL)flag forSegment: (int)segment - (void) setSelected: (BOOL)flag forSegment: (NSInteger)segment
{ {
[_cell setSelected: flag forSegment: segment]; [_cell setSelected: flag forSegment: segment];
} }
- (BOOL) isSelectedForSegment: (int)segment - (BOOL) isSelectedForSegment: (NSInteger)segment
{ {
return [_cell isSelectedForSegment: segment]; return [_cell isSelectedForSegment: segment];
} }
- (void) setEnabled: (BOOL)flag forSegment: (int)segment - (void) setEnabled: (BOOL)flag forSegment: (NSInteger)segment
{ {
[_cell setEnabled: flag forSegment: segment]; [_cell setEnabled: flag forSegment: segment];
} }
- (BOOL) isEnabledForSegment: (int)segment - (BOOL) isEnabledForSegment: (NSInteger)segment
{ {
return [_cell isEnabledForSegment: segment]; return [_cell isEnabledForSegment: segment];
} }
- (void)setSegmentStyle:(NSSegmentStyle)style - (void) setSegmentStyle: (NSSegmentStyle)style
{ {
[_cell setSegmentStyle: style]; [_cell setSegmentStyle: style];
} }
- (NSSegmentStyle)segmentStyle - (NSSegmentStyle) segmentStyle
{ {
return [_cell segmentStyle]; return [_cell segmentStyle];
} }

View file

@ -554,7 +554,7 @@ static NSSize scaledIconSizeForSize(NSSize imageSize)
location = [_window mouseLocationOutsideOfEventStream]; location = [_window mouseLocationOutsideOfEventStream];
if (NSEqualPoints(location, lastLocation) == NO) if (NSEqualPoints(location, lastLocation) == NO)
{ {
NSPoint origin = [_window frame].origin; NSPoint origin = [_window frame].origin;
origin.x += (location.x - lastLocation.x); origin.x += (location.x - lastLocation.x);
origin.y += (location.y - lastLocation.y); origin.y += (location.y - lastLocation.y);
@ -729,7 +729,7 @@ static NSNotificationCenter *nc = nil;
styleMask: aStyle]; styleMask: aStyle];
} }
+ (float) minFrameWidthWithTitle: (NSString *)aTitle + (CGFloat) minFrameWidthWithTitle: (NSString *)aTitle
styleMask: (NSUInteger)aStyle styleMask: (NSUInteger)aStyle
{ {
if (!windowDecorator) if (!windowDecorator)
@ -1156,11 +1156,11 @@ many times.
- (id) initWithWindowRef: (void *)windowRef - (id) initWithWindowRef: (void *)windowRef
{ {
NSRect contentRect; NSRect contentRect;
unsigned aStyle; unsigned int aStyle;
NSBackingStoreType bufferingType; NSBackingStoreType bufferingType;
NSScreen* aScreen; NSScreen* aScreen;
int screen; int screen;
int winNum; NSInteger winNum;
GSDisplayServer *srv = GSCurrentServer(); GSDisplayServer *srv = GSCurrentServer();
// Get the properties for the underlying window // Get the properties for the underlying window
@ -1337,7 +1337,7 @@ titleWithRepresentedFilename(NSString *representedFilename)
// FIXME // FIXME
} }
- (void) setAlphaValue: (float)windowAlpha - (void) setAlphaValue: (CGFloat)windowAlpha
{ {
_alphaValue = windowAlpha; _alphaValue = windowAlpha;
if (_windowNum) if (_windowNum)
@ -1346,7 +1346,7 @@ titleWithRepresentedFilename(NSString *representedFilename)
} }
} }
- (float) alphaValue - (CGFloat) alphaValue
{ {
return _alphaValue; return _alphaValue;
} }
@ -1380,7 +1380,7 @@ titleWithRepresentedFilename(NSString *representedFilename)
return _context; return _context;
} }
- (float) userSpaceScaleFactor - (CGFloat) userSpaceScaleFactor
{ {
if (_styleMask & NSUnscaledWindowMask) if (_styleMask & NSUnscaledWindowMask)
{ {
@ -2102,7 +2102,7 @@ titleWithRepresentedFilename(NSString *representedFilename)
- (NSRect) constrainFrameRect: (NSRect)frameRect toScreen: (NSScreen*)screen - (NSRect) constrainFrameRect: (NSRect)frameRect toScreen: (NSScreen*)screen
{ {
NSRect screenRect = [screen visibleFrame]; NSRect screenRect = [screen visibleFrame];
float difference; CGFloat difference;
/* Move top edge of the window inside the screen */ /* Move top edge of the window inside the screen */
difference = NSMaxY (frameRect) - NSMaxY (screenRect); difference = NSMaxY (frameRect) - NSMaxY (screenRect);
@ -3968,8 +3968,8 @@ resetCursorRectsForView(NSView *theView)
switch (sub) switch (sub)
{ {
case GSAppKitWindowMoved: case GSAppKitWindowMoved:
_frame.origin.x = (float)[theEvent data1]; _frame.origin.x = (CGFloat)[theEvent data1];
_frame.origin.y = (float)[theEvent data2]; _frame.origin.y = (CGFloat)[theEvent data2];
NSDebugLLog(@"Moving", @"Move event: %d %@", NSDebugLLog(@"Moving", @"Move event: %d %@",
(int)_windowNum, NSStringFromPoint(_frame.origin)); (int)_windowNum, NSStringFromPoint(_frame.origin));
if (_autosaveName != nil) if (_autosaveName != nil)
@ -4705,14 +4705,14 @@ current key view.<br />
// if toolbar is showing, adjust saved frame to add the toolbar back in // if toolbar is showing, adjust saved frame to add the toolbar back in
if ([_toolbar isVisible]) if ([_toolbar isVisible])
{ {
float toolbarHeight = [[_toolbar _toolbarView] frame].size.height; CGFloat toolbarHeight = [[_toolbar _toolbarView] frame].size.height;
fRect.size.height += toolbarHeight; fRect.size.height += toolbarHeight;
fRect.origin.y -= toolbarHeight; fRect.origin.y -= toolbarHeight;
} }
// if window has a menu, adjust saved frame to add the menu back in // if window has a menu, adjust saved frame to add the menu back in
if ([_wv hasMenu]) if ([_wv hasMenu])
{ {
float menuBarHeight = [[GSTheme theme] menuHeightForWindow: self]; CGFloat menuBarHeight = [[GSTheme theme] menuHeightForWindow: self];
fRect.size.height += menuBarHeight; fRect.size.height += menuBarHeight;
fRect.origin.y -= menuBarHeight; fRect.origin.y -= menuBarHeight;
} }
@ -4860,14 +4860,14 @@ current key view.<br />
// if toolbar is showing, adjust saved frame to not include the toolbar // if toolbar is showing, adjust saved frame to not include the toolbar
if ([_toolbar isVisible]) if ([_toolbar isVisible])
{ {
float toolbarHeight = [[_toolbar _toolbarView] frame].size.height; CGFloat toolbarHeight = [[_toolbar _toolbarView] frame].size.height;
fRect.size.height -= toolbarHeight; fRect.size.height -= toolbarHeight;
fRect.origin.y += toolbarHeight; fRect.origin.y += toolbarHeight;
} }
// if window has a menu, adjust saved frame to not include the menu // if window has a menu, adjust saved frame to not include the menu
if ([_wv hasMenu]) if ([_wv hasMenu])
{ {
float menuBarHeight = [[GSTheme theme] menuHeightForWindow: self]; CGFloat menuBarHeight = [[GSTheme theme] menuHeightForWindow: self];
fRect.size.height -= menuBarHeight; fRect.size.height -= menuBarHeight;
fRect.origin.y += menuBarHeight; fRect.origin.y += menuBarHeight;
} }