mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-04-22 16:10:48 +00:00
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:
parent
e4e5428122
commit
270baf4037
22 changed files with 391 additions and 368 deletions
31
ChangeLog
31
ChangeLog
|
@ -1,10 +1,35 @@
|
|||
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>
|
||||
|
||||
* Headers/AppKit/NSTableView.h
|
||||
* Source/NSTableView.m
|
||||
* Source/NSTableView.m
|
||||
* Source/NSOutline.m
|
||||
(-_dataCellForTableColumn:row:, -preparedCellAtColumn:row:):
|
||||
Replaced _dataCellForTableColumn:row: by -preparedCellAtColumn:row:
|
||||
(-_dataCellForTableColumn:row:, -preparedCellAtColumn:row:):
|
||||
Replaced _dataCellForTableColumn:row: by -preparedCellAtColumn:row:
|
||||
new public method from Mac OS X 10.5.
|
||||
|
||||
2013-02-14 Fred Kiefer <FredKiefer@gmx.de>
|
||||
|
|
|
@ -40,8 +40,8 @@
|
|||
styleMask: (NSUInteger)aStyle;
|
||||
- (NSRect) frameRectForContentRect: (NSRect)aRect
|
||||
styleMask: (NSUInteger)aStyle;
|
||||
- (float) minFrameWidthWithTitle: (NSString *)aTitle
|
||||
styleMask: (NSUInteger)aStyle;
|
||||
- (CGFloat) minFrameWidthWithTitle: (NSString *)aTitle
|
||||
styleMask: (NSUInteger)aStyle;
|
||||
@end
|
||||
|
||||
|
||||
|
@ -70,7 +70,7 @@ this, either directly, or indirectly (by using the backend).
|
|||
styleMask: (NSUInteger)aStyle;
|
||||
|
||||
- (void) layout;
|
||||
- (void) changeWindowHeight: (float)difference;
|
||||
- (void) changeWindowHeight: (CGFloat)difference;
|
||||
|
||||
- (void) setBackgroundColor: (NSColor *)color;
|
||||
- (void) setContentView: (NSView *)contentView;
|
||||
|
|
|
@ -125,17 +125,17 @@ APPKIT_EXPORT NSString *NSImageEXIFData; // No GNUstep support yet; for reading
|
|||
@interface NSBitmapImageRep : NSImageRep
|
||||
{
|
||||
// Attributes
|
||||
unsigned int _bytesPerRow;
|
||||
unsigned int _numColors;
|
||||
unsigned int _bitsPerPixel;
|
||||
unsigned short _compression;
|
||||
float _comp_factor;
|
||||
NSMutableDictionary *_properties;
|
||||
BOOL _isPlanar;
|
||||
unsigned char **_imagePlanes;
|
||||
NSData *_imageData;
|
||||
NSInteger _bytesPerRow;
|
||||
NSInteger _numColors;
|
||||
NSInteger _bitsPerPixel;
|
||||
unsigned short _compression;
|
||||
float _comp_factor;
|
||||
NSMutableDictionary *_properties;
|
||||
BOOL _isPlanar;
|
||||
unsigned char **_imagePlanes;
|
||||
NSData *_imageData;
|
||||
#if OS_API_VERSION(MAC_OS_X_VERSION_10_4, GS_API_LATEST)
|
||||
NSBitmapFormat _format;
|
||||
NSBitmapFormat _format;
|
||||
#else
|
||||
unsigned int _format;
|
||||
#endif
|
||||
|
@ -149,18 +149,18 @@ APPKIT_EXPORT NSString *NSImageEXIFData; // No GNUstep support yet; for reading
|
|||
- (id) initWithData: (NSData*)imageData;
|
||||
- (id) initWithFocusedViewRect: (NSRect)rect;
|
||||
- (id) initWithBitmapDataPlanes: (unsigned char**)planes
|
||||
pixelsWide: (int)width
|
||||
pixelsHigh: (int)height
|
||||
bitsPerSample: (int)bitsPerSample
|
||||
samplesPerPixel: (int)samplesPerPixel
|
||||
pixelsWide: (NSInteger)width
|
||||
pixelsHigh: (NSInteger)height
|
||||
bitsPerSample: (NSInteger)bitsPerSample
|
||||
samplesPerPixel: (NSInteger)samplesPerPixel
|
||||
hasAlpha: (BOOL)alpha
|
||||
isPlanar: (BOOL)isPlanar
|
||||
colorSpaceName: (NSString*)colorSpaceName
|
||||
bytesPerRow: (int)rowBytes
|
||||
bitsPerPixel: (int)pixelBits;
|
||||
bytesPerRow: (NSInteger)rowBytes
|
||||
bitsPerPixel: (NSInteger)pixelBits;
|
||||
|
||||
#if OS_API_VERSION(GS_API_MACOSX, GS_API_LATEST)
|
||||
- (void)colorizeByMappingGray:(float)midPoint
|
||||
- (void)colorizeByMappingGray:(CGFloat)midPoint
|
||||
toColor:(NSColor *)midPointColor
|
||||
blackMapping:(NSColor *)shadowColor
|
||||
whiteMapping:(NSColor *)lightColor;
|
||||
|
@ -169,32 +169,32 @@ APPKIT_EXPORT NSString *NSImageEXIFData; // No GNUstep support yet; for reading
|
|||
#endif
|
||||
|
||||
#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;
|
||||
#endif
|
||||
#if OS_API_VERSION(MAC_OS_X_VERSION_10_4, GS_API_LATEST)
|
||||
- (id) initWithBitmapDataPlanes: (unsigned char**)planes
|
||||
pixelsWide: (int)width
|
||||
pixelsHigh: (int)height
|
||||
bitsPerSample: (int)bps
|
||||
samplesPerPixel: (int)spp
|
||||
pixelsWide: (NSInteger)width
|
||||
pixelsHigh: (NSInteger)height
|
||||
bitsPerSample: (NSInteger)bps
|
||||
samplesPerPixel: (NSInteger)spp
|
||||
hasAlpha: (BOOL)alpha
|
||||
isPlanar: (BOOL)isPlanar
|
||||
colorSpaceName: (NSString*)colorSpaceName
|
||||
bitmapFormat: (NSBitmapFormat)bitmapFormat
|
||||
bytesPerRow: (int)rowBytes
|
||||
bitsPerPixel: (int)pixelBits;
|
||||
bytesPerRow: (NSInteger)rowBytes
|
||||
bitsPerPixel: (NSInteger)pixelBits;
|
||||
#endif
|
||||
|
||||
//
|
||||
// Getting Information about the Image
|
||||
//
|
||||
- (int) bitsPerPixel;
|
||||
- (int) samplesPerPixel;
|
||||
- (NSInteger) bitsPerPixel;
|
||||
- (NSInteger) samplesPerPixel;
|
||||
- (BOOL) isPlanar;
|
||||
- (int) numberOfPlanes;
|
||||
- (int) bytesPerPlane;
|
||||
- (int) bytesPerRow;
|
||||
- (NSInteger) numberOfPlanes;
|
||||
- (NSInteger) bytesPerPlane;
|
||||
- (NSInteger) bytesPerRow;
|
||||
|
||||
//
|
||||
// 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)
|
||||
- (NSBitmapFormat) bitmapFormat;
|
||||
- (void) getPixel: (unsigned int[])pixelData atX: (int)x y: (int)y;
|
||||
- (void) setPixel: (unsigned int[])pixelData atX: (int)x y: (int)y;
|
||||
- (NSColor*) colorAtX: (int)x y: (int)y;
|
||||
- (void) setColor: (NSColor*)color atX: (int)x y: (int)y;
|
||||
- (void) getPixel: (NSUInteger[])pixelData atX: (NSInteger)x y: (NSInteger)y;
|
||||
- (void) setPixel: (NSUInteger[])pixelData atX: (NSInteger)x y: (NSInteger)y;
|
||||
- (NSColor*) colorAtX: (NSInteger)x y: (NSInteger)y;
|
||||
- (void) setColor: (NSColor*)color atX: (NSInteger)x y: (NSInteger)y;
|
||||
#endif
|
||||
|
||||
//
|
||||
|
@ -233,7 +233,7 @@ APPKIT_EXPORT NSString *NSImageEXIFData; // No GNUstep support yet; for reading
|
|||
// Setting and Checking Compression Types
|
||||
//
|
||||
+ (void) getTIFFCompressionTypes: (const NSTIFFCompression**)list
|
||||
count: (int*)numTypes;
|
||||
count: (NSInteger*)numTypes;
|
||||
+ (NSString*) localizedNameForTIFFCompressionType: (NSTIFFCompression)type;
|
||||
- (BOOL) canBeCompressedUsing: (NSTIFFCompression)compression;
|
||||
- (void) getCompression: (NSTIFFCompression*)compression
|
||||
|
|
|
@ -60,7 +60,7 @@
|
|||
//
|
||||
- (void)setBezeled:(BOOL)flag;
|
||||
- (void)setBordered:(BOOL)flag;
|
||||
- (void)setTextAlignment:(int)aMode;
|
||||
- (void)setTextAlignment:(NSTextAlignment)aMode;
|
||||
- (void)setTextFont:(NSFont*)fontObject;
|
||||
- (void)setTitleAlignment:(NSTextAlignment)aMode;
|
||||
- (void)setTitleFont:(NSFont*)fontObject;
|
||||
|
|
|
@ -240,19 +240,19 @@ typedef enum {
|
|||
fromRect: (NSRect)aRect
|
||||
operation: (NSCompositingOperation)op;
|
||||
- (void) dissolveToPoint: (NSPoint)aPoint
|
||||
fraction: (float)aFloat;
|
||||
fraction: (CGFloat)aFloat;
|
||||
- (void) dissolveToPoint: (NSPoint)aPoint
|
||||
fromRect: (NSRect)aRect
|
||||
fraction: (float)aFloat;
|
||||
fraction: (CGFloat)aFloat;
|
||||
|
||||
#if OS_API_VERSION(GS_API_MACOSX, GS_API_LATEST)
|
||||
- (void) compositeToPoint: (NSPoint)aPoint
|
||||
fromRect: (NSRect)srcRect
|
||||
operation: (NSCompositingOperation)op
|
||||
fraction: (float)delta;
|
||||
fraction: (CGFloat)delta;
|
||||
- (void) compositeToPoint: (NSPoint)aPoint
|
||||
operation: (NSCompositingOperation)op
|
||||
fraction: (float)delta;
|
||||
fraction: (CGFloat)delta;
|
||||
#endif
|
||||
|
||||
//
|
||||
|
@ -332,7 +332,7 @@ typedef enum {
|
|||
- (void) drawAtPoint: (NSPoint)point
|
||||
fromRect: (NSRect)srcRect
|
||||
operation: (NSCompositingOperation)op
|
||||
fraction: (float)delta;
|
||||
fraction: (CGFloat)delta;
|
||||
|
||||
/** <p>Takes the part of the receiver given by <code>srcRect</code> and
|
||||
* draws it in <code>dstRect</code> in the current coordinate system,
|
||||
|
@ -350,7 +350,7 @@ typedef enum {
|
|||
- (void) drawInRect: (NSRect)dstRect
|
||||
fromRect: (NSRect)srcRect
|
||||
operation: (NSCompositingOperation)op
|
||||
fraction: (float)delta;
|
||||
fraction: (CGFloat)delta;
|
||||
#endif
|
||||
|
||||
#if OS_API_VERSION(MAC_OS_X_VERSION_10_6, GS_API_LATEST)
|
||||
|
@ -358,7 +358,7 @@ typedef enum {
|
|||
- (void) drawInRect: (NSRect)dstRect
|
||||
fromRect: (NSRect)srcRect
|
||||
operation: (NSCompositingOperation)op
|
||||
fraction: (float)delta
|
||||
fraction: (CGFloat)delta
|
||||
respectFlipped: (BOOL)respectFlipped
|
||||
hints: (NSDictionary*)hints;
|
||||
|
||||
|
|
|
@ -107,7 +107,7 @@
|
|||
Returns the indentation level, a number between 0 and 15.
|
||||
</p>
|
||||
*/
|
||||
- (int)indentationLevel;
|
||||
- (NSInteger)indentationLevel;
|
||||
#endif
|
||||
|
||||
/**
|
||||
|
@ -219,7 +219,7 @@
|
|||
- (void) setImage: (NSImage*)menuImage;
|
||||
|
||||
#if OS_API_VERSION(MAC_OS_X_VERSION_10_3, GS_API_LATEST)
|
||||
- (void)setIndentationLevel: (int)level;
|
||||
- (void)setIndentationLevel: (NSInteger)level;
|
||||
#endif
|
||||
|
||||
/**
|
||||
|
|
|
@ -45,14 +45,14 @@
|
|||
NSImage *_image;
|
||||
id <NSCopying> _representedObject;
|
||||
NSPoint _imageOrigin;
|
||||
float _location;
|
||||
CGFloat _location;
|
||||
BOOL _isMovable;
|
||||
BOOL _isRemovable;
|
||||
BOOL _isDragging;
|
||||
}
|
||||
|
||||
- (id)initWithRulerView:(NSRulerView *)aRulerView
|
||||
markerLocation:(float)location
|
||||
markerLocation:(CGFloat)location
|
||||
image:(NSImage *)anImage
|
||||
imageOrigin:(NSPoint)imageOrigin;
|
||||
|
||||
|
@ -64,15 +64,15 @@
|
|||
- (void)setImageOrigin:(NSPoint)aPoint;
|
||||
- (NSPoint)imageOrigin;
|
||||
- (NSRect)imageRectInRuler;
|
||||
- (float)thicknessRequiredInRuler;
|
||||
- (CGFloat)thicknessRequiredInRuler;
|
||||
|
||||
- (void)setMovable:(BOOL)flag;
|
||||
- (BOOL)isMovable;
|
||||
- (void)setRemovable:(BOOL)flag;
|
||||
- (BOOL)isRemovable;
|
||||
|
||||
- (void)setMarkerLocation:(float)location;
|
||||
- (float)markerLocation;
|
||||
- (void)setMarkerLocation:(CGFloat)location;
|
||||
- (CGFloat)markerLocation;
|
||||
|
||||
- (void)setRepresentedObject:(id <NSCopying>)anObject;
|
||||
- (id <NSCopying>)representedObject;
|
||||
|
|
|
@ -58,12 +58,12 @@ typedef enum {
|
|||
NSScrollView *_scrollView;
|
||||
NSView *_clientView; // Not retained
|
||||
NSView *_accessoryView;
|
||||
float _originOffset;
|
||||
CGFloat _originOffset;
|
||||
NSMutableArray *_markers;
|
||||
NSRulerOrientation _orientation;
|
||||
float _ruleThickness;
|
||||
float _reservedThicknessForAccessoryView;
|
||||
float _reservedThicknessForMarkers;
|
||||
CGFloat _ruleThickness;
|
||||
CGFloat _reservedThicknessForAccessoryView;
|
||||
CGFloat _reservedThicknessForMarkers;
|
||||
|
||||
/* Cached values. It's a little expensive to calculate them and they
|
||||
* change only when the unit or the originOffset is changed or when
|
||||
|
@ -80,12 +80,12 @@ typedef enum {
|
|||
NSString *_labelFormat;
|
||||
}
|
||||
|
||||
- (id) initWithScrollView: (NSScrollView *)aScrollView
|
||||
orientation: (NSRulerOrientation)o;
|
||||
- (id) initWithScrollView:(NSScrollView *)aScrollView
|
||||
orientation:(NSRulerOrientation)o;
|
||||
|
||||
+ (void) registerUnitWithName: (NSString *)uName
|
||||
+ (void) registerUnitWithName:(NSString *)uName
|
||||
abbreviation:(NSString *)abbreviation
|
||||
unitToPointsConversionFactor:(float)conversionFactor
|
||||
unitToPointsConversionFactor:(CGFloat)conversionFactor
|
||||
stepUpCycle:(NSArray *)stepUpCycle
|
||||
stepDownCycle:(NSArray *)stepDownCycle;
|
||||
|
||||
|
@ -98,8 +98,8 @@ typedef enum {
|
|||
- (void) setAccessoryView: (NSView *)aView;
|
||||
- (NSView *) accessoryView;
|
||||
|
||||
- (void) setOriginOffset: (float)offset;
|
||||
- (float) originOffset;
|
||||
- (void) setOriginOffset: (CGFloat)offset;
|
||||
- (CGFloat) originOffset;
|
||||
|
||||
- (void) setMarkers: (NSArray *)newMarkers;
|
||||
- (NSArray *) markers;
|
||||
|
@ -108,7 +108,7 @@ typedef enum {
|
|||
- (BOOL) trackMarker: (NSRulerMarker *)aMarker
|
||||
withMouseEvent: (NSEvent *)theEvent;
|
||||
|
||||
- (void) moveRulerlineFromLocation: (float)oldLoc toLocation: (float)newLoc;
|
||||
- (void) moveRulerlineFromLocation: (CGFloat)oldLoc toLocation: (CGFloat)newLoc;
|
||||
|
||||
- (void) drawHashMarksAndLabelsInRect: (NSRect)aRect;
|
||||
- (void) drawMarkersInRect: (NSRect)aRect;
|
||||
|
@ -119,14 +119,14 @@ typedef enum {
|
|||
|
||||
- (void) setOrientation: (NSRulerOrientation)o;
|
||||
- (NSRulerOrientation) orientation;
|
||||
- (void) setReservedThicknessForAccessoryView: (float)thickness;
|
||||
- (float) reservedThicknessForAccessoryView;
|
||||
- (void) setReservedThicknessForMarkers: (float)thickness;
|
||||
- (float) reservedThicknessForMarkers;
|
||||
- (void) setRuleThickness: (float)thickness;
|
||||
- (float) ruleThickness;
|
||||
- (float) requiredThickness;
|
||||
- (float) baselineLocation;
|
||||
- (void) setReservedThicknessForAccessoryView: (CGFloat)thickness;
|
||||
- (CGFloat) reservedThicknessForAccessoryView;
|
||||
- (void) setReservedThicknessForMarkers: (CGFloat)thickness;
|
||||
- (CGFloat) reservedThicknessForMarkers;
|
||||
- (void) setRuleThickness: (CGFloat)thickness;
|
||||
- (CGFloat) ruleThickness;
|
||||
- (CGFloat) requiredThickness;
|
||||
- (CGFloat) baselineLocation;
|
||||
- (BOOL) isFlipped;
|
||||
|
||||
@end
|
||||
|
|
|
@ -46,7 +46,7 @@ typedef enum {
|
|||
@interface NSSegmentedCell : NSActionCell
|
||||
{
|
||||
@private
|
||||
int _selected_segment;
|
||||
NSInteger _selected_segment;
|
||||
int _key_selection;
|
||||
NSMutableArray *_items;
|
||||
struct {
|
||||
|
@ -62,14 +62,14 @@ typedef enum {
|
|||
}
|
||||
|
||||
// Specifying number of segments...
|
||||
- (void) setSegmentCount: (int) count;
|
||||
- (int) segmentCount;
|
||||
- (void) setSegmentCount: (NSInteger) count;
|
||||
- (NSInteger) segmentCount;
|
||||
|
||||
// Specifying selected segment...
|
||||
- (void) setSelectedSegment: (int) segment;
|
||||
- (void) setSelected: (BOOL)flag forSegment: (int)segment;
|
||||
- (int) selectedSegment;
|
||||
- (void) selectSegmentWithTag: (int) tag;
|
||||
- (void) setSelectedSegment: (NSInteger) segment;
|
||||
- (void) setSelected: (BOOL)flag forSegment: (NSInteger)segment;
|
||||
- (NSInteger) selectedSegment;
|
||||
- (void) selectSegmentWithTag: (NSInteger)tag;
|
||||
- (void) makeNextSegmentKey;
|
||||
- (void) makePreviousSegmentKey;
|
||||
|
||||
|
@ -78,24 +78,24 @@ typedef enum {
|
|||
- (NSSegmentSwitchTracking) trackingMode;
|
||||
|
||||
// Working with individual segments...
|
||||
- (void) setWidth: (float)width forSegment: (int)segment;
|
||||
- (float) widthForSegment: (int)segment;
|
||||
- (void) setImage: (NSImage *)image forSegment: (int)segment;
|
||||
- (NSImage *) imageForSegment: (int)segment;
|
||||
- (void) setLabel: (NSString *)label forSegment: (int)segment;
|
||||
- (NSString *) labelForSegment: (int)segment;
|
||||
- (BOOL) isSelectedForSegment: (int)segment;
|
||||
- (void) setEnabled: (BOOL)flag forSegment: (int)segment;
|
||||
- (BOOL) isEnabledForSegment: (int)segment;
|
||||
- (void) setMenu: (NSMenu *)menu forSegment: (int)segment;
|
||||
- (NSMenu *) menuForSegment: (int)segment;
|
||||
- (void) setToolTip: (NSString *) toolTip forSegment: (int)segment;
|
||||
- (NSString *) toolTipForSegment: (int)segment;
|
||||
- (void) setTag: (int)tag forSegment: (int)segment;
|
||||
- (int) tagForSegment: (int)segment;
|
||||
- (void) setWidth: (CGFloat)width forSegment: (NSInteger)segment;
|
||||
- (CGFloat) widthForSegment: (NSInteger)segment;
|
||||
- (void) setImage: (NSImage *)image forSegment: (NSInteger)segment;
|
||||
- (NSImage *) imageForSegment: (NSInteger)segment;
|
||||
- (void) setLabel: (NSString *)label forSegment: (NSInteger)segment;
|
||||
- (NSString *) labelForSegment: (NSInteger)segment;
|
||||
- (BOOL) isSelectedForSegment: (NSInteger)segment;
|
||||
- (void) setEnabled: (BOOL)flag forSegment: (NSInteger)segment;
|
||||
- (BOOL) isEnabledForSegment: (NSInteger)segment;
|
||||
- (void) setMenu: (NSMenu *)menu forSegment: (NSInteger)segment;
|
||||
- (NSMenu *) menuForSegment: (NSInteger)segment;
|
||||
- (void) setToolTip: (NSString *) toolTip forSegment: (NSInteger)segment;
|
||||
- (NSString *) toolTipForSegment: (NSInteger)segment;
|
||||
- (void) setTag: (NSInteger)tag forSegment: (NSInteger)segment;
|
||||
- (NSInteger) tagForSegment: (NSInteger)segment;
|
||||
|
||||
// Drawing custom content
|
||||
- (void) drawSegment: (int)segment
|
||||
- (void) drawSegment: (NSInteger)segment
|
||||
inFrame: (NSRect)frame
|
||||
withView: (NSView *)view;
|
||||
|
||||
|
|
|
@ -43,27 +43,27 @@ typedef enum _NSSegmentStyle {
|
|||
@interface NSSegmentedControl : NSControl
|
||||
|
||||
// Specifying number of segments...
|
||||
- (void) setSegmentCount: (int) count;
|
||||
- (int) segmentCount;
|
||||
- (void) setSegmentCount: (NSInteger)count;
|
||||
- (NSInteger) segmentCount;
|
||||
|
||||
// Specifying selected segment...
|
||||
- (void) setSelectedSegment: (int) segment;
|
||||
- (int) selectedSegment;
|
||||
- (void) selectSegmentWithTag: (int) tag;
|
||||
- (void) setSelectedSegment: (NSInteger)segment;
|
||||
- (NSInteger) selectedSegment;
|
||||
- (void) selectSegmentWithTag: (NSInteger)tag;
|
||||
|
||||
// Working with individual segments...
|
||||
- (void) setWidth: (float)width forSegment: (int)segment;
|
||||
- (float) widthForSegment: (int)segment;
|
||||
- (void) setImage: (NSImage *)image forSegment: (int)segment;
|
||||
- (NSImage *) imageForSegment: (int)segment;
|
||||
- (void) setLabel: (NSString *)label forSegment: (int)segment;
|
||||
- (NSString *) labelForSegment: (int)segment;
|
||||
- (void) setMenu: (NSMenu *)menu forSegment: (int)segment;
|
||||
- (NSMenu *) menuForSegment: (int)segment;
|
||||
- (void) setSelected: (BOOL)flag forSegment: (int)segment;
|
||||
- (BOOL) isSelectedForSegment: (int)segment;
|
||||
- (void) setEnabled: (BOOL)flag forSegment: (int)segment;
|
||||
- (BOOL) isEnabledForSegment: (int)segment;
|
||||
- (void) setWidth: (CGFloat)width forSegment: (NSInteger)segment;
|
||||
- (CGFloat) widthForSegment: (NSInteger)segment;
|
||||
- (void) setImage: (NSImage *)image forSegment: (NSInteger)segment;
|
||||
- (NSImage *) imageForSegment: (NSInteger)segment;
|
||||
- (void) setLabel: (NSString *)label forSegment: (NSInteger)segment;
|
||||
- (NSString *) labelForSegment: (NSInteger)segment;
|
||||
- (void) setMenu: (NSMenu *)menu forSegment: (NSInteger)segment;
|
||||
- (NSMenu *) menuForSegment: (NSInteger)segment;
|
||||
- (void) setSelected: (BOOL)flag forSegment: (NSInteger)segment;
|
||||
- (BOOL) isSelectedForSegment: (NSInteger)segment;
|
||||
- (void) setEnabled: (BOOL)flag forSegment: (NSInteger)segment;
|
||||
- (BOOL) isEnabledForSegment: (NSInteger)segment;
|
||||
|
||||
// Setting the style of the segments
|
||||
#if OS_API_VERSION(GS_API_MACOSX, GS_API_LATEST)
|
||||
|
|
|
@ -206,7 +206,7 @@ PACKAGE_SCOPE
|
|||
NSWindowDepth _depthLimit;
|
||||
NSWindowController *_windowController;
|
||||
NSInteger _counterpart;
|
||||
float _alphaValue;
|
||||
CGFloat _alphaValue;
|
||||
|
||||
NSMutableArray *_children;
|
||||
NSWindow *_parent;
|
||||
|
@ -292,8 +292,8 @@ PACKAGE_SCOPE
|
|||
* and style. This is the on-screen width of the window including
|
||||
* decorations.
|
||||
*/
|
||||
+ (float) minFrameWidthWithTitle: (NSString *)aTitle
|
||||
styleMask: (NSUInteger)aStyle;
|
||||
+ (CGFloat) minFrameWidthWithTitle: (NSString *)aTitle
|
||||
styleMask: (NSUInteger)aStyle;
|
||||
|
||||
#if OS_API_VERSION(MAC_OS_X_VERSION_10_3, GS_API_LATEST)
|
||||
- (NSRect) contentRectForFrameRect: (NSRect)frameRect;
|
||||
|
@ -506,7 +506,7 @@ PACKAGE_SCOPE
|
|||
- (void) setOneShot: (BOOL)flag;
|
||||
#if OS_API_VERSION(MAC_OS_X_VERSION_10_4, GS_API_LATEST)
|
||||
- (NSGraphicsContext*) graphicsContext;
|
||||
- (float) userSpaceScaleFactor;
|
||||
- (CGFloat) userSpaceScaleFactor;
|
||||
#endif
|
||||
|
||||
|
||||
|
@ -677,8 +677,8 @@ PACKAGE_SCOPE
|
|||
#if OS_API_VERSION(GS_API_MACOSX, GS_API_LATEST)
|
||||
- (void) setHasShadow: (BOOL)hasShadow;
|
||||
- (BOOL) hasShadow;
|
||||
- (void) setAlphaValue: (float)windowAlpha;
|
||||
- (float) alphaValue;
|
||||
- (void) setAlphaValue: (CGFloat)windowAlpha;
|
||||
- (CGFloat) alphaValue;
|
||||
- (void) setOpaque: (BOOL)isOpaque;
|
||||
- (BOOL) isOpaque;
|
||||
#endif
|
||||
|
|
|
@ -75,7 +75,7 @@
|
|||
}
|
||||
}
|
||||
|
||||
+ (float) minFrameWidthWithTitle: (NSString *)aTitle
|
||||
+ (CGFloat) minFrameWidthWithTitle: (NSString *)aTitle
|
||||
styleMask: (NSUInteger)aStyle
|
||||
{
|
||||
float l, r, t, b, width;
|
||||
|
@ -97,7 +97,7 @@
|
|||
|
||||
if (hasTitleBar)
|
||||
{
|
||||
float titleHeight = [theme titlebarHeight];
|
||||
CGFloat titleHeight = [theme titlebarHeight];
|
||||
|
||||
titleBarRect = NSMakeRect(0.0, [self bounds].size.height - titleHeight,
|
||||
[self bounds].size.width, titleHeight);
|
||||
|
|
|
@ -130,8 +130,8 @@ static inline NSRect RectWithSizeScaledByFactor(NSRect aRect, CGFloat factor)
|
|||
return aRect;
|
||||
}
|
||||
|
||||
+ (float) minFrameWidthWithTitle: (NSString *)aTitle
|
||||
styleMask: (NSUInteger)aStyle
|
||||
+ (CGFloat) minFrameWidthWithTitle: (NSString *)aTitle
|
||||
styleMask: (NSUInteger)aStyle
|
||||
{
|
||||
[self subclassResponsibility: _cmd];
|
||||
return 0.0;
|
||||
|
@ -192,9 +192,8 @@ static inline NSRect RectWithSizeScaledByFactor(NSRect aRect, CGFloat factor)
|
|||
|
||||
if ([_window menu] != nil)
|
||||
{
|
||||
float menubarHeight = [[GSTheme theme]
|
||||
menuHeightForWindow:
|
||||
_window];
|
||||
CGFloat menubarHeight =
|
||||
[[GSTheme theme] menuHeightForWindow: _window];
|
||||
|
||||
content.size.height -= menubarHeight;
|
||||
}
|
||||
|
@ -216,9 +215,8 @@ static inline NSRect RectWithSizeScaledByFactor(NSRect aRect, CGFloat factor)
|
|||
|
||||
if ([_window menu] != nil)
|
||||
{
|
||||
float menubarHeight = [[GSTheme theme]
|
||||
menuHeightForWindow:
|
||||
_window];
|
||||
CGFloat menubarHeight =
|
||||
[[GSTheme theme] menuHeightForWindow: _window];
|
||||
|
||||
aRect.size.height += menubarHeight;
|
||||
}
|
||||
|
@ -296,7 +294,7 @@ static inline NSRect RectWithSizeScaledByFactor(NSRect aRect, CGFloat factor)
|
|||
{
|
||||
NSMenuView *menuView = nil;
|
||||
GSTheme *theme = [GSTheme theme];
|
||||
float menuBarHeight = [theme menuHeightForWindow: _window];
|
||||
CGFloat menuBarHeight = [theme menuHeightForWindow: _window];
|
||||
NSRect menuRect =
|
||||
NSMakeRect(contentViewFrame.origin.x,
|
||||
(NSMaxY(contentRect) + 1) - menuBarHeight,
|
||||
|
@ -320,7 +318,7 @@ static inline NSRect RectWithSizeScaledByFactor(NSRect aRect, CGFloat factor)
|
|||
if (hasToolbar)
|
||||
{
|
||||
GSToolbarView *tv = [tb _toolbarView];
|
||||
float newToolbarViewHeight;
|
||||
CGFloat newToolbarViewHeight;
|
||||
NSRect toolbarRect;
|
||||
// If the width changed we may need to recalculate the height
|
||||
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 windowFrame;
|
||||
|
@ -459,8 +457,8 @@ static inline NSRect RectWithSizeScaledByFactor(NSRect aRect, CGFloat factor)
|
|||
|
||||
- (void) addToolbarView: (GSToolbarView*)toolbarView
|
||||
{
|
||||
float newToolbarViewHeight;
|
||||
float contentYOrigin;
|
||||
CGFloat newToolbarViewHeight;
|
||||
CGFloat contentYOrigin;
|
||||
|
||||
hasToolbar = YES;
|
||||
[toolbarView setFrameSize: NSMakeSize(contentRect.size.width, 100)];
|
||||
|
@ -472,7 +470,7 @@ static inline NSRect RectWithSizeScaledByFactor(NSRect aRect, CGFloat factor)
|
|||
contentYOrigin = NSMaxY(contentRect);
|
||||
if (hasMenu)
|
||||
{
|
||||
float menuBarHeight = [[GSTheme theme] menuHeightForWindow: _window];
|
||||
CGFloat menuBarHeight = [[GSTheme theme] menuHeightForWindow: _window];
|
||||
contentYOrigin -= menuBarHeight;
|
||||
}
|
||||
|
||||
|
@ -489,7 +487,7 @@ static inline NSRect RectWithSizeScaledByFactor(NSRect aRect, CGFloat factor)
|
|||
|
||||
- (void) removeToolbarView: (GSToolbarView *)toolbarView
|
||||
{
|
||||
float toolbarViewHeight = [toolbarView frame].size.height;
|
||||
CGFloat toolbarViewHeight = [toolbarView frame].size.height;
|
||||
|
||||
// Unplug the toolbar view
|
||||
hasToolbar = NO;
|
||||
|
@ -502,8 +500,8 @@ static inline NSRect RectWithSizeScaledByFactor(NSRect aRect, CGFloat factor)
|
|||
{
|
||||
// Frame and height
|
||||
NSRect toolbarViewFrame = [toolbarView frame];
|
||||
float toolbarViewHeight = toolbarViewFrame.size.height;
|
||||
float newToolbarViewHeight = [toolbarView _heightFromLayout];
|
||||
CGFloat toolbarViewHeight = toolbarViewFrame.size.height;
|
||||
CGFloat newToolbarViewHeight = [toolbarView _heightFromLayout];
|
||||
|
||||
if (toolbarViewHeight != newToolbarViewHeight)
|
||||
{
|
||||
|
@ -523,7 +521,7 @@ static inline NSRect RectWithSizeScaledByFactor(NSRect aRect, CGFloat factor)
|
|||
|
||||
- (void) addMenuView: (NSMenuView*)menuView
|
||||
{
|
||||
float menubarHeight = [[GSTheme theme]
|
||||
CGFloat menubarHeight = [[GSTheme theme]
|
||||
menuHeightForWindow:
|
||||
_window];
|
||||
NSRect menuRect = NSMakeRect(contentRect.origin.x,
|
||||
|
@ -540,9 +538,9 @@ static inline NSRect RectWithSizeScaledByFactor(NSRect aRect, CGFloat factor)
|
|||
|
||||
- (NSMenuView*) removeMenuView
|
||||
{
|
||||
NSEnumerator *e = [[self subviews] objectEnumerator];
|
||||
NSView *v;
|
||||
float menubarHeight = [[GSTheme theme]
|
||||
NSEnumerator *e = [[self subviews] objectEnumerator];
|
||||
NSView *v;
|
||||
CGFloat menubarHeight = [[GSTheme theme]
|
||||
menuHeightForWindow:
|
||||
_window];
|
||||
|
||||
|
@ -576,8 +574,8 @@ static inline NSRect RectWithSizeScaledByFactor(NSRect aRect, CGFloat factor)
|
|||
[GSCurrentServer() styleoffsets: l : r : t : b : style];
|
||||
}
|
||||
|
||||
+ (float) minFrameWidthWithTitle: (NSString *)aTitle
|
||||
styleMask: (NSUInteger)aStyle
|
||||
+ (CGFloat) minFrameWidthWithTitle: (NSString *)aTitle
|
||||
styleMask: (NSUInteger)aStyle
|
||||
{
|
||||
/* TODO: we could at least guess... */
|
||||
return 0.0;
|
||||
|
|
|
@ -68,14 +68,14 @@
|
|||
+ (NSTIFFCompression) _compressionTypeFromLocal: (int)type;
|
||||
- (void) _premultiply;
|
||||
- (void) _unpremultiply;
|
||||
- (NSBitmapImageRep *) _convertToFormatBitsPerSample: (int)bps
|
||||
samplesPerPixel: (int)spp
|
||||
- (NSBitmapImageRep *) _convertToFormatBitsPerSample: (NSInteger)bps
|
||||
samplesPerPixel: (NSInteger)spp
|
||||
hasAlpha: (BOOL)alpha
|
||||
isPlanar: (BOOL)isPlanar
|
||||
colorSpaceName: (NSString*)colorSpaceName
|
||||
bitmapFormat: (NSBitmapFormat)bitmapFormat
|
||||
bytesPerRow: (int)rowBytes
|
||||
bitsPerPixel: (int)pixelBits;
|
||||
bytesPerRow: (NSInteger)rowBytes
|
||||
bitsPerPixel: (NSInteger)pixelBits;
|
||||
@end
|
||||
|
||||
/**
|
||||
|
@ -331,7 +331,7 @@
|
|||
/** Initialize with bitmap data from a rect within the focused view */
|
||||
- (id) initWithFocusedViewRect: (NSRect)rect
|
||||
{
|
||||
int bps, spp, alpha, format;
|
||||
NSInteger bps, spp, alpha, format;
|
||||
NSSize size;
|
||||
NSString *space;
|
||||
unsigned char *planes[4];
|
||||
|
@ -449,15 +449,15 @@
|
|||
</deflist>
|
||||
*/
|
||||
- (id) initWithBitmapDataPlanes: (unsigned char **)planes
|
||||
pixelsWide: (int)width
|
||||
pixelsHigh: (int)height
|
||||
bitsPerSample: (int)bitsPerSample
|
||||
samplesPerPixel: (int)samplesPerPixel
|
||||
pixelsWide: (NSInteger)width
|
||||
pixelsHigh: (NSInteger)height
|
||||
bitsPerSample: (NSInteger)bitsPerSample
|
||||
samplesPerPixel: (NSInteger)samplesPerPixel
|
||||
hasAlpha: (BOOL)alpha
|
||||
isPlanar: (BOOL)isPlanar
|
||||
colorSpaceName: (NSString *)colorSpaceName
|
||||
bytesPerRow: (int)rowBytes
|
||||
bitsPerPixel: (int)pixelBits
|
||||
bytesPerRow: (NSInteger)rowBytes
|
||||
bitsPerPixel: (NSInteger)pixelBits
|
||||
{
|
||||
return [self initWithBitmapDataPlanes: planes
|
||||
pixelsWide: width
|
||||
|
@ -473,19 +473,19 @@
|
|||
}
|
||||
|
||||
- (id) initWithBitmapDataPlanes: (unsigned char**)planes
|
||||
pixelsWide: (int)width
|
||||
pixelsHigh: (int)height
|
||||
bitsPerSample: (int)bps
|
||||
samplesPerPixel: (int)spp
|
||||
pixelsWide: (NSInteger)width
|
||||
pixelsHigh: (NSInteger)height
|
||||
bitsPerSample: (NSInteger)bps
|
||||
samplesPerPixel: (NSInteger)spp
|
||||
hasAlpha: (BOOL)alpha
|
||||
isPlanar: (BOOL)isPlanar
|
||||
colorSpaceName: (NSString*)colorSpaceName
|
||||
bitmapFormat: (NSBitmapFormat)bitmapFormat
|
||||
bytesPerRow: (int)rowBytes
|
||||
bitsPerPixel: (int)pixelBits
|
||||
bytesPerRow: (NSInteger)rowBytes
|
||||
bitsPerPixel: (NSInteger)pixelBits
|
||||
{
|
||||
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)
|
||||
{
|
||||
[NSException raise: NSInvalidArgumentException
|
||||
|
@ -577,7 +577,7 @@
|
|||
return self;
|
||||
}
|
||||
|
||||
- (void)colorizeByMappingGray:(float)midPoint
|
||||
- (void)colorizeByMappingGray:(CGFloat)midPoint
|
||||
toColor:(NSColor *)midPointColor
|
||||
blackMapping:(NSColor *)shadowColor
|
||||
whiteMapping:(NSColor *)lightColor
|
||||
|
@ -605,14 +605,14 @@
|
|||
return self;
|
||||
}
|
||||
|
||||
- (int) incrementalLoadFromData: (NSData *)data complete: (BOOL)complete
|
||||
- (NSInteger) incrementalLoadFromData: (NSData *)data complete: (BOOL)complete
|
||||
{
|
||||
if (!complete)
|
||||
{
|
||||
// we don't implement it really
|
||||
return NSImageRepLoadStatusWillNeedAllData;
|
||||
}
|
||||
return [self initWithData:data] ? NSImageRepLoadStatusCompleted : NSImageRepLoadStatusUnexpectedEOF;
|
||||
return [self initWithData: data] ? NSImageRepLoadStatusCompleted : NSImageRepLoadStatusUnexpectedEOF;
|
||||
}
|
||||
|
||||
- (void) dealloc
|
||||
|
@ -629,14 +629,14 @@
|
|||
/** 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
|
||||
bits in one sample. */
|
||||
- (int) bitsPerPixel
|
||||
- (NSInteger) bitsPerPixel
|
||||
{
|
||||
return _bitsPerPixel;
|
||||
}
|
||||
|
||||
/** Returns the number of samples in a pixel. For instance, a normal RGB
|
||||
image with transparency would have a samplesPerPixel of 4. */
|
||||
- (int) samplesPerPixel
|
||||
- (NSInteger) samplesPerPixel
|
||||
{
|
||||
return _numColors;
|
||||
}
|
||||
|
@ -652,14 +652,14 @@
|
|||
/** 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
|
||||
image. */
|
||||
- (int) numberOfPlanes
|
||||
- (NSInteger) numberOfPlanes
|
||||
{
|
||||
return (_isPlanar) ? _numColors : 1;
|
||||
}
|
||||
|
||||
/** Returns the number of bytes in a plane. This is the number of bytes
|
||||
in a row times tne height of the image. */
|
||||
- (int) bytesPerPlane
|
||||
- (NSInteger) bytesPerPlane
|
||||
{
|
||||
return _bytesPerRow*_pixelsHigh;
|
||||
}
|
||||
|
@ -669,7 +669,7 @@
|
|||
in medhed configuration). However it may differ from this if set
|
||||
explicitly in -initWithBitmapDataPlanes:pixelsWide:pixelsHigh:bitsPerSample:samplesPerPixel:hasAlpha:isPlanar:colorSpaceName:bytesPerRow:bitsPerPixel:.
|
||||
*/
|
||||
- (int) bytesPerRow
|
||||
- (NSInteger) 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
|
||||
* 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;
|
||||
long int offset;
|
||||
long int line_offset;
|
||||
NSInteger i;
|
||||
NSInteger offset;
|
||||
NSInteger line_offset;
|
||||
|
||||
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
|
||||
* 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;
|
||||
long int offset;
|
||||
long int line_offset;
|
||||
NSInteger i;
|
||||
NSInteger offset;
|
||||
NSInteger line_offset;
|
||||
|
||||
if (x < 0 || y < 0 || x >= _pixelsWide || y >= _pixelsHigh)
|
||||
if (x < 0 || y < 0 || x >= _pixelsWide || y >= _pixelsHigh)
|
||||
{
|
||||
// outside
|
||||
return;
|
||||
|
@ -880,7 +880,7 @@ _set_bit_value(unsigned char *base, long msb_off, int bit_width,
|
|||
offset, _bitsPerSample, pixelData[i]);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
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
|
||||
* (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
|
||||
return nil;
|
||||
}
|
||||
|
||||
[self getPixel: pixelData atX: x y: y];
|
||||
if ([_colorSpace isEqualToString: NSCalibratedRGBColorSpace]
|
||||
[self getPixel: pixelData atX: x y: y];
|
||||
if ([_colorSpace isEqualToString: NSCalibratedRGBColorSpace]
|
||||
|| [_colorSpace isEqualToString: NSDeviceRGBColorSpace])
|
||||
{
|
||||
unsigned int ir, ig, ib, ia;
|
||||
{
|
||||
NSUInteger ir, ig, ib, ia;
|
||||
CGFloat fr, fg, fb, fa;
|
||||
CGFloat scale;
|
||||
|
||||
|
@ -985,11 +985,11 @@ _set_bit_value(unsigned char *base, long msb_off, int bit_width,
|
|||
blue: fb
|
||||
alpha: fa];
|
||||
}
|
||||
}
|
||||
else if ([_colorSpace isEqual: NSDeviceWhiteColorSpace]
|
||||
}
|
||||
else if ([_colorSpace isEqual: NSDeviceWhiteColorSpace]
|
||||
|| [_colorSpace isEqual: NSCalibratedWhiteColorSpace])
|
||||
{
|
||||
unsigned int iw, ia;
|
||||
{
|
||||
NSUInteger iw, ia;
|
||||
CGFloat fw, fa;
|
||||
CGFloat scale;
|
||||
|
||||
|
@ -1041,7 +1041,7 @@ _set_bit_value(unsigned char *base, long msb_off, int bit_width,
|
|||
else if ([_colorSpace isEqual: NSDeviceBlackColorSpace]
|
||||
|| [_colorSpace isEqual: NSCalibratedBlackColorSpace])
|
||||
{
|
||||
unsigned int ib, ia;
|
||||
NSUInteger ib, ia;
|
||||
CGFloat fw, fa;
|
||||
CGFloat scale;
|
||||
|
||||
|
@ -1090,7 +1090,7 @@ _set_bit_value(unsigned char *base, long msb_off, int bit_width,
|
|||
}
|
||||
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 scale;
|
||||
|
||||
|
@ -1153,19 +1153,19 @@ _set_bit_value(unsigned char *base, long msb_off, int bit_width,
|
|||
alpha: fa];
|
||||
}
|
||||
|
||||
return nil;
|
||||
return nil;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the color of pixel (x,y), where (0,0) is the top-left pixel in the
|
||||
* 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;
|
||||
|
||||
if (x < 0 || y < 0 || x >= _pixelsWide || y >= _pixelsHigh)
|
||||
if (x < 0 || y < 0 || x >= _pixelsWide || y >= _pixelsHigh)
|
||||
{
|
||||
// outside
|
||||
return;
|
||||
|
@ -1180,7 +1180,7 @@ _set_bit_value(unsigned char *base, long msb_off, int bit_width,
|
|||
if ([_colorSpace isEqualToString: NSCalibratedRGBColorSpace]
|
||||
|| [_colorSpace isEqualToString: NSDeviceRGBColorSpace])
|
||||
{
|
||||
unsigned int ir, ig, ib, ia;
|
||||
NSUInteger ir, ig, ib, ia;
|
||||
CGFloat fr, fg, fb, fa;
|
||||
CGFloat scale;
|
||||
|
||||
|
@ -1231,10 +1231,10 @@ _set_bit_value(unsigned char *base, long msb_off, int bit_width,
|
|||
pixelData[2] = ib;
|
||||
}
|
||||
}
|
||||
else if ([_colorSpace isEqual: NSDeviceWhiteColorSpace]
|
||||
else if ([_colorSpace isEqual: NSDeviceWhiteColorSpace]
|
||||
|| [_colorSpace isEqual: NSCalibratedWhiteColorSpace])
|
||||
{
|
||||
unsigned int iw, ia;
|
||||
{
|
||||
NSUInteger iw, ia;
|
||||
CGFloat fw, fa;
|
||||
CGFloat scale;
|
||||
|
||||
|
@ -1273,7 +1273,7 @@ _set_bit_value(unsigned char *base, long msb_off, int bit_width,
|
|||
else if ([_colorSpace isEqual: NSDeviceBlackColorSpace]
|
||||
|| [_colorSpace isEqual: NSCalibratedBlackColorSpace])
|
||||
{
|
||||
unsigned int iw, ia;
|
||||
NSUInteger iw, ia;
|
||||
CGFloat fw, fa;
|
||||
CGFloat scale;
|
||||
|
||||
|
@ -1311,7 +1311,7 @@ _set_bit_value(unsigned char *base, long msb_off, int bit_width,
|
|||
}
|
||||
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 scale;
|
||||
|
||||
|
@ -1372,7 +1372,7 @@ _set_bit_value(unsigned char *base, long msb_off, int bit_width,
|
|||
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
|
||||
|
@ -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.
|
||||
*/
|
||||
+ (void) getTIFFCompressionTypes: (const NSTIFFCompression **)list
|
||||
count: (int *)numTypes
|
||||
count: (NSInteger *)numTypes
|
||||
{
|
||||
// the GNUstep supported 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
|
||||
int i, j;
|
||||
NSInteger i, j;
|
||||
static NSTIFFCompression checkedTypes[8];
|
||||
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
|
||||
{
|
||||
int x, y;
|
||||
unsigned int pixelData[5];
|
||||
int start, end, i, ai;
|
||||
NSInteger x, y;
|
||||
NSUInteger pixelData[5];
|
||||
NSInteger start, end, i, ai;
|
||||
SEL getPSel = @selector(getPixel:atX:y:);
|
||||
SEL setPSel = @selector(setPixel:atX:y:);
|
||||
IMP getP = [self methodForSelector: getPSel];
|
||||
|
@ -1967,7 +1967,7 @@ _set_bit_value(unsigned char *base, long msb_off, int bit_width,
|
|||
|
||||
if (_bitsPerSample == 8)
|
||||
{
|
||||
unsigned int a;
|
||||
NSUInteger a;
|
||||
|
||||
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++)
|
||||
{
|
||||
unsigned int t = a * pixelData[i] + 0x80;
|
||||
NSUInteger t = a * pixelData[i] + 0x80;
|
||||
|
||||
pixelData[i] = ((t >> 8) + t) >> 8;
|
||||
}
|
||||
|
@ -2018,9 +2018,9 @@ _set_bit_value(unsigned char *base, long msb_off, int bit_width,
|
|||
|
||||
- (void) _unpremultiply
|
||||
{
|
||||
int x, y;
|
||||
unsigned int pixelData[5];
|
||||
int start, end, i, ai;
|
||||
NSInteger x, y;
|
||||
NSUInteger pixelData[5];
|
||||
NSInteger start, end, i, ai;
|
||||
SEL getPSel = @selector(getPixel:atX:y:);
|
||||
SEL setPSel = @selector(setPixel:atX:y:);
|
||||
IMP getP = [self methodForSelector: getPSel];
|
||||
|
@ -2044,7 +2044,7 @@ _set_bit_value(unsigned char *base, long msb_off, int bit_width,
|
|||
|
||||
if (_bitsPerSample == 8)
|
||||
{
|
||||
unsigned int a;
|
||||
NSUInteger a;
|
||||
|
||||
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++)
|
||||
{
|
||||
unsigned int c;
|
||||
NSUInteger c;
|
||||
|
||||
c = (pixelData[i] * 255) / a;
|
||||
if (c >= 255)
|
||||
|
@ -2083,7 +2083,7 @@ _set_bit_value(unsigned char *base, long msb_off, int bit_width,
|
|||
scale = (CGFloat)((1 << _bitsPerSample) - 1);
|
||||
for (y = 0; y < _pixelsHigh; y++)
|
||||
{
|
||||
unsigned int a;
|
||||
NSUInteger a;
|
||||
|
||||
for (x = 0; x < _pixelsWide; x++)
|
||||
{
|
||||
|
@ -2116,14 +2116,14 @@ _set_bit_value(unsigned char *base, long msb_off, int bit_width,
|
|||
_format |= NSAlphaNonpremultipliedBitmapFormat;
|
||||
}
|
||||
|
||||
- (NSBitmapImageRep *) _convertToFormatBitsPerSample: (int)bps
|
||||
samplesPerPixel: (int)spp
|
||||
- (NSBitmapImageRep *) _convertToFormatBitsPerSample: (NSInteger)bps
|
||||
samplesPerPixel: (NSInteger)spp
|
||||
hasAlpha: (BOOL)alpha
|
||||
isPlanar: (BOOL)isPlanar
|
||||
colorSpaceName: (NSString*)colorSpaceName
|
||||
bitmapFormat: (NSBitmapFormat)bitmapFormat
|
||||
bytesPerRow: (int)rowBytes
|
||||
bitsPerPixel: (int)pixelBits
|
||||
bytesPerRow: (NSInteger)rowBytes
|
||||
bitsPerPixel: (NSInteger)pixelBits
|
||||
{
|
||||
if (!pixelBits)
|
||||
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:);
|
||||
IMP getP = [self methodForSelector: getPSel];
|
||||
IMP setP = [new methodForSelector: setPSel];
|
||||
unsigned int pixelData[5];
|
||||
int x, y;
|
||||
NSUInteger pixelData[5];
|
||||
NSInteger x, y;
|
||||
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++)
|
||||
{
|
||||
unsigned int iv[4], ia;
|
||||
NSUInteger iv[4], ia;
|
||||
CGFloat fv[4], fa;
|
||||
int i;
|
||||
NSInteger i;
|
||||
|
||||
//[self getPixel: pixelData atX: x y: 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:);
|
||||
IMP getP = [self methodForSelector: getPSel];
|
||||
IMP setP = [new methodForSelector: setPSel];
|
||||
unsigned int pixelData[4];
|
||||
int x, y;
|
||||
NSUInteger pixelData[4];
|
||||
NSInteger x, y;
|
||||
CGFloat _scale;
|
||||
CGFloat scale;
|
||||
int max = (1 << _bitsPerSample) - 1;
|
||||
NSInteger max = (1 << _bitsPerSample) - 1;
|
||||
BOOL isWhite = [_colorSpace isEqualToString: NSCalibratedWhiteColorSpace]
|
||||
|| [_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++)
|
||||
{
|
||||
unsigned int iv, ia;
|
||||
NSUInteger iv, ia;
|
||||
CGFloat fv, fa;
|
||||
|
||||
//[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:);
|
||||
IMP getC = [self methodForSelector: getCSel];
|
||||
IMP setC = [new methodForSelector: setCSel];
|
||||
int i, j;
|
||||
NSInteger i, j;
|
||||
|
||||
NSDebugLLog(@"NSImage", @"Slow converting %@ bitmap data to %@",
|
||||
_colorSpace, colorSpaceName);
|
||||
|
|
|
@ -244,7 +244,7 @@ static Class defaultCellClass = nil;
|
|||
informations. The default text alignment is NSRightTextAlignment</p>
|
||||
<p>See Also: -setTitleAlignment: [NSCell-setAlignment:]</p>
|
||||
*/
|
||||
- (void) setTextAlignment: (int)aMode
|
||||
- (void) setTextAlignment: (NSTextAlignment)aMode
|
||||
{
|
||||
NSInteger i, count = [self numberOfRows];
|
||||
|
||||
|
|
|
@ -68,8 +68,8 @@ BOOL NSImageForceCaching = NO; /* use on missmatch */
|
|||
if ((ext == nil) || [ext isEqualToString:@""])
|
||||
{
|
||||
NSArray *types = [NSImage imageUnfilteredFileTypes];
|
||||
unsigned c = [types count];
|
||||
unsigned i;
|
||||
NSUInteger c = [types count];
|
||||
NSUInteger i;
|
||||
|
||||
for (i = 0; path == nil && i < c; i++)
|
||||
{
|
||||
|
@ -614,7 +614,7 @@ repd_for_rep(NSArray *_reps, NSImageRep *rep)
|
|||
- (BOOL) isValid
|
||||
{
|
||||
BOOL valid = NO;
|
||||
unsigned i, count;
|
||||
NSUInteger i, count;
|
||||
|
||||
if (_flags.syncLoad)
|
||||
{
|
||||
|
@ -645,7 +645,7 @@ repd_for_rep(NSArray *_reps, NSImageRep *rep)
|
|||
|
||||
- (void) recache
|
||||
{
|
||||
unsigned i;
|
||||
NSUInteger i;
|
||||
|
||||
i = [_reps count];
|
||||
while (i--)
|
||||
|
@ -709,7 +709,7 @@ repd_for_rep(NSArray *_reps, NSImageRep *rep)
|
|||
|
||||
- (void) compositeToPoint: (NSPoint)aPoint
|
||||
operation: (NSCompositingOperation)op
|
||||
fraction: (float)delta
|
||||
fraction: (CGFloat)delta
|
||||
{
|
||||
[self compositeToPoint: aPoint
|
||||
fromRect: NSZeroRect
|
||||
|
@ -720,7 +720,7 @@ repd_for_rep(NSArray *_reps, NSImageRep *rep)
|
|||
- (void) compositeToPoint: (NSPoint)aPoint
|
||||
fromRect: (NSRect)srcRect
|
||||
operation: (NSCompositingOperation)op
|
||||
fraction: (float)delta
|
||||
fraction: (CGFloat)delta
|
||||
{
|
||||
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
|
||||
fromRect: NSZeroRect
|
||||
|
@ -762,7 +762,7 @@ repd_for_rep(NSArray *_reps, NSImageRep *rep)
|
|||
|
||||
- (void) dissolveToPoint: (NSPoint)aPoint
|
||||
fromRect: (NSRect)aRect
|
||||
fraction: (float)aFloat
|
||||
fraction: (CGFloat)aFloat
|
||||
{
|
||||
[self compositeToPoint: aPoint
|
||||
fromRect: aRect
|
||||
|
@ -804,7 +804,7 @@ repd_for_rep(NSArray *_reps, NSImageRep *rep)
|
|||
- (void) drawAtPoint: (NSPoint)point
|
||||
fromRect: (NSRect)srcRect
|
||||
operation: (NSCompositingOperation)op
|
||||
fraction: (float)delta
|
||||
fraction: (CGFloat)delta
|
||||
{
|
||||
[self drawInRect: NSMakeRect(point.x, point.y, srcRect.size.width, srcRect.size.height)
|
||||
fromRect: srcRect
|
||||
|
@ -817,7 +817,7 @@ repd_for_rep(NSArray *_reps, NSImageRep *rep)
|
|||
- (void) drawInRect: (NSRect)dstRect
|
||||
fromRect: (NSRect)srcRect
|
||||
operation: (NSCompositingOperation)op
|
||||
fraction: (float)delta
|
||||
fraction: (CGFloat)delta
|
||||
{
|
||||
[self drawInRect: dstRect
|
||||
fromRect: srcRect
|
||||
|
@ -833,7 +833,7 @@ repd_for_rep(NSArray *_reps, NSImageRep *rep)
|
|||
- (void) drawInRect: (NSRect)dstRect // Negative width/height => Nothing draws.
|
||||
fromRect: (NSRect)srcRect
|
||||
operation: (NSCompositingOperation)op
|
||||
fraction: (float)delta
|
||||
fraction: (CGFloat)delta
|
||||
respectFlipped: (BOOL)respectFlipped
|
||||
hints: (NSDictionary*)hints
|
||||
{
|
||||
|
@ -918,7 +918,7 @@ repd_for_rep(NSArray *_reps, NSImageRep *rep)
|
|||
|
||||
- (void) addRepresentations: (NSArray *)imageRepArray
|
||||
{
|
||||
unsigned i, count;
|
||||
NSUInteger i, count;
|
||||
GSRepData *repd;
|
||||
|
||||
count = [imageRepArray count];
|
||||
|
@ -933,7 +933,7 @@ repd_for_rep(NSArray *_reps, NSImageRep *rep)
|
|||
|
||||
- (void) removeRepresentation: (NSImageRep *)imageRep
|
||||
{
|
||||
unsigned i;
|
||||
NSUInteger i;
|
||||
GSRepData *repd;
|
||||
|
||||
i = [_reps count];
|
||||
|
@ -1319,7 +1319,7 @@ static NSSize GSResolutionOfImageRep(NSImageRep *rep)
|
|||
|
||||
- (NSMutableArray *) _representationsWithCachedImages: (BOOL)flag
|
||||
{
|
||||
unsigned count;
|
||||
NSUInteger count;
|
||||
|
||||
if (_flags.syncLoad)
|
||||
{
|
||||
|
@ -1337,7 +1337,7 @@ static NSSize GSResolutionOfImageRep(NSImageRep *rep)
|
|||
else
|
||||
{
|
||||
id repList[count];
|
||||
unsigned i, j;
|
||||
NSUInteger i, j;
|
||||
|
||||
[_reps getObjects: repList];
|
||||
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
|
||||
* render the image rep into, and switch to the cached rep.
|
||||
*/
|
||||
unsigned count = [_reps count];
|
||||
NSUInteger count = [_reps count];
|
||||
|
||||
if (count > 0)
|
||||
{
|
||||
GSRepData *invalidCache = nil;
|
||||
GSRepData *partialCache = nil;
|
||||
GSRepData *reps[count];
|
||||
unsigned partialCount = 0;
|
||||
unsigned i;
|
||||
NSUInteger partialCount = 0;
|
||||
NSUInteger i;
|
||||
BOOL opaque = [rep isOpaque];
|
||||
|
||||
[_reps getObjects: reps];
|
||||
|
@ -2163,7 +2163,7 @@ iterate_reps_for_types(NSArray* imageReps, SEL method)
|
|||
GSRepData *repd;
|
||||
NSSize imageSize = [self size];
|
||||
NSSize repSize;
|
||||
int pixelsWide, pixelsHigh;
|
||||
NSInteger pixelsWide, pixelsHigh;
|
||||
|
||||
if (rep != nil)
|
||||
{
|
||||
|
|
|
@ -520,12 +520,12 @@ static Class imageClass;
|
|||
[self setTitle: [title string]];
|
||||
}
|
||||
|
||||
- (int)indentationLevel
|
||||
- (NSInteger)indentationLevel
|
||||
{
|
||||
return _indentation;
|
||||
}
|
||||
|
||||
- (void)setIndentationLevel: (int)level
|
||||
- (void)setIndentationLevel: (NSInteger)level
|
||||
{
|
||||
_indentation = level;
|
||||
}
|
||||
|
|
|
@ -38,7 +38,7 @@
|
|||
@implementation NSRulerMarker
|
||||
|
||||
- (id)initWithRulerView:(NSRulerView *)aRulerView
|
||||
markerLocation:(float)location
|
||||
markerLocation:(CGFloat)location
|
||||
image:(NSImage *)anImage
|
||||
imageOrigin:(NSPoint)imageOrigin
|
||||
{
|
||||
|
@ -134,7 +134,7 @@
|
|||
return NSZeroRect;
|
||||
}
|
||||
|
||||
- (float)thicknessRequiredInRuler
|
||||
- (CGFloat)thicknessRequiredInRuler
|
||||
{
|
||||
NSSize size = [_image size];
|
||||
|
||||
|
@ -170,12 +170,12 @@
|
|||
return _isRemovable;
|
||||
}
|
||||
|
||||
- (void)setMarkerLocation:(float)location
|
||||
- (void)setMarkerLocation:(CGFloat)location
|
||||
{
|
||||
_location = location;
|
||||
}
|
||||
|
||||
- (float)markerLocation
|
||||
- (CGFloat)markerLocation
|
||||
{
|
||||
return _location;
|
||||
}
|
||||
|
@ -234,7 +234,7 @@
|
|||
NSPoint mousePositionInWindow;
|
||||
NSPoint previousMousePositionInWindow;
|
||||
NSPoint mouseOffset;
|
||||
float location;
|
||||
CGFloat location;
|
||||
NSRect drawRect;
|
||||
NSRect bounds = [_rulerView bounds];
|
||||
NSPoint drawPoint;
|
||||
|
|
|
@ -71,24 +71,24 @@
|
|||
{
|
||||
NSString *_unitName;
|
||||
NSString *_abbreviation;
|
||||
float _conversionFactor;
|
||||
CGFloat _conversionFactor;
|
||||
NSArray *_stepUpCycle;
|
||||
NSArray *_stepDownCycle;
|
||||
}
|
||||
|
||||
+ (GSRulerUnit *) unitWithName: (NSString *)uName
|
||||
abbreviation: (NSString *)abbrev
|
||||
unitToPointsConversionFactor: (float)factor
|
||||
unitToPointsConversionFactor: (CGFloat)factor
|
||||
stepUpCycle: (NSArray *)upCycle
|
||||
stepDownCycle: (NSArray *)downCycle;
|
||||
- (id) initWithUnitName: (NSString *)uName
|
||||
abbreviation: (NSString *)abbrev
|
||||
unitToPointsConversionFactor: (float)factor
|
||||
unitToPointsConversionFactor: (CGFloat)factor
|
||||
stepUpCycle: (NSArray *)upCycle
|
||||
stepDownCycle: (NSArray *)downCycle;
|
||||
- (NSString *) unitName;
|
||||
- (NSString *) abbreviation;
|
||||
- (float) conversionFactor;
|
||||
- (CGFloat) conversionFactor;
|
||||
- (NSArray *) stepUpCycle;
|
||||
- (NSArray *) stepDownCycle;
|
||||
|
||||
|
@ -98,7 +98,7 @@ unitToPointsConversionFactor: (float)factor
|
|||
|
||||
+ (GSRulerUnit *) unitWithName: (NSString *)uName
|
||||
abbreviation: (NSString *)abbrev
|
||||
unitToPointsConversionFactor: (float)factor
|
||||
unitToPointsConversionFactor: (CGFloat)factor
|
||||
stepUpCycle: (NSArray *)upCycle
|
||||
stepDownCycle: (NSArray *)downCycle
|
||||
{
|
||||
|
@ -111,7 +111,7 @@ unitToPointsConversionFactor: (float)factor
|
|||
|
||||
- (id) initWithUnitName: (NSString *)uName
|
||||
abbreviation: (NSString *)abbrev
|
||||
unitToPointsConversionFactor: (float)factor
|
||||
unitToPointsConversionFactor: (CGFloat)factor
|
||||
stepUpCycle: (NSArray *)upCycle
|
||||
stepDownCycle: (NSArray *)downCycle
|
||||
{
|
||||
|
@ -138,7 +138,7 @@ unitToPointsConversionFactor: (float)factor
|
|||
return _abbreviation;
|
||||
}
|
||||
|
||||
- (float) conversionFactor
|
||||
- (CGFloat) conversionFactor
|
||||
{
|
||||
return _conversionFactor;
|
||||
}
|
||||
|
@ -242,7 +242,7 @@ static NSMutableDictionary *units = nil;
|
|||
|
||||
+ (void) registerUnitWithName: (NSString *)uName
|
||||
abbreviation: (NSString *)abbreviation
|
||||
unitToPointsConversionFactor: (float)conversionFactor
|
||||
unitToPointsConversionFactor: (CGFloat)conversionFactor
|
||||
stepUpCycle: (NSArray *)stepUpCycle
|
||||
stepDownCycle: (NSArray *)stepDownCycle
|
||||
{
|
||||
|
@ -312,13 +312,13 @@ static NSMutableDictionary *units = nil;
|
|||
return _accessoryView;
|
||||
}
|
||||
|
||||
- (void) setOriginOffset: (float)offset
|
||||
- (void) setOriginOffset: (CGFloat)offset
|
||||
{
|
||||
_originOffset = offset;
|
||||
[self invalidateHashMarks];
|
||||
}
|
||||
|
||||
- (float) originOffset
|
||||
- (CGFloat) originOffset
|
||||
{
|
||||
return _originOffset;
|
||||
}
|
||||
|
@ -327,7 +327,7 @@ static NSMutableDictionary *units = nil;
|
|||
{
|
||||
NSEnumerator *en;
|
||||
NSRulerMarker *marker;
|
||||
float maxThickness = _reservedThicknessForMarkers;
|
||||
CGFloat maxThickness = _reservedThicknessForMarkers;
|
||||
|
||||
if (_markers == nil)
|
||||
{
|
||||
|
@ -336,7 +336,7 @@ static NSMutableDictionary *units = nil;
|
|||
en = [_markers objectEnumerator];
|
||||
while ((marker = [en nextObject]) != nil)
|
||||
{
|
||||
float markerThickness;
|
||||
CGFloat markerThickness;
|
||||
markerThickness = [marker thicknessRequiredInRuler];
|
||||
if (markerThickness > maxThickness)
|
||||
{
|
||||
|
@ -375,7 +375,7 @@ static NSMutableDictionary *units = nil;
|
|||
|
||||
- (void) addMarker: (NSRulerMarker *)aMarker
|
||||
{
|
||||
float markerThickness = [aMarker thicknessRequiredInRuler];
|
||||
CGFloat markerThickness = [aMarker thicknessRequiredInRuler];
|
||||
|
||||
if (_clientView == nil)
|
||||
{
|
||||
|
@ -506,8 +506,8 @@ static NSMutableDictionary *units = nil;
|
|||
}
|
||||
}
|
||||
|
||||
- (void) moveRulerlineFromLocation: (float)oldLoc
|
||||
toLocation: (float)newLoc
|
||||
- (void) moveRulerlineFromLocation: (CGFloat)oldLoc
|
||||
toLocation: (CGFloat)newLoc
|
||||
{
|
||||
/* FIXME/TODO: not implemented */
|
||||
}
|
||||
|
@ -544,8 +544,8 @@ static NSMutableDictionary *units = nil;
|
|||
if (! _cacheIsValid)
|
||||
{
|
||||
NSSize unitSize;
|
||||
float cf;
|
||||
int convIndex;
|
||||
CGFloat cf;
|
||||
int convIndex;
|
||||
|
||||
/* calculate the size one unit in document view has in the ruler */
|
||||
cf = [_unit conversionFactor];
|
||||
|
@ -619,18 +619,18 @@ static NSMutableDictionary *units = nil;
|
|||
NSRect docBounds;
|
||||
NSRect baselineRect;
|
||||
NSRect visibleBaselineRect;
|
||||
float firstBaselineLocation;
|
||||
float firstVisibleLocation;
|
||||
float lastVisibleLocation;
|
||||
CGFloat firstBaselineLocation;
|
||||
CGFloat firstVisibleLocation;
|
||||
CGFloat lastVisibleLocation;
|
||||
int firstVisibleMark;
|
||||
int lastVisibleMark;
|
||||
int mark;
|
||||
int firstVisibleLabel;
|
||||
int lastVisibleLabel;
|
||||
int label;
|
||||
float baselineLocation = [self baselineLocation];
|
||||
CGFloat baselineLocation = [self baselineLocation];
|
||||
NSPoint zeroPoint;
|
||||
float zeroLocation;
|
||||
CGFloat zeroLocation;
|
||||
NSBezierPath *path;
|
||||
NSFont *font = [NSFont systemFontOfSize: [NSFont smallSystemFontSize]];
|
||||
NSDictionary *attr = [[NSDictionary alloc]
|
||||
|
@ -692,7 +692,7 @@ static NSMutableDictionary *units = nil;
|
|||
|
||||
for (mark = firstVisibleMark; mark <= lastVisibleMark; mark++)
|
||||
{
|
||||
float markLocation;
|
||||
CGFloat markLocation;
|
||||
|
||||
markLocation = zeroLocation + mark * _markDistance;
|
||||
if (_orientation == NSHorizontalRuler)
|
||||
|
@ -742,7 +742,8 @@ static NSMutableDictionary *units = nil;
|
|||
|
||||
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;
|
||||
NSString *labelString = [NSString stringWithFormat: _labelFormat, labelValue];
|
||||
NSSize size = [labelString sizeWithAttributes: attr];
|
||||
|
@ -803,53 +804,52 @@ static NSMutableDictionary *units = nil;
|
|||
return _orientation;
|
||||
}
|
||||
|
||||
- (void) setReservedThicknessForAccessoryView: (float)thickness
|
||||
- (void) setReservedThicknessForAccessoryView: (CGFloat)thickness
|
||||
{
|
||||
_reservedThicknessForAccessoryView = thickness;
|
||||
[_scrollView tile];
|
||||
}
|
||||
|
||||
- (float) reservedThicknessForAccessoryView
|
||||
- (CGFloat) reservedThicknessForAccessoryView
|
||||
{
|
||||
return _reservedThicknessForAccessoryView;
|
||||
}
|
||||
|
||||
- (void) setReservedThicknessForMarkers: (float)thickness
|
||||
- (void) setReservedThicknessForMarkers: (CGFloat)thickness
|
||||
{
|
||||
_reservedThicknessForMarkers = thickness;
|
||||
[_scrollView tile];
|
||||
}
|
||||
|
||||
- (float) reservedThicknessForMarkers
|
||||
- (CGFloat) reservedThicknessForMarkers
|
||||
{
|
||||
return _reservedThicknessForMarkers;
|
||||
}
|
||||
|
||||
- (void) setRuleThickness: (float)thickness
|
||||
- (void) setRuleThickness: (CGFloat)thickness
|
||||
{
|
||||
_ruleThickness = thickness;
|
||||
[_scrollView tile];
|
||||
}
|
||||
|
||||
- (float) ruleThickness
|
||||
- (CGFloat) ruleThickness
|
||||
{
|
||||
return _ruleThickness;
|
||||
}
|
||||
|
||||
- (float) requiredThickness
|
||||
- (CGFloat) requiredThickness
|
||||
{
|
||||
return [self ruleThickness]
|
||||
+ [self reservedThicknessForAccessoryView]
|
||||
+ [self reservedThicknessForMarkers];
|
||||
}
|
||||
|
||||
- (float) baselineLocation
|
||||
- (CGFloat) baselineLocation
|
||||
{
|
||||
return [self reservedThicknessForAccessoryView]
|
||||
+ [self reservedThicknessForMarkers];
|
||||
}
|
||||
|
||||
/* FIXME ... we cache isFlipped in NSView. */
|
||||
- (BOOL) isFlipped
|
||||
{
|
||||
if (_orientation == NSVerticalRuler)
|
||||
|
@ -859,13 +859,13 @@ static NSMutableDictionary *units = nil;
|
|||
return YES;
|
||||
}
|
||||
|
||||
- (void)encodeWithCoder:(NSCoder *)encoder
|
||||
- (void) encodeWithCoder: (NSCoder *)encoder
|
||||
{
|
||||
/* FIXME/TODO: not implemented */
|
||||
return;
|
||||
}
|
||||
|
||||
- (id)initWithCoder:(NSCoder *)decoder
|
||||
- (id) initWithCoder: (NSCoder *)decoder
|
||||
{
|
||||
/* FIXME/TODO: not implemented */
|
||||
return nil;
|
||||
|
|
|
@ -41,7 +41,7 @@
|
|||
BOOL _selected;
|
||||
BOOL _enabled;
|
||||
NSInteger _tag;
|
||||
float _width;
|
||||
CGFloat _width;
|
||||
NSMenu *_menu;
|
||||
NSString *_label;
|
||||
NSString *_tool_tip;
|
||||
|
@ -63,8 +63,8 @@
|
|||
- (void) setImage: (NSImage *)image;
|
||||
- (NSInteger) tag;
|
||||
- (void) setTag: (NSInteger)tag;
|
||||
- (float) width;
|
||||
- (void) setWidth: (float)width;
|
||||
- (CGFloat) width;
|
||||
- (void) setWidth: (CGFloat)width;
|
||||
- (NSRect) frame;
|
||||
- (void) setFrame: (NSRect)frame;
|
||||
@end
|
||||
|
@ -162,12 +162,12 @@
|
|||
_tag = tag;
|
||||
}
|
||||
|
||||
- (float) width
|
||||
- (CGFloat) width
|
||||
{
|
||||
return _width;
|
||||
}
|
||||
|
||||
- (void) setWidth: (float)width
|
||||
- (void) setWidth: (CGFloat)width
|
||||
{
|
||||
_width = width;
|
||||
}
|
||||
|
@ -318,9 +318,9 @@
|
|||
}
|
||||
|
||||
// Specifying number of segments...
|
||||
- (void) setSegmentCount: (int)count
|
||||
- (void) setSegmentCount: (NSInteger)count
|
||||
{
|
||||
int size;
|
||||
NSInteger size;
|
||||
|
||||
if ((count < 0) || (count > 2048))
|
||||
{
|
||||
|
@ -340,23 +340,23 @@
|
|||
}
|
||||
}
|
||||
|
||||
- (int) segmentCount
|
||||
- (NSInteger) segmentCount
|
||||
{
|
||||
return [_items count];
|
||||
}
|
||||
|
||||
// Specifying selected segment...
|
||||
- (void) setSelectedSegment: (int)segment
|
||||
- (void) setSelectedSegment: (NSInteger)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 *previous = nil;
|
||||
|
||||
if(_selected_segment != -1)
|
||||
if (_selected_segment != -1)
|
||||
{
|
||||
previous = [_items objectAtIndex: _selected_segment];
|
||||
if(_segmentCellFlags._tracking_mode == NSSegmentSwitchTrackingSelectOne)
|
||||
|
@ -365,7 +365,7 @@
|
|||
}
|
||||
}
|
||||
|
||||
if([segment isEnabled])
|
||||
if ([segment isEnabled])
|
||||
{
|
||||
[segment setSelected: flag];
|
||||
if (flag)
|
||||
|
@ -379,16 +379,16 @@
|
|||
}
|
||||
}
|
||||
|
||||
- (int) selectedSegment
|
||||
- (NSInteger) selectedSegment
|
||||
{
|
||||
return _selected_segment;
|
||||
}
|
||||
|
||||
- (void) selectSegmentWithTag: (int)tag
|
||||
- (void) selectSegmentWithTag: (NSInteger)tag
|
||||
{
|
||||
NSEnumerator *en = [_items objectEnumerator];
|
||||
id o = nil;
|
||||
int segment = 0;
|
||||
NSInteger segment = 0;
|
||||
|
||||
while ((o = [en nextObject]) != nil)
|
||||
{
|
||||
|
@ -404,7 +404,7 @@
|
|||
|
||||
- (void) makeNextSegmentKey
|
||||
{
|
||||
int next;
|
||||
NSInteger next;
|
||||
|
||||
if (_selected_segment < [_items count])
|
||||
{
|
||||
|
@ -420,7 +420,7 @@
|
|||
|
||||
- (void) makePreviousSegmentKey
|
||||
{
|
||||
int prev;
|
||||
NSInteger prev;
|
||||
|
||||
if (_selected_segment > 0)
|
||||
{
|
||||
|
@ -448,98 +448,98 @@
|
|||
|
||||
|
||||
// Working with individual segments...
|
||||
- (void) setWidth: (float)width forSegment: (int)seg
|
||||
- (void) setWidth: (CGFloat)width forSegment: (NSInteger)seg
|
||||
{
|
||||
id segment = [_items objectAtIndex: seg];
|
||||
[segment setWidth: width];
|
||||
}
|
||||
|
||||
- (float) widthForSegment: (int)seg
|
||||
- (CGFloat) widthForSegment: (NSInteger)seg
|
||||
{
|
||||
id segment = [_items objectAtIndex: seg];
|
||||
return [segment width];
|
||||
}
|
||||
|
||||
- (void) setImage: (NSImage *)image forSegment: (int)seg
|
||||
- (void) setImage: (NSImage *)image forSegment: (NSInteger)seg
|
||||
{
|
||||
id segment = [_items objectAtIndex: seg];
|
||||
[segment setImage: image];
|
||||
}
|
||||
|
||||
- (NSImage *) imageForSegment: (int)seg
|
||||
- (NSImage *) imageForSegment: (NSInteger)seg
|
||||
{
|
||||
id segment = [_items objectAtIndex: seg];
|
||||
return [segment image];
|
||||
}
|
||||
|
||||
- (void) setLabel: (NSString *)label forSegment: (int)seg
|
||||
- (void) setLabel: (NSString *)label forSegment: (NSInteger)seg
|
||||
{
|
||||
id segment = [_items objectAtIndex: seg];
|
||||
[segment setLabel: label];
|
||||
}
|
||||
|
||||
- (NSString *) labelForSegment: (int)seg
|
||||
- (NSString *) labelForSegment: (NSInteger)seg
|
||||
{
|
||||
id segment = [_items objectAtIndex: seg];
|
||||
return [segment label];
|
||||
}
|
||||
|
||||
- (BOOL) isSelectedForSegment: (int)seg
|
||||
- (BOOL) isSelectedForSegment: (NSInteger)seg
|
||||
{
|
||||
id segment = [_items objectAtIndex: seg];
|
||||
return [segment isSelected];
|
||||
}
|
||||
|
||||
- (void) setEnabled: (BOOL)flag forSegment: (int)seg
|
||||
- (void) setEnabled: (BOOL)flag forSegment: (NSInteger)seg
|
||||
{
|
||||
id segment = [_items objectAtIndex: seg];
|
||||
return [segment setEnabled: flag];
|
||||
}
|
||||
|
||||
- (BOOL) isEnabledForSegment: (int)seg
|
||||
- (BOOL) isEnabledForSegment: (NSInteger)seg
|
||||
{
|
||||
id segment = [_items objectAtIndex: seg];
|
||||
return [segment isEnabled];
|
||||
}
|
||||
|
||||
- (void) setMenu: (NSMenu *)menu forSegment: (int)seg
|
||||
- (void) setMenu: (NSMenu *)menu forSegment: (NSInteger)seg
|
||||
{
|
||||
id segment = [_items objectAtIndex: seg];
|
||||
return [segment setMenu: menu];
|
||||
}
|
||||
|
||||
- (NSMenu *) menuForSegment: (int)seg
|
||||
- (NSMenu *) menuForSegment: (NSInteger)seg
|
||||
{
|
||||
id segment = [_items objectAtIndex: seg];
|
||||
return [segment menu];
|
||||
}
|
||||
|
||||
- (void) setToolTip: (NSString *) toolTip forSegment: (int)seg
|
||||
- (void) setToolTip: (NSString *) toolTip forSegment: (NSInteger)seg
|
||||
{
|
||||
id segment = [_items objectAtIndex: seg];
|
||||
return [segment setToolTip: toolTip];
|
||||
}
|
||||
|
||||
- (NSString *) toolTipForSegment: (int)seg
|
||||
- (NSString *) toolTipForSegment: (NSInteger)seg
|
||||
{
|
||||
id segment = [_items objectAtIndex: seg];
|
||||
return [segment toolTip];
|
||||
}
|
||||
|
||||
- (void) setTag: (int)tag forSegment: (int)seg
|
||||
- (void) setTag: (NSInteger)tag forSegment: (NSInteger)seg
|
||||
{
|
||||
id segment = [_items objectAtIndex: seg];
|
||||
return [segment setTag: tag];
|
||||
}
|
||||
|
||||
- (int) tagForSegment: (int)seg
|
||||
- (NSInteger) tagForSegment: (NSInteger)seg
|
||||
{
|
||||
id segment = [_items objectAtIndex: seg];
|
||||
return [segment tag];
|
||||
}
|
||||
|
||||
// Drawing custom content
|
||||
- (void) drawSegment: (int)seg
|
||||
- (void) drawSegment: (NSInteger)seg
|
||||
inFrame: (NSRect)frame
|
||||
withView: (NSView *)view
|
||||
{
|
||||
|
@ -547,7 +547,7 @@
|
|||
NSString *label = [segment label];
|
||||
NSSize textSize = [label sizeWithAttributes: [NSDictionary dictionary]];
|
||||
NSRect textFrame = frame;
|
||||
float x_offset = (frame.size.width - textSize.width) / 2;
|
||||
CGFloat x_offset = (frame.size.width - textSize.width) / 2;
|
||||
GSThemeControlState state = GSThemeNormalState;
|
||||
BOOL roundedLeft = NO;
|
||||
BOOL roundedRight = NO;
|
||||
|
@ -580,8 +580,8 @@
|
|||
- (void) drawInteriorWithFrame: (NSRect)cellFrame
|
||||
inView: (NSView*)controlView
|
||||
{
|
||||
int i;
|
||||
unsigned int count = [_items count];
|
||||
NSInteger i;
|
||||
NSUInteger count = [_items count];
|
||||
NSRect frame = cellFrame;
|
||||
NSRect controlFrame = [controlView frame];
|
||||
|
||||
|
@ -601,12 +601,12 @@
|
|||
}
|
||||
|
||||
// Setting the style of the segments
|
||||
- (void)setSegmentStyle:(NSSegmentStyle)style
|
||||
- (void) setSegmentStyle: (NSSegmentStyle)style
|
||||
{
|
||||
_segmentCellFlags._style = style;
|
||||
}
|
||||
|
||||
- (NSSegmentStyle)segmentStyle
|
||||
- (NSSegmentStyle) segmentStyle
|
||||
{
|
||||
return _segmentCellFlags._style;
|
||||
}
|
||||
|
@ -649,7 +649,7 @@
|
|||
else
|
||||
_items = [[NSMutableArray alloc] initWithCapacity: 2];
|
||||
|
||||
for (i=0; i<[_items count]; i++)
|
||||
for (i = 0; i < [_items count]; i++)
|
||||
{
|
||||
if ([self isSelectedForSegment: i])
|
||||
_selected_segment = i;
|
||||
|
@ -684,15 +684,15 @@
|
|||
inView: (NSView*)controlView
|
||||
mouseIsUp: (BOOL)flag
|
||||
{
|
||||
int count = [self segmentCount];
|
||||
int i = 0;
|
||||
NSInteger count = [self segmentCount];
|
||||
NSInteger i = 0;
|
||||
|
||||
[super stopTracking: lastPoint
|
||||
at: stopPoint
|
||||
inView: controlView
|
||||
mouseIsUp: (BOOL)flag];
|
||||
|
||||
for(i = 0; i < count; i++)
|
||||
for (i = 0; i < count; i++)
|
||||
{
|
||||
id segment = [_items objectAtIndex: i];
|
||||
NSRect frame = [segment frame];
|
||||
|
|
|
@ -47,99 +47,99 @@ static Class segmentedControlCellClass;
|
|||
}
|
||||
|
||||
// Specifying number of segments...
|
||||
- (void) setSegmentCount: (int) count
|
||||
- (void) setSegmentCount: (NSInteger) count
|
||||
{
|
||||
[_cell setSegmentCount: count];
|
||||
}
|
||||
|
||||
- (int) segmentCount
|
||||
- (NSInteger) segmentCount
|
||||
{
|
||||
return [_cell segmentCount];
|
||||
}
|
||||
|
||||
// Specifying selected segment...
|
||||
- (void) setSelectedSegment: (int) segment
|
||||
- (void) setSelectedSegment: (NSInteger) segment
|
||||
{
|
||||
[_cell setSelectedSegment: segment];
|
||||
}
|
||||
|
||||
- (int) selectedSegment
|
||||
- (NSInteger) selectedSegment
|
||||
{
|
||||
return [_cell selectedSegment];
|
||||
}
|
||||
|
||||
- (void) selectSegmentWithTag: (int) tag
|
||||
- (void) selectSegmentWithTag: (NSInteger) tag
|
||||
{
|
||||
[_cell selectSegmentWithTag: tag];
|
||||
}
|
||||
|
||||
// Working with individual segments...
|
||||
- (void) setWidth: (float)width forSegment: (int)segment
|
||||
- (void) setWidth: (CGFloat)width forSegment: (NSInteger)segment
|
||||
{
|
||||
[_cell setWidth: width forSegment: segment];
|
||||
}
|
||||
|
||||
- (float) widthForSegment: (int)segment
|
||||
- (CGFloat) widthForSegment: (NSInteger)segment
|
||||
{
|
||||
return [_cell widthForSegment: segment];
|
||||
}
|
||||
|
||||
- (void) setImage: (NSImage *)image forSegment: (int)segment
|
||||
- (void) setImage: (NSImage *)image forSegment: (NSInteger)segment
|
||||
{
|
||||
[_cell setImage: image forSegment: segment];
|
||||
}
|
||||
|
||||
- (NSImage *) imageForSegment: (int)segment
|
||||
- (NSImage *) imageForSegment: (NSInteger)segment
|
||||
{
|
||||
return [_cell imageForSegment: segment];
|
||||
}
|
||||
|
||||
- (void) setLabel: (NSString *)label forSegment: (int)segment
|
||||
- (void) setLabel: (NSString *)label forSegment: (NSInteger)segment
|
||||
{
|
||||
[_cell setLabel: label forSegment: segment];
|
||||
}
|
||||
|
||||
- (NSString *) labelForSegment: (int)segment
|
||||
- (NSString *) labelForSegment: (NSInteger)segment
|
||||
{
|
||||
return [_cell labelForSegment: segment];
|
||||
}
|
||||
|
||||
- (void) setMenu: (NSMenu *)menu forSegment: (int)segment
|
||||
- (void) setMenu: (NSMenu *)menu forSegment: (NSInteger)segment
|
||||
{
|
||||
[_cell setMenu: menu forSegment: segment];
|
||||
}
|
||||
|
||||
- (NSMenu *) menuForSegment: (int)segment
|
||||
- (NSMenu *) menuForSegment: (NSInteger)segment
|
||||
{
|
||||
return [_cell menuForSegment: segment];
|
||||
}
|
||||
|
||||
- (void) setSelected: (BOOL)flag forSegment: (int)segment
|
||||
- (void) setSelected: (BOOL)flag forSegment: (NSInteger)segment
|
||||
{
|
||||
[_cell setSelected: flag forSegment: segment];
|
||||
}
|
||||
|
||||
- (BOOL) isSelectedForSegment: (int)segment
|
||||
- (BOOL) isSelectedForSegment: (NSInteger)segment
|
||||
{
|
||||
return [_cell isSelectedForSegment: segment];
|
||||
}
|
||||
|
||||
- (void) setEnabled: (BOOL)flag forSegment: (int)segment
|
||||
- (void) setEnabled: (BOOL)flag forSegment: (NSInteger)segment
|
||||
{
|
||||
[_cell setEnabled: flag forSegment: segment];
|
||||
}
|
||||
|
||||
- (BOOL) isEnabledForSegment: (int)segment
|
||||
- (BOOL) isEnabledForSegment: (NSInteger)segment
|
||||
{
|
||||
return [_cell isEnabledForSegment: segment];
|
||||
}
|
||||
|
||||
- (void)setSegmentStyle:(NSSegmentStyle)style
|
||||
- (void) setSegmentStyle: (NSSegmentStyle)style
|
||||
{
|
||||
[_cell setSegmentStyle: style];
|
||||
}
|
||||
|
||||
- (NSSegmentStyle)segmentStyle
|
||||
- (NSSegmentStyle) segmentStyle
|
||||
{
|
||||
return [_cell segmentStyle];
|
||||
}
|
||||
|
|
|
@ -554,7 +554,7 @@ static NSSize scaledIconSizeForSize(NSSize imageSize)
|
|||
location = [_window mouseLocationOutsideOfEventStream];
|
||||
if (NSEqualPoints(location, lastLocation) == NO)
|
||||
{
|
||||
NSPoint origin = [_window frame].origin;
|
||||
NSPoint origin = [_window frame].origin;
|
||||
|
||||
origin.x += (location.x - lastLocation.x);
|
||||
origin.y += (location.y - lastLocation.y);
|
||||
|
@ -729,7 +729,7 @@ static NSNotificationCenter *nc = nil;
|
|||
styleMask: aStyle];
|
||||
}
|
||||
|
||||
+ (float) minFrameWidthWithTitle: (NSString *)aTitle
|
||||
+ (CGFloat) minFrameWidthWithTitle: (NSString *)aTitle
|
||||
styleMask: (NSUInteger)aStyle
|
||||
{
|
||||
if (!windowDecorator)
|
||||
|
@ -1156,11 +1156,11 @@ many times.
|
|||
- (id) initWithWindowRef: (void *)windowRef
|
||||
{
|
||||
NSRect contentRect;
|
||||
unsigned aStyle;
|
||||
unsigned int aStyle;
|
||||
NSBackingStoreType bufferingType;
|
||||
NSScreen* aScreen;
|
||||
int screen;
|
||||
int winNum;
|
||||
NSInteger winNum;
|
||||
GSDisplayServer *srv = GSCurrentServer();
|
||||
|
||||
// Get the properties for the underlying window
|
||||
|
@ -1337,7 +1337,7 @@ titleWithRepresentedFilename(NSString *representedFilename)
|
|||
// FIXME
|
||||
}
|
||||
|
||||
- (void) setAlphaValue: (float)windowAlpha
|
||||
- (void) setAlphaValue: (CGFloat)windowAlpha
|
||||
{
|
||||
_alphaValue = windowAlpha;
|
||||
if (_windowNum)
|
||||
|
@ -1346,7 +1346,7 @@ titleWithRepresentedFilename(NSString *representedFilename)
|
|||
}
|
||||
}
|
||||
|
||||
- (float) alphaValue
|
||||
- (CGFloat) alphaValue
|
||||
{
|
||||
return _alphaValue;
|
||||
}
|
||||
|
@ -1380,7 +1380,7 @@ titleWithRepresentedFilename(NSString *representedFilename)
|
|||
return _context;
|
||||
}
|
||||
|
||||
- (float) userSpaceScaleFactor
|
||||
- (CGFloat) userSpaceScaleFactor
|
||||
{
|
||||
if (_styleMask & NSUnscaledWindowMask)
|
||||
{
|
||||
|
@ -2102,7 +2102,7 @@ titleWithRepresentedFilename(NSString *representedFilename)
|
|||
- (NSRect) constrainFrameRect: (NSRect)frameRect toScreen: (NSScreen*)screen
|
||||
{
|
||||
NSRect screenRect = [screen visibleFrame];
|
||||
float difference;
|
||||
CGFloat difference;
|
||||
|
||||
/* Move top edge of the window inside the screen */
|
||||
difference = NSMaxY (frameRect) - NSMaxY (screenRect);
|
||||
|
@ -3968,8 +3968,8 @@ resetCursorRectsForView(NSView *theView)
|
|||
switch (sub)
|
||||
{
|
||||
case GSAppKitWindowMoved:
|
||||
_frame.origin.x = (float)[theEvent data1];
|
||||
_frame.origin.y = (float)[theEvent data2];
|
||||
_frame.origin.x = (CGFloat)[theEvent data1];
|
||||
_frame.origin.y = (CGFloat)[theEvent data2];
|
||||
NSDebugLLog(@"Moving", @"Move event: %d %@",
|
||||
(int)_windowNum, NSStringFromPoint(_frame.origin));
|
||||
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 isVisible])
|
||||
{
|
||||
float toolbarHeight = [[_toolbar _toolbarView] frame].size.height;
|
||||
CGFloat toolbarHeight = [[_toolbar _toolbarView] frame].size.height;
|
||||
fRect.size.height += toolbarHeight;
|
||||
fRect.origin.y -= toolbarHeight;
|
||||
}
|
||||
// if window has a menu, adjust saved frame to add the menu back in
|
||||
if ([_wv hasMenu])
|
||||
{
|
||||
float menuBarHeight = [[GSTheme theme] menuHeightForWindow: self];
|
||||
CGFloat menuBarHeight = [[GSTheme theme] menuHeightForWindow: self];
|
||||
fRect.size.height += 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 isVisible])
|
||||
{
|
||||
float toolbarHeight = [[_toolbar _toolbarView] frame].size.height;
|
||||
CGFloat toolbarHeight = [[_toolbar _toolbarView] frame].size.height;
|
||||
fRect.size.height -= toolbarHeight;
|
||||
fRect.origin.y += toolbarHeight;
|
||||
}
|
||||
// if window has a menu, adjust saved frame to not include the menu
|
||||
if ([_wv hasMenu])
|
||||
{
|
||||
float menuBarHeight = [[GSTheme theme] menuHeightForWindow: self];
|
||||
CGFloat menuBarHeight = [[GSTheme theme] menuHeightForWindow: self];
|
||||
fRect.size.height -= menuBarHeight;
|
||||
fRect.origin.y += menuBarHeight;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue