diff options
author | Silenio Quarti <silenio> | 2008-08-18 15:04:20 +0000 |
---|---|---|
committer | Silenio Quarti <silenio> | 2008-08-18 15:04:20 +0000 |
commit | 047551711731234f55bfa1e053304f3a7d2a17a6 (patch) | |
tree | 2910245d5d7b68c8b5b777e5898f938119650f26 /bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt | |
parent | f672efc1ab66fde135090a77b8f00d2e076c2f62 (diff) | |
download | eclipse.platform.swt-047551711731234f55bfa1e053304f3a7d2a17a6.tar.gz eclipse.platform.swt-047551711731234f55bfa1e053304f3a7d2a17a6.tar.xz eclipse.platform.swt-047551711731234f55bfa1e053304f3a7d2a17a6.zip |
64 bit work
Diffstat (limited to 'bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt')
44 files changed, 498 insertions, 513 deletions
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/graphics/Cursor.java b/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/graphics/Cursor.java index bb52634025..9968027ce3 100755 --- a/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/graphics/Cursor.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/graphics/Cursor.java @@ -357,7 +357,7 @@ public boolean equals (Object object) { * @see #equals */ public int hashCode () { - return handle != null ? handle.id : 0; + return handle != null ? (int)/*64*/handle.id : 0; } /** diff --git a/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/graphics/Device.java b/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/graphics/Device.java index 71bafb3eb6..e371f5b679 100755 --- a/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/graphics/Device.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/graphics/Device.java @@ -303,7 +303,7 @@ public Rectangle getClientArea () { */ public int getDepth () { checkDevice (); - return OS.NSBitsPerPixelFromDepth(getPrimaryScreen().depth()); + return (int)/*64*/OS.NSBitsPerPixelFromDepth(getPrimaryScreen().depth()); } /** @@ -345,7 +345,7 @@ public FontData[] getFontList (String faceName, boolean scalable) { if (!scalable) return new FontData[0]; NSArray fonts = NSFontManager.sharedFontManager().availableFonts(); int count = 0; - FontData[] fds = new FontData[fonts.count()]; + FontData[] fds = new FontData[(int)/*64*/fonts.count()]; for (int i = 0; i < fds.length; i++) { NSString str = new NSString(fonts.objectAtIndex(i)); String nsName = str.getString(); @@ -506,7 +506,7 @@ protected void init () { * @param data the platform specific GC data * @return the platform specific GC handle */ -public abstract int internal_new_GC (GCData data); +public abstract int /*long*/ internal_new_GC (GCData data); /** * Invokes platform specific functionality to dispose a GC handle. @@ -521,7 +521,7 @@ public abstract int internal_new_GC (GCData data); * @param hDC the platform specific GC handle * @param data the platform specific GC data */ -public abstract void internal_dispose_GC (int handle, GCData data); +public abstract void internal_dispose_GC (int /*long*/ handle, GCData data); /** * Returns <code>true</code> if the device has been disposed, diff --git a/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/graphics/Font.java b/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/graphics/Font.java index 428ae9fda8..10e4683674 100755 --- a/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/graphics/Font.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/graphics/Font.java @@ -186,7 +186,7 @@ public FontData[] getFontData() { if (nsName.indexOf("Italic") != -1) style |= SWT.ITALIC; if (nsName.indexOf("Bold") != -1) style |= SWT.BOLD; Point dpi = device.dpi, screenDPI = device.getScreenDPI(); - FontData data = new FontData(name, handle.pointSize() * screenDPI.y / dpi.y, style); + FontData data = new FontData(name, (float)/*64*/handle.pointSize() * screenDPI.y / dpi.y, style); data.nsName = nsName; return new FontData[]{data}; } @@ -225,7 +225,7 @@ public static Font cocoa_new(Device device, NSFont handle) { * @see #equals */ public int hashCode() { - return handle != null ? handle.id : 0; + return handle != null ? (int)/*64*/handle.id : 0; } void init(String name, float height, int style, String nsName) { diff --git a/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/graphics/GC.java b/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/graphics/GC.java index a6c01c88f6..6e21a52c40 100755 --- a/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/graphics/GC.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/graphics/GC.java @@ -147,7 +147,7 @@ public GC(Drawable drawable, int style) { if (drawable == null) SWT.error(SWT.ERROR_NULL_ARGUMENT); GCData data = new GCData(); data.style = checkStyle(style); - int contextId = drawable.internal_new_GC(data); + int /*long*/ contextId = drawable.internal_new_GC(data); Device device = data.device; if (device == null) device = Device.getDevice(); if (device == null) SWT.error(SWT.ERROR_NULL_ARGUMENT); @@ -180,7 +180,7 @@ static int checkStyle (int style) { */ public static GC cocoa_new(Drawable drawable, GCData data) { GC gc = new GC(); - int context = drawable.internal_new_GC(data); + int /*long*/ context = drawable.internal_new_GC(data); gc.device = data.device; gc.init(drawable, data, context); return gc; @@ -336,9 +336,9 @@ void checkGC (int mask) { if (data.transform != null) { size = data.transform.transformSize(size); } - float scaling = size.width; + double /*float*/ scaling = size.width; if (scaling < 0) scaling = -scaling; - float strokeWidth = data.lineWidth * scaling; + double /*float*/ strokeWidth = data.lineWidth * scaling; if (strokeWidth == 0 || ((int)strokeWidth % 2) == 1) { data.drawXOffset = 0.5f / scaling; } @@ -742,7 +742,7 @@ public void drawArc(int x, int y, int width, int height, int startAngle, int arc checkGC(DRAW); handle.saveGraphicsState(); NSAffineTransform transform = NSAffineTransform.transform(); - float xOffset = data.drawXOffset, yOffset = data.drawYOffset; + double /*float*/ xOffset = data.drawXOffset, yOffset = data.drawYOffset; transform.translateXBy(x + xOffset + width / 2f, y + yOffset + height / 2f); transform.scaleXBy(width / 2f, height / 2f); NSBezierPath path = data.path; @@ -1064,7 +1064,7 @@ public void drawPolygon(int[] pointArray) { if (pointArray == null) SWT.error(SWT.ERROR_NULL_ARGUMENT); if (pointArray.length < 4) return; checkGC(DRAW); - float xOffset = data.drawXOffset, yOffset = data.drawYOffset; + double /*float*/ xOffset = data.drawXOffset, yOffset = data.drawYOffset; NSBezierPath path = data.path; NSPoint pt = new NSPoint(); pt.x = pointArray[0] + xOffset; @@ -1104,7 +1104,7 @@ public void drawPolyline(int[] pointArray) { if (pointArray == null) SWT.error(SWT.ERROR_NULL_ARGUMENT); if (pointArray.length < 4) return; checkGC(DRAW); - float xOffset = data.drawXOffset, yOffset = data.drawYOffset; + double /*float*/ xOffset = data.drawXOffset, yOffset = data.drawYOffset; NSBezierPath path = data.path; NSPoint pt = new NSPoint(); pt.x = pointArray[0] + xOffset; @@ -1434,7 +1434,7 @@ public void fillArc(int x, int y, int width, int height, int startAngle, int arc checkGC(FILL); handle.saveGraphicsState(); NSAffineTransform transform = NSAffineTransform.transform(); - float xOffset = data.drawXOffset, yOffset = data.drawYOffset; + double /*float*/ xOffset = data.drawXOffset, yOffset = data.drawYOffset; transform.translateXBy(x + xOffset + width / 2f, y + yOffset + height / 2f); transform.scaleXBy(width / 2f, height / 2f); NSBezierPath path = data.path; @@ -1997,15 +1997,15 @@ public void getClipping(Region region) { } if (data.clipPath != null) { NSBezierPath clip = data.clipPath.bezierPathByFlatteningPath(); - int count = clip.elementCount(); + int count = (int)/*64*/clip.elementCount(); int pointCount = 0; Region clipRgn = new Region(device); int[] pointArray = new int[count * 2]; - int points = OS.malloc(NSPoint.sizeof); + int /*long*/ points = OS.malloc(NSPoint.sizeof); if (points == 0) SWT.error(SWT.ERROR_NO_HANDLES); NSPoint pt = new NSPoint(); for (int i = 0; i < count; i++) { - int element = clip.elementAtIndex(i, points); + int element = (int)/*64*/clip.elementAtIndex(i, points); switch (element) { case OS.NSMoveToBezierPathElement: if (pointCount != 0) clipRgn.add(pointArray, pointCount); @@ -2162,7 +2162,7 @@ public GCData getGCData() { */ public int getInterpolation() { if (handle == null) SWT.error(SWT.ERROR_GRAPHIC_DISPOSED); - int interpolation = handle.imageInterpolation(); + int interpolation = (int)/*64*/handle.imageInterpolation(); switch (interpolation) { case OS.NSImageInterpolationDefault: return SWT.DEFAULT; case OS.NSImageInterpolationNone: return SWT.NONE; @@ -2394,10 +2394,10 @@ public boolean getXORMode() { * @see #equals */ public int hashCode() { - return handle != null ? handle.id : 0; + return handle != null ? (int)/*64*/handle.id : 0; } -void init(Drawable drawable, GCData data, int context) { +void init(Drawable drawable, GCData data, int /*long*/ context) { if (data.foreground != null) data.state &= ~(FOREGROUND | FOREGROUND_FILL); if (data.background != null) data.state &= ~BACKGROUND; if (data.font != null) data.state &= ~FONT; diff --git a/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/graphics/GCData.java b/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/graphics/GCData.java index 9d02c7c356..f5c73e54b7 100755 --- a/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/graphics/GCData.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/graphics/GCData.java @@ -45,11 +45,11 @@ public final class GCData { public int antialias = SWT.DEFAULT; public int textAntialias = SWT.DEFAULT; public int fillRule = SWT.FILL_EVEN_ODD; - public int bitmapDataAddress; + public int /*long*/ bitmapDataAddress; public Image image; - public float drawXOffset, drawYOffset; + public double /*float*/ drawXOffset, drawYOffset; public NSRect paintRect; public NSBezierPath path; public NSAffineTransform transform, inverseTransform; diff --git a/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/graphics/Image.java b/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/graphics/Image.java index 063de398be..704c319a99 100755 --- a/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/graphics/Image.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/graphics/Image.java @@ -11,6 +11,7 @@ package org.eclipse.swt.graphics; +import org.eclipse.swt.internal.C; import org.eclipse.swt.internal.cocoa.*; import org.eclipse.swt.*; import java.io.*; @@ -218,7 +219,7 @@ public Image(Device device, Image srcImage, int flag) { int width = (int)size.width; int height = (int)size.height; NSBitmapImageRep srcRep = srcImage.imageRep; - int bpr = srcRep.bytesPerRow(); + int /*long*/ bpr = srcRep.bytesPerRow(); /* Copy transparent pixel and alpha data when necessary */ transparentPixel = srcImage.transparentPixel; @@ -235,7 +236,7 @@ public Image(Device device, Image srcImage, int flag) { rep = rep.initWithBitmapDataPlanes(0, width, height, srcRep.bitsPerSample(), srcRep.samplesPerPixel(), srcRep.samplesPerPixel() == 4, srcRep.isPlanar(), OS.NSDeviceRGBColorSpace, OS.NSAlphaFirstBitmapFormat | OS.NSAlphaNonpremultipliedBitmapFormat, srcRep.bytesPerRow(), srcRep.bitsPerPixel()); handle.addRepresentation(rep); - int data = rep.bitmapData(); + int /*long*/ data = rep.bitmapData(); OS.memmove(data, srcImage.imageRep.bitmapData(), width * height * 4); if (flag != SWT.IMAGE_COPY) { @@ -252,7 +253,7 @@ public Image(Device device, Image srcImage, int flag) { byte oneRed = (byte)oneRGB.red; byte oneGreen = (byte)oneRGB.green; byte oneBlue = (byte)oneRGB.blue; - byte[] line = new byte[bpr]; + byte[] line = new byte[(int)/*64*/bpr]; for (int y=0; y<height; y++) { OS.memmove(line, data + (y * bpr), bpr); int offset = 0; @@ -277,7 +278,7 @@ public Image(Device device, Image srcImage, int flag) { break; } case SWT.IMAGE_GRAY: { - byte[] line = new byte[bpr]; + byte[] line = new byte[(int)/*64*/bpr]; for (int y=0; y<height; y++) { OS.memmove(line, data + (y * bpr), bpr); int offset = 0; @@ -489,9 +490,9 @@ void createAlpha () { if (transparentPixel == -1 && alpha == -1 && alphaData == null) return; NSSize size = handle.size(); int height = (int)size.height; - int bpr = imageRep.bytesPerRow(); - int dataSize = height * bpr; - byte[] srcData = new byte[dataSize]; + int /*long*/ bpr = imageRep.bytesPerRow(); + int /*long*/ dataSize = height * bpr; + byte[] srcData = new byte[(int)/*64*/dataSize]; OS.memmove(srcData, imageRep.bitmapData(), dataSize); if (transparentPixel != -1) { for (int i=0; i<dataSize; i+=4) { @@ -613,15 +614,15 @@ public ImageData getImageData() { int width = (int)size.width; int height = (int)size.height; NSBitmapImageRep imageRep = this.imageRep; - int bpr = imageRep.bytesPerRow(); - int bpp = imageRep.bitsPerPixel(); - int dataSize = height * bpr; - byte[] srcData = new byte[dataSize]; + int /*long*/ bpr = imageRep.bytesPerRow(); + int /*long*/ bpp = imageRep.bitsPerPixel(); + int /*long*/ dataSize = height * bpr; + byte[] srcData = new byte[(int)/*64*/dataSize]; OS.memmove(srcData, imageRep.bitmapData(), dataSize); PaletteData palette = new PaletteData(0xFF0000, 0xFF00, 0xFF); - ImageData data = new ImageData(width, height, bpp, palette, 4, srcData); - data.bytesPerLine = bpr; + ImageData data = new ImageData(width, height, (int)/*64*/bpp, palette, 4, srcData); + data.bytesPerLine = (int)/*64*/bpr; data.transparentPixel = transparentPixel; if (transparentPixel == -1 && type == SWT.ICON) { @@ -695,7 +696,7 @@ public static Image cocoa_new(Device device, int type, NSImage nsImage) { * @see #equals */ public int hashCode () { - return handle != null ? handle.id : 0; + return handle != null ? (int)/*64*/handle.id : 0; } void init(int width, int height) { @@ -840,7 +841,7 @@ void init(ImageData image) { * @param data the platform specific GC data * @return the platform specific GC handle */ -public int internal_new_GC (GCData data) { +public int /*long*/ internal_new_GC (GCData data) { if (handle == null) SWT.error(SWT.ERROR_GRAPHIC_DISPOSED); if (type != SWT.BITMAP || memGC != null) { SWT.error(SWT.ERROR_INVALID_ARGUMENT); @@ -849,10 +850,10 @@ public int internal_new_GC (GCData data) { if (imageRep.hasAlpha()) { int bpr = width * 4; rep = (NSBitmapImageRep)new NSBitmapImageRep().alloc(); - int bitmapData = imageRep.bitmapData(); + int /*long*/ bitmapData = imageRep.bitmapData(); if (data.bitmapDataAddress != 0) OS.free(data.bitmapDataAddress); - data.bitmapDataAddress = OS.malloc(4); - OS.memmove(data.bitmapDataAddress, new int[] {bitmapData}, 4); + data.bitmapDataAddress = OS.malloc(C.PTR_SIZEOF); + OS.memmove(data.bitmapDataAddress, new int /*long*/[] {bitmapData}, 4); rep = rep.initWithBitmapDataPlanes(data.bitmapDataAddress, width, height, 8, 3, false, false, OS.NSDeviceRGBColorSpace, OS.NSAlphaFirstBitmapFormat , bpr, 32); rep.autorelease(); } @@ -891,7 +892,7 @@ public int internal_new_GC (GCData data) { * @param hDC the platform specific GC handle * @param data the platform specific GC data */ -public void internal_dispose_GC (int context, GCData data) { +public void internal_dispose_GC (int /*long*/ context, GCData data) { if (data.bitmapDataAddress != 0) OS.free(data.bitmapDataAddress); data.bitmapDataAddress = 0; // handle.setCacheMode(OS.NSImageCacheDefault); diff --git a/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/graphics/Path.java b/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/graphics/Path.java index db99652e41..67fc6e4031 100755 --- a/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/graphics/Path.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/graphics/Path.java @@ -118,7 +118,7 @@ public Path (Device device, Path path, float flatness) { if (flatness == 0) { handle = new NSBezierPath(path.handle.copy().id); } else { - float defaultFlatness = NSBezierPath.defaultFlatness(); + double /*float*/ defaultFlatness = NSBezierPath.defaultFlatness(); NSBezierPath.setDefaultFlatness(flatness); handle = path.handle.bezierPathByFlatteningPath(); NSBezierPath.setDefaultFlatness(defaultFlatness); @@ -282,7 +282,7 @@ public void addString(String string, float x, float y, Font font) { textStorage.endEditing(); range = layoutManager.glyphRangeForTextContainer(textContainer); if (range.length != 0) { - int glyphs = OS.malloc(4 * range.length * 2); + int /*long*/ glyphs = OS.malloc(4 * range.length * 2); layoutManager.getGlyphs(glyphs, range); NSBezierPath path = NSBezierPath.bezierPath(); NSPoint point = new NSPoint(); @@ -404,10 +404,10 @@ public void getBounds(float[] bounds) { if (bounds == null) SWT.error(SWT.ERROR_NULL_ARGUMENT); if (bounds.length < 4) SWT.error(SWT.ERROR_INVALID_ARGUMENT); NSRect rect = handle.controlPointBounds(); - bounds[0] = rect.x; - bounds[1] = rect.y; - bounds[2] = rect.width; - bounds[3] = rect.height; + bounds[0] = (float)/*64*/rect.x; + bounds[1] = (float)/*64*/rect.y; + bounds[2] = (float)/*64*/rect.width; + bounds[3] = (float)/*64*/rect.height; } /** @@ -429,8 +429,8 @@ public void getCurrentPoint(float[] point) { if (point == null) SWT.error(SWT.ERROR_NULL_ARGUMENT); if (point.length < 2) SWT.error(SWT.ERROR_INVALID_ARGUMENT); NSPoint pt = handle.currentPoint(); - point[0] = pt.x; - point[1] = pt.y; + point[0] = (float)/*64*/pt.x; + point[1] = (float)/*64*/pt.y; } /** @@ -446,15 +446,15 @@ public void getCurrentPoint(float[] point) { */ public PathData getPathData() { if (isDisposed()) SWT.error(SWT.ERROR_GRAPHIC_DISPOSED); - int count = handle.elementCount(); + int count = (int)/*64*/handle.elementCount(); int pointCount = 0, typeCount = 0; byte[] types = new byte[count]; float[] pointArray = new float[count * 6]; - int points = OS.malloc(3 * NSPoint.sizeof); + int /*long*/ points = OS.malloc(3 * NSPoint.sizeof); if (points == 0) SWT.error(SWT.ERROR_NO_HANDLES); NSPoint pt = new NSPoint(); for (int i = 0; i < count; i++) { - int element = handle.elementAtIndex(i, points); + int element = (int)/*64*/handle.elementAtIndex(i, points); switch (element) { case OS.NSMoveToBezierPathElement: types[typeCount++] = SWT.PATH_MOVE_TO; diff --git a/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/graphics/Region.java b/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/graphics/Region.java index 06eed01b7b..2181f5632d 100755 --- a/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/graphics/Region.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/graphics/Region.java @@ -39,7 +39,7 @@ public final class Region extends Resource { * platforms and should never be accessed from application code. * </p> */ - public int handle; + public int /*long*/ handle; /** * Constructs a new empty region. @@ -107,7 +107,7 @@ public void add (int[] pointArray) { void add(int[] pointArray, int count) { if (count <= 2) return; - int polyRgn = OS.NewRgn(); + int /*long*/ polyRgn = OS.NewRgn(); OS.OpenRgn(); OS.MoveTo((short)pointArray[0], (short)pointArray[1]); for (int i = 1; i < count / 2; i++) { @@ -161,7 +161,7 @@ public void add(Rectangle rect) { public void add(int x, int y, int width, int height) { if (isDisposed()) SWT.error(SWT.ERROR_GRAPHIC_DISPOSED); if (width < 0 || height < 0) SWT.error(SWT.ERROR_INVALID_ARGUMENT); - int rectRgn = OS.NewRgn(); + int /*long*/ rectRgn = OS.NewRgn(); short[] r = new short[4]; OS.SetRect(r, (short)x, (short)y, (short)(x + width),(short)(y + height)); OS.RectRgn(rectRgn, r); @@ -232,9 +232,9 @@ public boolean contains(Point pt) { NSAffineTransform transform; void convertRgn(NSAffineTransform transform) { - int newRgn = OS.NewRgn(); + int /*long*/ newRgn = OS.NewRgn(); Callback callback = new Callback(this, "convertRgn", 4); - int proc = callback.getAddress(); + int /*long*/ proc = callback.getAddress(); if (proc == 0) SWT.error(SWT.ERROR_NO_MORE_CALLBACKS); this.transform = transform; OS.QDRegionToRects(handle, OS.kQDParseRegionFromTopLeft, proc, newRgn); @@ -244,12 +244,12 @@ void convertRgn(NSAffineTransform transform) { OS.DisposeRgn(newRgn); } -int convertRgn(int message, int rgn, int r, int newRgn) { +int /*long*/ convertRgn(int /*long*/ message, int /*long*/ rgn, int /*long*/ r, int /*long*/ newRgn) { if (message == OS.kQDRegionToRectsMsgParse) { short[] rect = new short[4]; OS.memmove(rect, r, rect.length * 2); NSPoint point = new NSPoint(); - int polyRgn = OS.NewRgn(); + int /*long*/ polyRgn = OS.NewRgn(); OS.OpenRgn(); point.x = rect[1]; point.y = rect[0]; @@ -366,7 +366,7 @@ public static Region carbon_new(Device device, int handle) { * @see #equals */ public int hashCode() { - return handle; + return (int)/*64*/handle; } /** @@ -412,7 +412,7 @@ public void intersect(Rectangle rect) { public void intersect(int x, int y, int width, int height) { if (isDisposed()) SWT.error(SWT.ERROR_GRAPHIC_DISPOSED); if (width < 0 || height < 0) SWT.error(SWT.ERROR_INVALID_ARGUMENT); - int rectRgn = OS.NewRgn(); + int /*long*/ rectRgn = OS.NewRgn(); short[] r = new short[4]; OS.SetRect(r, (short)x, (short)y, (short)(x + width),(short)(y + height)); OS.RectRgn(rectRgn, r); @@ -539,7 +539,7 @@ public void subtract (int[] pointArray) { if (isDisposed()) SWT.error(SWT.ERROR_GRAPHIC_DISPOSED); if (pointArray == null) SWT.error(SWT.ERROR_NULL_ARGUMENT); if (pointArray.length < 2) return; - int polyRgn = OS.NewRgn(); + int /*long*/ polyRgn = OS.NewRgn(); OS.OpenRgn(); OS.MoveTo((short)pointArray[0], (short)pointArray[1]); for (int i = 1; i < pointArray.length / 2; i++) { @@ -594,7 +594,7 @@ public void subtract(Rectangle rect) { public void subtract(int x, int y, int width, int height) { if (isDisposed()) SWT.error(SWT.ERROR_GRAPHIC_DISPOSED); if (width < 0 || height < 0) SWT.error(SWT.ERROR_INVALID_ARGUMENT); - int rectRgn = OS.NewRgn(); + int /*long*/ rectRgn = OS.NewRgn(); short[] r = new short[4]; OS.SetRect(r, (short)x, (short)y, (short)(x + width),(short)(y + height)); OS.RectRgn(rectRgn, r); diff --git a/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/graphics/TextLayout.java b/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/graphics/TextLayout.java index 29cf4230a5..c55b3f4f04 100755 --- a/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/graphics/TextLayout.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/graphics/TextLayout.java @@ -141,7 +141,7 @@ void computeRuns() { textStorage.addAttribute(OS.NSParagraphStyleAttributeName, paragraph, range); paragraph.release(); - int textLength = str.length(); + int /*long*/ textLength = str.length(); for (int i = 0; i < styles.length - 1; i++) { StyleItem run = styles[i]; if (run.style == null) continue; @@ -204,8 +204,9 @@ void computeRuns() { textContainer.setLineFragmentPadding(0); layoutManager.glyphRangeForTextContainer(textContainer); - int numberOfLines, index, numberOfGlyphs = layoutManager.numberOfGlyphs(); - int rangePtr = OS.malloc(NSRange.sizeof); + int numberOfLines; + int /*long*/ numberOfGlyphs = layoutManager.numberOfGlyphs(), index; + int /*long*/ rangePtr = OS.malloc(NSRange.sizeof); NSRange lineRange = new NSRange(); for (numberOfLines = 0, index = 0; index < numberOfGlyphs; numberOfLines++){ layoutManager.lineFragmentUsedRectForGlyphAtIndex(index, rangePtr, true); @@ -218,7 +219,7 @@ void computeRuns() { for (numberOfLines = 0, index = 0; index < numberOfGlyphs; numberOfLines++){ bounds[numberOfLines] = layoutManager.lineFragmentUsedRectForGlyphAtIndex(index, rangePtr, true); OS.memmove(lineRange, rangePtr, NSRange.sizeof); - offsets[numberOfLines] = lineRange.location; + offsets[numberOfLines] = (int)/*64*/lineRange.location; index = lineRange.location + lineRange.length; } if (numberOfLines == 0) { @@ -228,7 +229,7 @@ void computeRuns() { bounds[0].height = Math.max(layoutManager.defaultLineHeightForFont(nsFont), ascent + descent); } OS.free(rangePtr); - offsets[numberOfLines] = textStorage.length(); + offsets[numberOfLines] = (int)/*64*/textStorage.length(); this.lineOffsets = offsets; this.lineBounds = bounds; } @@ -703,7 +704,7 @@ public Point getLocation(int offset, boolean trailing) { if (!(0 <= offset && offset <= length)) SWT.error(SWT.ERROR_INVALID_RANGE); if (length == 0) return new Point(0, 0); offset = translateOffset(offset); - int glyphIndex = layoutManager.glyphIndexForCharacterAtIndex(offset); + int /*long*/ glyphIndex = layoutManager.glyphIndexForCharacterAtIndex(offset); NSRect rect = layoutManager.lineFragmentUsedRectForGlyphAtIndex(glyphIndex, 0); NSPoint point = layoutManager.locationForGlyphAtIndex(glyphIndex); if (trailing) { @@ -757,15 +758,15 @@ int _getOffset (int offset, int movement, boolean forward) { return Math.max(0, Math.min(length, untranslateOffset(offset))); } case SWT.MOVEMENT_WORD: { - return untranslateOffset(textStorage.nextWordFromIndex(offset, forward)); + return untranslateOffset((int)/*64*/textStorage.nextWordFromIndex(offset, forward)); } case SWT.MOVEMENT_WORD_END: { NSRange range = textStorage.doubleClickAtIndex(length == offset ? length - 1 : offset); - return untranslateOffset(range.location + range.length); + return untranslateOffset((int)/*64*/(range.location + range.length)); } case SWT.MOVEMENT_WORD_START: { NSRange range = textStorage.doubleClickAtIndex(length == offset ? length - 1 : offset); - return untranslateOffset(range.location); + return untranslateOffset((int)/*64*/range.location); } default: break; @@ -836,10 +837,10 @@ public int getOffset(int x, int y, int[] trailing) { pt.x = x; pt.y = y; float[] partialFration = new float[1]; - int glyphIndex = layoutManager.glyphIndexForPoint(pt, textContainer, partialFration); - int offset = layoutManager.characterIndexForGlyphAtIndex(glyphIndex); + int /*long*/ glyphIndex = layoutManager.glyphIndexForPoint(pt, textContainer, partialFration); + int /*long*/ offset = layoutManager.characterIndexForGlyphAtIndex(glyphIndex); if (trailing != null) trailing[0] = Math.round(partialFration[0]); - return Math.min(untranslateOffset(offset), length - 1); + return Math.min(untranslateOffset((int)/*64*/offset), length - 1); } /** diff --git a/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/graphics/Transform.java b/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/graphics/Transform.java index e691bfe8d7..5b32955e58 100755 --- a/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/graphics/Transform.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/graphics/Transform.java @@ -167,12 +167,12 @@ public void getElements(float[] elements) { if (elements == null) SWT.error(SWT.ERROR_NULL_ARGUMENT); if (elements.length < 6) SWT.error(SWT.ERROR_INVALID_ARGUMENT); NSAffineTransformStruct struct = handle.transformStruct(); - elements[0] = struct.m11; - elements[1] = struct.m12; - elements[2] = struct.m21; - elements[3] = struct.m22; - elements[4] = struct.tX; - elements[5] = struct.tY; + elements[0] = (float)/*64*/struct.m11; + elements[1] = (float)/*64*/struct.m12; + elements[2] = (float)/*64*/struct.m21; + elements[3] = (float)/*64*/struct.m22; + elements[4] = (float)/*64*/struct.tX; + elements[5] = (float)/*64*/struct.tY; } /** @@ -368,8 +368,8 @@ public void transform(float[] pointArray) { point.x = pointArray[j]; point.y = pointArray[j + 1]; point = handle.transformPoint(point); - pointArray[j] = point.x; - pointArray[j + 1] = point.y; + pointArray[j] = (float)/*64*/point.x; + pointArray[j + 1] = (float)/*64*/point.y; } } diff --git a/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Button.java b/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Button.java index 71c49e3cfe..0ccd6dab94 100755 --- a/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Button.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Button.java @@ -216,7 +216,7 @@ void createHandle () { _setAlignment(style); } -void drawWidget (int id, NSRect rect) { +void drawWidget (int /*long*/ id, NSRect rect) { if ((style & SWT.ARROW) != 0) { NSRect frame = view.frame(); int arrowSize = Math.min((int)frame.height, (int)frame.width) / 2; diff --git a/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Canvas.java b/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Canvas.java index 2ebc15dff2..b0cca3b41d 100755 --- a/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Canvas.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Canvas.java @@ -45,17 +45,17 @@ Canvas () { /* Do nothing */ } -int attributedSubstringFromRange (int id, int sel, int range) { +int /*long*/ attributedSubstringFromRange (int /*long*/ id, int /*long*/ sel, int /*long*/ range) { if (ime != null) return ime.attributedSubstringFromRange (id, sel, range); return super.attributedSubstringFromRange(id, sel, range); } -boolean becomeFirstResponder (int id, int sel) { +boolean becomeFirstResponder (int /*long*/ id, int /*long*/ sel) { if (caret != null) caret.setFocus (); return super.becomeFirstResponder(id, sel); } -boolean resignFirstResponder (int id, int sel) { +boolean resignFirstResponder (int /*long*/ id, int /*long*/ sel) { if (caret != null) caret.killFocus (); return super.resignFirstResponder(id, sel); } @@ -92,7 +92,7 @@ public Canvas (Composite parent, int style) { super (parent, style); } -int characterIndexForPoint (int id, int sel, int point) { +int /*long*/ characterIndexForPoint (int /*long*/ id, int /*long*/ sel, int /*long*/ point) { if (ime != null) return ime.characterIndexForPoint (id, sel, point); return super.characterIndexForPoint (id, sel, point); } @@ -135,7 +135,7 @@ public void drawBackground (GC gc, int x, int y, int width, int height) { } } -void drawWidget (int id, NSRect rect) { +void drawWidget (int /*long*/ id, NSRect rect) { super.drawWidget (id, rect); if (caret == null) return; if (caret.isShowing) { @@ -168,7 +168,7 @@ void drawWidget (int id, NSRect rect) { } } -NSRect firstRectForCharacterRange (int id, int sel, int range) { +NSRect firstRectForCharacterRange (int /*long*/ id, int /*long*/ sel, int /*long*/ range) { if (ime != null) return ime.firstRectForCharacterRange (id, sel, range); return super.firstRectForCharacterRange (id, sel, range); } @@ -213,19 +213,19 @@ public IME getIME () { return ime; } -boolean hasMarkedText (int id, int sel) { +boolean hasMarkedText (int /*long*/ id, int /*long*/ sel) { if (ime != null) return ime.hasMarkedText (id, sel); return super.hasMarkedText (id, sel); } -boolean insertText (int id, int sel, int string) { +boolean insertText (int /*long*/ id, int /*long*/ sel, int /*long*/ string) { if (ime != null) { if (!ime.insertText (id, sel, string)) return false; } return super.insertText (id, sel, string); } -NSRange markedRange (int id, int sel) { +NSRange markedRange (int /*long*/ id, int /*long*/ sel) { if (ime != null) return ime.markedRange (id, sel); return super.markedRange (id, sel); } @@ -323,7 +323,7 @@ public void scroll (int destX, int destY, int x, int y, int width, int height, b if (isFocus) caret.setFocus (); } -NSRange selectedRange (int id, int sel) { +NSRange selectedRange (int /*long*/ id, int /*long*/ sel) { if (ime != null) return ime.selectedRange (id, sel); return super.selectedRange (id, sel); } @@ -394,14 +394,14 @@ public void setIME (IME ime) { this.ime = ime; } -boolean setMarkedText_selectedRange (int id, int sel, int string, int range) { +boolean setMarkedText_selectedRange (int /*long*/ id, int /*long*/ sel, int /*long*/ string, int /*long*/ range) { if (ime != null) { if (!ime.setMarkedText_selectedRange (id, sel, string, range)) return false; } return super.setMarkedText_selectedRange (id, sel, string, range); } -int validAttributesForMarkedText (int id, int sel) { +int /*long*/ validAttributesForMarkedText (int /*long*/ id, int /*long*/ sel) { if (ime != null) return ime.validAttributesForMarkedText (id, sel); return super.validAttributesForMarkedText(id, sel); } diff --git a/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/ColorDialog.java b/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/ColorDialog.java index 679e17b0c9..37768e55ba 100755 --- a/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/ColorDialog.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/ColorDialog.java @@ -89,7 +89,7 @@ public ColorDialog(Shell parent, int style) { checkSubclass (); } -void changeColor(int sender) { +void changeColor(int /*long*/ id, int /*long*/ sel, int /*long*/ sender) { //TODO } @@ -124,7 +124,7 @@ public RGB open() { panel.setColor(color); } SWTPanelDelegate delegate = (SWTPanelDelegate)new SWTPanelDelegate().alloc().init(); - int jniRef = OS.NewGlobalRef(this); + int /*long*/ jniRef = OS.NewGlobalRef(this); if (jniRef == 0) SWT.error(SWT.ERROR_NO_HANDLES); OS.object_setInstanceVariable(delegate.id, Display.SWT_OBJECT, jniRef); panel.setDelegate(delegate); @@ -154,7 +154,7 @@ public void setRGB(RGB rgb) { this.rgb = rgb; } -void windowWillClose(int sender) { +void windowWillClose(int /*long*/ id, int /*long*/ sel, int /*long*/ sender) { NSApplication.sharedApplication().stop(null); } } diff --git a/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Combo.java b/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Combo.java index c0d53ffaab..8cf6ded9e9 100755 --- a/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Combo.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Combo.java @@ -265,7 +265,7 @@ public void addVerifyListener (VerifyListener listener) { addListener (SWT.Verify, typedListener); } -boolean becomeFirstResponder (int id, int sel) { +boolean becomeFirstResponder (int /*long*/ id, int /*long*/ sel) { receivingFocus = true; boolean result = super.becomeFirstResponder (id, sel); receivingFocus = false; @@ -330,7 +330,7 @@ public void clearSelection () { } } -void comboBoxSelectionDidChange(int notification) { +void comboBoxSelectionDidChange(int /*long*/ id, int /*long*/ sel, int /*long*/ notification) { sendSelection(); } @@ -487,7 +487,7 @@ int getCharCount() { } else { str = new NSCell(((NSComboBox)view).cell()).title(); } - return str.length(); + return (int)/*64*/str.length(); } /** @@ -533,9 +533,9 @@ public String getItem (int index) { public int getItemCount () { checkWidget (); if ((style & SWT.READ_ONLY) != 0) { - return ((NSPopUpButton)view).numberOfItems(); + return (int)/*64*/((NSPopUpButton)view).numberOfItems(); } else { - return ((NSComboBox)view).numberOfItems(); + return (int)/*64*/((NSComboBox)view).numberOfItems(); } } @@ -627,9 +627,9 @@ public Point getSelection () { } else { if (selectionRange == null) { NSString str = new NSTextFieldCell (((NSTextField) view).cell ()).title (); - return new Point(str.length (), str.length ()); + return new Point((int)/*64*/str.length (), (int)/*64*/str.length ()); } - return new Point(selectionRange.location, selectionRange.location + selectionRange.length); + return new Point((int)/*64*/selectionRange.location, (int)/*64*/(selectionRange.location + selectionRange.length)); } } @@ -647,7 +647,7 @@ public Point getSelection () { public int getSelectionIndex () { checkWidget (); if ((style & SWT.READ_ONLY) != 0) { - return ((NSPopUpButton)view).indexOfSelectedItem(); + return (int)/*64*/((NSPopUpButton)view).indexOfSelectedItem(); } else { return indexOf (getText ()); } @@ -681,12 +681,12 @@ char [] getText (int start, int end) { NSRange range = new NSRange (); range.location = start; if (end == -1) { - int length = str.length(); + int /*long*/ length = str.length(); range.length = length - start; } else { range.length = end - start; } - char [] buffer= new char [range.length]; + char [] buffer= new char [(int)/*64*/range.length]; str.getCharacters(buffer, range); return buffer; } @@ -749,7 +749,7 @@ public int getVisibleItemCount () { if ((style & SWT.READ_ONLY) != 0) { return getItemCount (); } else { - return ((NSComboBox)view).numberOfVisibleItems(); + return (int)/*64*/((NSComboBox)view).numberOfVisibleItems(); } } @@ -1261,7 +1261,7 @@ public void setSelection (Point selection) { if (selection == null) error (SWT.ERROR_NULL_ARGUMENT); if ((style & SWT.READ_ONLY) == 0) { NSString str = new NSCell(((NSComboBox)view).cell()).title(); - int length = str.length(); + int length = (int)/*64*/str.length(); int start = Math.min (Math.max (Math.min (selection.x, selection.y), 0), length); int end = Math.min (Math.max (Math.max (selection.x, selection.y), 0), length); selectionRange = new NSRange(); @@ -1374,17 +1374,17 @@ public void setVisibleItemCount (int count) { } } -void textViewDidChangeSelection(int aNotification) { +void textViewDidChangeSelection(int /*long*/ id, int /*long*/ sel, int /*long*/ aNotification) { NSNotification notification = new NSNotification(aNotification); NSText editor = new NSText(notification.object().id); selectionRange = editor.selectedRange(); } -void textDidChange (int aNotification) { +void textDidChange (int /*long*/ id, int /*long*/ sel, int /*long*/ aNotification) { postEvent (SWT.Modify); } -NSRange textView_willChangeSelectionFromCharacterRange_toCharacterRange(int aTextView, int oldSelectedCharRange, int newSelectedCharRange) { +NSRange textView_willChangeSelectionFromCharacterRange_toCharacterRange(int /*long*/ id, int /*long*/ sel, int /*long*/ aTextView, int /*long*/ oldSelectedCharRange, int /*long*/ newSelectedCharRange) { /* * If the selection is changing as a result of the receiver getting focus * then return the receiver's last selection range, otherwise the full diff --git a/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Composite.java b/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Composite.java index e1669432d6..8345585235 100755 --- a/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Composite.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Composite.java @@ -91,7 +91,7 @@ public Composite (Composite parent, int style) { Control [] _getChildren () { NSArray views = contentView().subviews(); - int count = views.count(); + int count = (int)/*64*/views.count(); Control [] children = new Control [count]; if (count == 0) return children; int j = 0; @@ -125,7 +125,7 @@ Control [] _getTabList () { return tabList; } -boolean acceptsFirstResponder (int id, int sel) { +boolean acceptsFirstResponder (int /*long*/ id, int /*long*/ sel) { if ((state & CANVAS) != 0) { return ((style & SWT.NO_FOCUS) == 0); } @@ -242,7 +242,7 @@ void createHandle () { view = widget; } -void drawWidget (int id, NSRect rect) { +void drawWidget (int /*long*/ id, NSRect rect) { if ((state & CANVAS) != 0) { if ((style & SWT.NO_BACKGROUND) == 0) { NSGraphicsContext context = NSGraphicsContext.currentContext(); @@ -458,7 +458,7 @@ public boolean isLayoutDeferred () { return findDeferredControl () != null; } -boolean isOpaque (int id, int sel) { +boolean isOpaque (int /*long*/ id, int /*long*/ sel) { if ((state & CANVAS) != 0) { if (id == view.id) { if (region == null && background != null && background.handle[3] == 1) { @@ -474,7 +474,7 @@ boolean isTabGroup () { return super.isTabGroup (); } -void keyDown (int id, int sel, int theEvent) { +void keyDown (int /*long*/ id, int /*long*/ sel, int /*long*/ theEvent) { if ((state & CANVAS) != 0) { NSArray array = NSArray.arrayWithObject (new NSEvent (theEvent)); view.interpretKeyEvents (array); @@ -680,12 +680,12 @@ Point minimumSize (int wHint, int Hint, boolean changed) { return new Point (width, height); } -void pageDown(int id, int sel, int sender) { +void pageDown(int /*long*/ id, int /*long*/ sel, int /*long*/ sender) { if ((state & CANVAS) != 0) return; super.pageDown(id, sel, sender); } -void pageUp(int id, int sel, int sender) { +void pageUp(int /*long*/ id, int /*long*/ sel, int /*long*/ sender) { if ((state & CANVAS) != 0) return; super.pageUp(id, sel, sender); } @@ -719,12 +719,12 @@ void resized () { } } -void scrollWheel (int id, int sel, int theEvent) { +void scrollWheel (int /*long*/ id, int /*long*/ sel, int /*long*/ theEvent) { if ((state & CANVAS) != 0) { NSView view = scrollView != null ? scrollView : this.view; if (id == view.id) { NSEvent nsEvent = new NSEvent(theEvent); - float delta = nsEvent.deltaY(); + double /*float*/ delta = nsEvent.deltaY(); if (delta != 0) { if (hooks (SWT.MouseWheel) || filters (SWT.MouseWheel)) { if (!sendMouseEvent(nsEvent, SWT.MouseWheel, true)) { diff --git a/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Control.java b/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Control.java index 50549b9301..f9b1e40baa 100755 --- a/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Control.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Control.java @@ -105,13 +105,13 @@ public Control (Composite parent, int style) { createWidget (); } -boolean becomeFirstResponder (int id, int sel) { +boolean becomeFirstResponder (int /*long*/ id, int /*long*/ sel) { boolean result = super.becomeFirstResponder (id, sel); if (result && id == focusView ().id) sendFocusEvent (SWT.FocusIn, false); return result; } -boolean resignFirstResponder (int id, int sel) { +boolean resignFirstResponder (int /*long*/ id, int /*long*/ sel) { boolean result = super.resignFirstResponder (id, sel); if (result && id == focusView ().id) sendFocusEvent (SWT.FocusOut, false); return result; @@ -644,7 +644,7 @@ void destroyWidget () { releaseHandle (); } -boolean doCommandBySelector (int id, int sel, int selector) { +boolean doCommandBySelector (int /*long*/ id, int /*long*/ sel, int /*long*/ selector) { if (view.window ().firstResponder ().id == id) { NSEvent nsEvent = NSApplication.sharedApplication ().currentEvent (); if (nsEvent != null && nsEvent.type () == OS.NSKeyDown) { @@ -770,7 +770,7 @@ boolean drawGripper (int x, int y, int width, int height, boolean vertical) { return false; } -void drawWidget (int id, NSRect rect) { +void drawWidget (int /*long*/ id, NSRect rect) { if (id != view.id) return; if (!hooks (SWT.Paint) && !filters (SWT.Paint)) return; @@ -854,12 +854,12 @@ void fixFocus (Control focusControl) { // OS.ClearKeyboardFocus (window); } -void flagsChanged (int id, int sel, int theEvent) { +void flagsChanged (int /*long*/ id, int /*long*/ sel, int /*long*/ theEvent) { if (view.window ().firstResponder ().id == id) { if ((state & SAFARI_EVENTS_FIX) == 0) { int mask = 0; NSEvent nsEvent = new NSEvent (theEvent); - int modifiers = nsEvent.modifierFlags (); + int /*long*/ modifiers = nsEvent.modifierFlags (); int keyCode = Display.translateKey (nsEvent.keyCode ()); switch (keyCode) { case SWT.ALT: mask = OS.NSAlternateKeyMask; break; @@ -1351,12 +1351,12 @@ boolean hasFocus () { return this == display.getFocusControl (); } -int hitTest (int id, int sel, NSPoint point) { +int /*long*/ hitTest (int /*long*/ id, int /*long*/ sel, NSPoint point) { if ((state & DISABLED) != 0) return 0; return super.hitTest(id, sel, point); } -boolean insertText (int id, int sel, int string) { +boolean insertText (int /*long*/ id, int /*long*/ sel, int /*long*/ string) { if (view.window ().firstResponder ().id == id) { NSEvent nsEvent = NSApplication.sharedApplication ().currentEvent (); if (nsEvent != null && nsEvent.type () == OS.NSKeyDown) { @@ -1364,7 +1364,7 @@ boolean insertText (int id, int sel, int string) { if (str.isKindOfClass (OS.objc_getClass ("NSAttributedString"))) { str = new NSAttributedString (string).string (); } - int length = str.length (); + int length = (int)/*64*/str.length (); char[] buffer = new char [length]; str.getCharacters(buffer); for (int i = 0; i < buffer.length; i++) { @@ -1392,9 +1392,9 @@ boolean insertText (int id, int sel, int string) { * @param data the platform specific GC data * @return the platform specific GC handle */ -public int internal_new_GC (GCData data) { +public int /*long*/ internal_new_GC (GCData data) { checkWidget(); - int context = 0; + int /*long*/ context = 0; if (data != null && data.paintRect != null) { context = NSGraphicsContext.currentContext().id; } else { @@ -1432,7 +1432,7 @@ public int internal_new_GC (GCData data) { * @param hDC the platform specific GC handle * @param data the platform specific GC data */ -public void internal_dispose_GC (int context, GCData data) { +public void internal_dispose_GC (int /*long*/ context, GCData data) { checkWidget (); NSGraphicsContext graphicsContext = new NSGraphicsContext (context); display.removeContext (graphicsContext); @@ -1572,7 +1572,7 @@ public boolean isVisible () { return getVisible () && parent.isVisible (); } -void keyDown (int id, int sel, int theEvent) { +void keyDown (int /*long*/ id, int /*long*/ sel, int /*long*/ theEvent) { if (view.window ().firstResponder ().id == id) { boolean textInput = OS.objc_msgSend (id, OS.sel_conformsToProtocol_, OS.objc_getProtocol ("NSTextInput")) != 0; if (!textInput) { @@ -1587,7 +1587,7 @@ void keyDown (int id, int sel, int theEvent) { super.keyDown (id, sel, theEvent); } -void keyUp (int id, int sel, int theEvent) { +void keyUp (int /*long*/ id, int /*long*/ sel, int /*long*/ theEvent) { if (view.window ().firstResponder ().id == id) { NSEvent nsEvent = new NSEvent (theEvent); if (!sendKeyEvent (nsEvent, SWT.KeyUp)) return; @@ -1599,7 +1599,7 @@ void markLayout (boolean changed, boolean all) { /* Do nothing */ } -int menuForEvent (int id, int sel, int theEvent) { +int /*long*/ menuForEvent (int /*long*/ id, int /*long*/ sel, int /*long*/ theEvent) { NSPoint pt = NSEvent.mouseLocation(); pt.y = (int) (display.getPrimaryFrame().height - pt.y); int x = (int) pt.x; @@ -1623,7 +1623,7 @@ Decorations menuShell () { return parent.menuShell (); } -void scrollWheel (int id, int sel, int theEvent) { +void scrollWheel (int /*long*/ id, int /*long*/ sel, int /*long*/ theEvent) { if (id == view.id) { if (hooks (SWT.MouseWheel) || filters (SWT.MouseWheel)) { NSEvent nsEvent = new NSEvent(theEvent); @@ -1637,7 +1637,7 @@ void scrollWheel (int id, int sel, int theEvent) { super.scrollWheel(id, sel, theEvent); } -void mouseDown(int id, int sel, int theEvent) { +void mouseDown(int /*long*/ id, int /*long*/ sel, int /*long*/ theEvent) { Display display = this.display; display.trackingControl = this; super.mouseDown(id, sel, theEvent); @@ -2259,7 +2259,7 @@ boolean sendMouseEvent (NSEvent nsEvent, int type, boolean send) { //FALL THROUGH case SWT.MouseUp: case SWT.MouseDoubleClick: - int button = nsEvent.buttonNumber(); + int button = (int)/*64*/nsEvent.buttonNumber(); switch (button) { case 0: event.button = 1; break; case 1: event.button = 3; break; @@ -2270,11 +2270,11 @@ boolean sendMouseEvent (NSEvent nsEvent, int type, boolean send) { break; case SWT.MouseWheel: event.detail = SWT.SCROLL_LINE; - float delta = nsEvent.deltaY(); + double /*float*/ delta = nsEvent.deltaY(); event.count = delta > 0 ? Math.max (1, (int)delta) : Math.min (-1, (int)delta); break; } - if (event.button != 0) event.count = nsEvent.clickCount(); + if (event.button != 0) event.count = (int)/*64*/nsEvent.clickCount(); NSPoint windowPoint = view.window().convertScreenToBase(NSEvent.mouseLocation()); NSPoint point = view.convertPoint_fromView_(windowPoint, null); event.x = (int) point.x; @@ -2642,7 +2642,7 @@ void setForeground (int control, float [] color) { // OS.SetControlFontStyle (control, fontStyle); } -void setFrameOrigin (int id, int sel, NSPoint point) { +void setFrameOrigin (int /*long*/ id, int /*long*/ sel, NSPoint point) { NSView topView = topView (); if (topView.id != id) { super.setFrameOrigin(id, sel, point); @@ -2655,7 +2655,7 @@ void setFrameOrigin (int id, int sel, NSPoint point) { } } -void setFrameSize (int id, int sel, NSSize size) { +void setFrameSize (int /*long*/ id, int /*long*/ sel, NSSize size) { NSView topView = topView (); if (topView.id != id) { super.setFrameSize(id, sel, size); @@ -3138,7 +3138,7 @@ boolean translateTraversal (int key, NSEvent theEvent, boolean [] consume) { break; } case 48: /* Tab */ { - int modifiers = theEvent.modifierFlags (); + int /*long*/ modifiers = theEvent.modifierFlags (); boolean next = (modifiers & OS.NSShiftKeyMask) == 0; detail = next ? SWT.TRAVERSE_TAB_NEXT : SWT.TRAVERSE_TAB_PREVIOUS; break; @@ -3154,7 +3154,7 @@ boolean translateTraversal (int key, NSEvent theEvent, boolean [] consume) { case 116: /* Page up */ case 121: /* Page down */ { all = true; - int modifiers = theEvent.modifierFlags (); + int /*long*/ modifiers = theEvent.modifierFlags (); if ((modifiers & OS.NSControlKeyMask) == 0) return false; detail = key == 121 /* Page down */ ? SWT.TRAVERSE_PAGE_NEXT : SWT.TRAVERSE_PAGE_PREVIOUS; break; diff --git a/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/DateTime.java b/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/DateTime.java index e7928561a7..981bc30cf6 100755 --- a/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/DateTime.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/DateTime.java @@ -192,7 +192,7 @@ NSCalendarDate getCalendarDate () { */ public int getDay () { checkWidget (); - return getCalendarDate().dayOfMonth(); + return (int)/*64*/getCalendarDate().dayOfMonth(); } /** @@ -210,7 +210,7 @@ public int getDay () { */ public int getHours () { checkWidget (); - return getCalendarDate().hourOfDay(); + return (int)/*64*/getCalendarDate().hourOfDay(); } /** @@ -228,7 +228,7 @@ public int getHours () { */ public int getMinutes () { checkWidget (); - return getCalendarDate().minuteOfHour(); + return (int)/*64*/getCalendarDate().minuteOfHour(); } /** @@ -246,7 +246,7 @@ public int getMinutes () { */ public int getMonth () { checkWidget (); - return getCalendarDate().monthOfYear() - 1; + return (int)/*64*/getCalendarDate().monthOfYear() - 1; } String getNameText() { @@ -269,7 +269,7 @@ String getNameText() { */ public int getSeconds () { checkWidget (); - return getCalendarDate().secondOfMinute(); + return (int)/*64*/getCalendarDate().secondOfMinute(); } /** @@ -287,7 +287,7 @@ public int getSeconds () { */ public int getYear () { checkWidget (); - return getCalendarDate().yearOfCommonEra(); + return (int)/*64*/getCalendarDate().yearOfCommonEra(); } /** diff --git a/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/DirectoryDialog.java b/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/DirectoryDialog.java index 89e57bcef2..32ac8ba951 100755 --- a/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/DirectoryDialog.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/DirectoryDialog.java @@ -125,7 +125,7 @@ public String open () { panel.setTitle(NSString.stringWith(title != null ? title : "")); panel.setCanChooseFiles(false); panel.setCanChooseDirectories(true); - int response = panel.runModal(); + int /*long*/ response = panel.runModal(); if (response == OS.NSFileHandlingPanelOKButton) { NSString filename = panel.filename(); directoryPath = filterPath = filename.getString(); diff --git a/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Display.java b/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Display.java index c27fe1586c..06eeda4930 100755 --- a/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Display.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Display.java @@ -678,13 +678,13 @@ void createDisplay (DeviceData data) { pool = (NSAutoreleasePool)new NSAutoreleasePool().alloc().init(); applicationCallback3 = new Callback(this, "applicationProc", 3); - int proc3 = applicationCallback3.getAddress(); + int /*long*/ proc3 = applicationCallback3.getAddress(); if (proc3 == 0) error (SWT.ERROR_NO_MORE_CALLBACKS); applicationCallback6 = new Callback(this, "applicationProc", 6); - int proc6 = applicationCallback6.getAddress(); + int /*long*/ proc6 = applicationCallback6.getAddress(); if (proc6 == 0) error (SWT.ERROR_NO_MORE_CALLBACKS); String className = "SWTApplication"; - int cls = OS.objc_allocateClassPair(OS.class_NSApplication, className, 0); + int /*long*/ cls = OS.objc_allocateClassPair(OS.class_NSApplication, className, 0); OS.class_addMethod(cls, OS.sel_sendEvent_, proc3, "@:@"); OS.class_addMethod(cls, OS.sel_nextEventMatchingMask_untilDate_inMode_dequeue_, proc6, "@:i@@B"); OS.objc_registerClassPair(cls); @@ -781,7 +781,7 @@ boolean filters (int eventType) { * <li>ERROR_DEVICE_DISPOSED - if the receiver has been disposed</li> * </ul> */ -public Widget findWidget (int handle) { +public Widget findWidget (int /*long*/ handle) { checkDevice (); return getWidget (handle); } @@ -808,9 +808,9 @@ public Widget findWidget (int handle) { * * @since 3.1 */ -public Widget findWidget (int handle, int id) { +public Widget findWidget (int /*long*/ handle, int id) { checkDevice (); - return null; + return getWidget (handle); } /** @@ -900,14 +900,14 @@ public Rectangle getBounds () { Rectangle getBounds (NSArray screens) { NSRect primaryFrame = new NSScreen(screens.objectAtIndex(0)).frame(); - float minX = Float.MAX_VALUE, maxX = Float.MIN_VALUE; - float minY = Float.MAX_VALUE, maxY = Float.MIN_VALUE; - int count = screens.count(); + double /*float*/ minX = Float.MAX_VALUE, maxX = Float.MIN_VALUE; + double /*float*/ minY = Float.MAX_VALUE, maxY = Float.MIN_VALUE; + int /*long*/ count = screens.count(); for (int i = 0; i < count; i++) { NSScreen screen = new NSScreen(screens.objectAtIndex(i)); NSRect frame = screen.frame(); - float x1 = frame.x, x2 = frame.x + frame.width; - float y1 = primaryFrame.height - frame.y, y2 = primaryFrame.height - (frame.y + frame.height); + double /*float*/ x1 = frame.x, x2 = frame.x + frame.width; + double /*float*/ y1 = primaryFrame.height - frame.y, y2 = primaryFrame.height - (frame.y + frame.height); if (x1 < minX) minX = x1; if (x2 < minX) minX = x2; if (x1 > maxX) maxX = x1; @@ -956,7 +956,7 @@ public Rectangle getClientArea () { NSScreen screen = new NSScreen(screens.objectAtIndex(0)); NSRect frame = screen.frame(); NSRect visibleFrame = screen.visibleFrame(); - float y = frame.height - (visibleFrame.y + visibleFrame.height); + double /*float*/ y = frame.height - (visibleFrame.y + visibleFrame.height); return new Rectangle((int)visibleFrame.x, (int)y, (int)visibleFrame.width, (int)visibleFrame.height); } @@ -1270,7 +1270,7 @@ public Monitor [] getMonitors () { checkDevice (); NSArray screens = NSScreen.screens(); NSRect primaryFrame = new NSScreen(screens.objectAtIndex(0)).frame(); - int count = screens.count(); + int count = (int)/*64*/screens.count(); Monitor [] monitors = new Monitor [count]; for (int i=0; i<count; i++) { Monitor monitor = new Monitor (); @@ -1335,7 +1335,7 @@ public Shell [] getShells () { checkDevice (); NSArray windows = application.windows(); int index = 0; - Shell [] result = new Shell [windows.count()]; + Shell [] result = new Shell [(int)/*64*/windows.count()]; for (int i = 0; i < result.length; i++) { NSWindow window = new NSWindow(windows.objectAtIndex(i)); Widget widget = getWidget(window.contentView()); @@ -1436,7 +1436,7 @@ public Color getSystemColor (int id) { if (color == null) return super.getSystemColor(id); color = color.colorUsingColorSpace(NSColorSpace.deviceRGBColorSpace()); if (color == null) return super.getSystemColor(id); - float[] components = new float[color.numberOfComponents()]; + float[] components = new float[(int)/*64*/color.numberOfComponents()]; color.getComponents(components); return Color.cocoa_new (this, new float[]{components[0], components[1], components[2], components[3]}); } @@ -1588,9 +1588,9 @@ int getToolTipTime () { return 560; } -Widget getWidget (int id) { +Widget getWidget (int /*long*/ id) { if (id == 0) return null; - int [] jniRef = new int [1]; + int /*long*/ [] jniRef = new int /*long*/ [1]; OS.object_getInstanceVariable(id, SWT_OBJECT, jniRef); if (jniRef[0] == 0) return null; return (Widget)OS.JNIGetObject(jniRef[0]); @@ -1626,11 +1626,11 @@ protected void init () { void initApplicationDelegate() { applicationDelegateCallback3 = new Callback(this, "applicationDelegateProc", 3); - int appProc3 = applicationDelegateCallback3.getAddress(); + int /*long*/ appProc3 = applicationDelegateCallback3.getAddress(); if (appProc3 == 0) error (SWT.ERROR_NO_MORE_CALLBACKS); String className = "SWTApplicationDelegate"; - int cls = OS.objc_allocateClassPair(OS.class_NSObject, className, 0); + int /*long*/ cls = OS.objc_allocateClassPair(OS.class_NSObject, className, 0); OS.class_addMethod(cls, OS.sel_applicationWillFinishLaunching_, appProc3, "@:@"); OS.class_addMethod(cls, OS.sel_terminate_, appProc3, "@:@"); OS.class_addMethod(cls, OS.sel_orderFrontStandardAboutPanel_, appProc3, "@:@"); @@ -1645,7 +1645,7 @@ void initApplicationDelegate() { application.setDelegate(applicationDelegate); } -void addEventMethods (int cls, int proc2, int proc3, int drawRectProc) { +void addEventMethods (int /*long*/ cls, int /*long*/ proc2, int /*long*/ proc3, int /*long*/ drawRectProc) { OS.class_addMethod(cls, OS.sel_mouseDown_, proc3, "@:@"); OS.class_addMethod(cls, OS.sel_mouseUp_, proc3, "@:@"); OS.class_addMethod(cls, OS.sel_scrollWheel_, proc3, "@:@"); @@ -1666,47 +1666,47 @@ void addEventMethods (int cls, int proc2, int proc3, int drawRectProc) { OS.class_addMethod(cls, OS.sel_drawRect_, drawRectProc, "@:{NSRect}"); } -void addFrameMethods(int cls, int setFrameOriginProc, int setFrameSizeProc) { +void addFrameMethods(int /*long*/ cls, int /*long*/ setFrameOriginProc, int /*long*/ setFrameSizeProc) { OS.class_addMethod(cls, OS.sel_setFrameOrigin_, setFrameOriginProc, "@:{NSPoint}"); OS.class_addMethod(cls, OS.sel_setFrameSize_, setFrameSizeProc, "@:{NSSize}"); } void initClasses () { dialogCallback3 = new Callback(this, "dialogProc", 3); - int dialogProc3 = dialogCallback3.getAddress(); + int /*long*/ dialogProc3 = dialogCallback3.getAddress(); if (dialogProc3 == 0) error (SWT.ERROR_NO_MORE_CALLBACKS); windowDelegateCallback3 = new Callback(this, "windowDelegateProc", 3); - int proc3 = windowDelegateCallback3.getAddress(); + int /*long*/ proc3 = windowDelegateCallback3.getAddress(); if (proc3 == 0) error (SWT.ERROR_NO_MORE_CALLBACKS); windowDelegateCallback2 = new Callback(this, "windowDelegateProc", 2); - int proc2 = windowDelegateCallback2.getAddress(); + int /*long*/ proc2 = windowDelegateCallback2.getAddress(); if (proc2 == 0) error (SWT.ERROR_NO_MORE_CALLBACKS); windowDelegateCallback4 = new Callback(this, "windowDelegateProc", 4); - int proc4 = windowDelegateCallback4.getAddress(); + int /*long*/ proc4 = windowDelegateCallback4.getAddress(); if (proc4 == 0) error (SWT.ERROR_NO_MORE_CALLBACKS); windowDelegateCallback5 = new Callback(this, "windowDelegateProc", 5); - int proc5 = windowDelegateCallback5.getAddress(); + int /*long*/ proc5 = windowDelegateCallback5.getAddress(); if (proc5 == 0) error (SWT.ERROR_NO_MORE_CALLBACKS); windowDelegateCallback6 = new Callback(this, "windowDelegateProc", 6); - int proc6 = windowDelegateCallback6.getAddress(); + int /*long*/ proc6 = windowDelegateCallback6.getAddress(); if (proc6 == 0) error (SWT.ERROR_NO_MORE_CALLBACKS); - int drawRectProc = OS.drawRect_CALLBACK(proc3); - int drawInteriorWithFrameInViewProc = OS.drawInteriorWithFrame_inView_CALLBACK (proc4); - int setFrameOriginProc = OS.setFrame_CALLBACK(proc3); - int setFrameSizeProc = OS.setFrame_CALLBACK(proc3); - int hitTestProc = OS.hitTest_CALLBACK(proc3); - int markedRangeProc = OS.markedRange_CALLBACK(proc2); - int selectedRangeProc = OS.selectedRange_CALLBACK(proc2); - int setMarkedText_selectedRangeProc = OS.setMarkedText_selectedRange_CALLBACK(proc4); - int attributedSubstringFromRangeProc = OS.attributedSubstringFromRange_CALLBACK(proc3); - int characterIndexForPointProc = OS.characterIndexForPoint_CALLBACK(proc3); - int firstRectForCharacterRangeProc = OS.firstRectForCharacterRange_CALLBACK(proc3); - int textWillChangeSelectionProc = OS.textView_willChangeSelectionFromCharacterRange_toCharacterRange_CALLBACK(proc5); + int /*long*/ drawRectProc = OS.drawRect_CALLBACK(proc3); + int /*long*/ drawInteriorWithFrameInViewProc = OS.drawInteriorWithFrame_inView_CALLBACK (proc4); + int /*long*/ setFrameOriginProc = OS.setFrame_CALLBACK(proc3); + int /*long*/ setFrameSizeProc = OS.setFrame_CALLBACK(proc3); + int /*long*/ hitTestProc = OS.hitTest_CALLBACK(proc3); + int /*long*/ markedRangeProc = OS.markedRange_CALLBACK(proc2); + int /*long*/ selectedRangeProc = OS.selectedRange_CALLBACK(proc2); + int /*long*/ setMarkedText_selectedRangeProc = OS.setMarkedText_selectedRange_CALLBACK(proc4); + int /*long*/ attributedSubstringFromRangeProc = OS.attributedSubstringFromRange_CALLBACK(proc3); + int /*long*/ characterIndexForPointProc = OS.characterIndexForPoint_CALLBACK(proc3); + int /*long*/ firstRectForCharacterRangeProc = OS.firstRectForCharacterRange_CALLBACK(proc3); + int /*long*/ textWillChangeSelectionProc = OS.textView_willChangeSelectionFromCharacterRange_toCharacterRange_CALLBACK(proc5); String className = "SWTWindowDelegate"; - int cls = OS.objc_allocateClassPair(OS.class_NSObject, className, 0); + int /*long*/ cls = OS.objc_allocateClassPair(OS.class_NSObject, className, 0); OS.class_addIvar(cls, SWT_OBJECT, C.PTR_SIZEOF, (byte)(Math.log(C.PTR_SIZEOF) / Math.log(2)), "i"); OS.class_addMethod(cls, OS.sel_windowDidResize_, proc3, "@:@"); OS.class_addMethod(cls, OS.sel_windowDidMove_, proc3, "@:@"); @@ -1985,7 +1985,7 @@ void initClasses () { * <li>ERROR_NO_HANDLES if a handle could not be obtained for gc creation</li> * </ul> */ -public int internal_new_GC (GCData data) { +public int /*long*/ internal_new_GC (GCData data) { if (isDisposed()) SWT.error(SWT.ERROR_DEVICE_DISPOSED); if (screenWindow == null) { NSWindow window = (NSWindow) new NSWindow ().alloc (); @@ -2025,7 +2025,7 @@ public int internal_new_GC (GCData data) { * @param hDC the platform specific GC handle * @param data the platform specific GC data */ -public void internal_dispose_GC (int context, GCData data) { +public void internal_dispose_GC (int /*long*/ context, GCData data) { if (isDisposed()) SWT.error(SWT.ERROR_DEVICE_DISPOSED); } @@ -2706,7 +2706,7 @@ public void removeListener (int eventType, Listener listener) { Widget removeWidget (NSObject view) { if (view == null) return null; - int [] jniRef = new int [1]; + int /*long*/ [] jniRef = new int /*long*/ [1]; OS.object_getInstanceVariable(view.id, SWT_OBJECT, jniRef); if (jniRef[0] == 0) return null; Widget widget = (Widget)OS.JNIGetObject(jniRef[0]); @@ -3022,7 +3022,7 @@ void setMenuBar (Menu menu) { menuBar = menu; //remove all existing menu items except the application menu NSMenu menubar = application.mainMenu(); - int count = menubar.numberOfItems(); + int /*long*/ count = menubar.numberOfItems(); while (count > 1) { menubar.removeItemAtIndex(count - 1); count--; @@ -3227,8 +3227,8 @@ public void timerExec (int milliseconds, Runnable runnable) { } } -int timerProc (int id) { - NSTimer timer = new NSTimer (id); +int /*long*/ timerProc (int /*long*/ id, int /*long*/ sel, int /*long*/ timerID) { + NSTimer timer = new NSTimer (timerID); NSNumber number = new NSNumber(timer.userInfo()); int index = number.intValue(); if (timerList == null) return 0; @@ -3325,11 +3325,11 @@ Control findControl (NSEvent nsEvent, boolean checkGrab, boolean checkTrim, bool return control; } -int applicationNextEventMatchingMask (int id, int sel, int mask, int expiration, int mode, int dequeue) { +int /*long*/ applicationNextEventMatchingMask (int /*long*/ id, int /*long*/ sel, int /*long*/ mask, int /*long*/ expiration, int /*long*/ mode, int /*long*/ dequeue) { objc_super super_struct = new objc_super(); super_struct.receiver = id; super_struct.cls = OS.objc_msgSend(id, OS.sel_superclass); - int result = OS.objc_msgSendSuper(super_struct, sel, mask, expiration, mode, dequeue); + int /*long*/ result = OS.objc_msgSendSuper(super_struct, sel, mask, expiration, mode, dequeue != 0); if (result != 0) { if (trackingControl != null && dequeue != 0) { NSEvent nsEvent = new NSEvent(result); @@ -3342,7 +3342,7 @@ int applicationNextEventMatchingMask (int id, int sel, int mask, int expiration, void applicationSendMouseEvent (NSEvent nsEvent, boolean send) { if (send) runDeferredEvents(); boolean up = false; - int type = nsEvent.type(); + int type = (int)/*64*/nsEvent.type(); switch (type) { case OS.NSLeftMouseDown: case OS.NSRightMouseDown: @@ -3399,7 +3399,7 @@ void applicationSendMouseEvent (NSEvent nsEvent, boolean send) { } } -void applicationSendEvent (int id, int sel, int event) { +void applicationSendEvent (int /*long*/ id, int /*long*/ sel, int /*long*/ event) { NSEvent nsEvent = new NSEvent(event); applicationSendMouseEvent(nsEvent, false); objc_super super_struct = new objc_super(); @@ -3422,7 +3422,7 @@ int /*long*/ applicationProc(int /*long*/ id, int /*long*/ sel, int /*long*/ eve return 0; } -int /*long*/ applicationProc(int /*long*/ id, int /*long*/ sel, int /*long*/ arg0, int /*long*/ arg1, int /*long*/ arg2, int /*long*/ arg3) { +int /*long*/ applicationProc(int /*long*/ id, int /*long*/sel, int /*long*/ arg0, int /*long*/ arg1, int /*long*/ arg2, int /*long*/ arg3) { if (sel == OS.sel_nextEventMatchingMask_untilDate_inMode_dequeue_) { return applicationNextEventMatchingMask(id, sel, arg0, arg1, arg2, arg3); } @@ -3482,17 +3482,17 @@ int /*long*/ dialogProc(int /*long*/ id, int /*long*/ sel, int /*long*/ arg0) { if (sel == OS.sel_changeColor_) { ColorDialog dialog = (ColorDialog)OS.JNIGetObject(jniRef[0]); if (dialog == null) return 0; - dialog.changeColor(arg0); + dialog.changeColor(id, sel, arg0); } else if (sel == OS.sel_changeFont_) { FontDialog dialog = (FontDialog)OS.JNIGetObject(jniRef[0]); if (dialog == null) return 0; - dialog.changeFont(arg0); + dialog.changeFont(id, sel, arg0); } else if (sel == OS.sel_windowWillClose_) { Object object = OS.JNIGetObject(jniRef[0]); if (object instanceof FontDialog) { - ((FontDialog)object).windowWillClose(arg0); + ((FontDialog)object).windowWillClose(id, sel, arg0); } else if (object instanceof ColorDialog) { - ((ColorDialog)object).windowWillClose(arg0); + ((ColorDialog)object).windowWillClose(id, sel, arg0); } } return 0; @@ -3501,9 +3501,7 @@ int /*long*/ dialogProc(int /*long*/ id, int /*long*/ sel, int /*long*/ arg0) { int /*long*/ windowDelegateProc(int /*long*/ id, int /*long*/ sel) { Widget widget = getWidget(id); if (widget == null) return 0; - if (sel == OS.sel_isFlipped) { - return widget.isFlipped() ? 1 : 0; - } else if (sel == OS.sel_sendSelection) { + if (sel == OS.sel_sendSelection) { widget.sendSelection(); } else if (sel == OS.sel_sendArrowSelection) { widget.sendArrowSelection(); @@ -3519,6 +3517,8 @@ int /*long*/ windowDelegateProc(int /*long*/ id, int /*long*/ sel) { return widget.becomeFirstResponder(id, sel) ? 1 : 0; } else if (sel == OS.sel_resignFirstResponder) { return widget.resignFirstResponder(id, sel) ? 1 : 0; + } else if (sel == OS.sel_isFlipped) { + return widget.isFlipped(id, sel) ? 1 : 0; } else if (sel == OS.sel_isOpaque) { return widget.isOpaque(id, sel) ? 1 : 0; } else if (sel == OS.sel_unmarkText) { @@ -3545,7 +3545,7 @@ int /*long*/ windowDelegateProc(int /*long*/ id, int /*long*/ sel) { int /*long*/ windowDelegateProc(int /*long*/ id, int /*long*/ sel, int /*long*/ arg0) { if (sel == OS.sel_timerProc_) { - return timerProc (arg0); + return timerProc (id, sel, arg0); } Widget widget = getWidget(id); if (widget == null && (sel == OS.sel_keyDown_ ||sel == OS.sel_keyUp_ ||sel == OS.sel_insertText_ ||sel == OS.sel_doCommandBySelector_)) { @@ -3553,7 +3553,7 @@ int /*long*/ windowDelegateProc(int /*long*/ id, int /*long*/ sel, int /*long*/ } if (widget == null) return 0; if (sel == OS.sel_windowWillClose_) { - widget.windowWillClose(arg0); + widget.windowWillClose(id, sel, arg0); } else if (sel == OS.sel_drawRect_) { NSRect rect = new NSRect(); OS.memmove(rect, arg0, NSRect.sizeof); @@ -3571,7 +3571,7 @@ int /*long*/ windowDelegateProc(int /*long*/ id, int /*long*/ sel, int /*long*/ OS.memmove(point, arg0, NSPoint.sizeof); return widget.hitTest(id, sel, point); } else if (sel == OS.sel_windowShouldClose_) { - return widget.windowShouldClose(arg0) ? 1 : 0; + return widget.windowShouldClose(id, sel, arg0) ? 1 : 0; } else if (sel == OS.sel_mouseDown_) { widget.mouseDown(id, sel, arg0); } else if (sel == OS.sel_keyDown_) { @@ -3601,31 +3601,31 @@ int /*long*/ windowDelegateProc(int /*long*/ id, int /*long*/ sel, int /*long*/ } else if (sel == OS.sel_menuForEvent_) { return widget.menuForEvent(id, sel, arg0); } else if (sel == OS.sel_numberOfRowsInTableView_) { - return widget.numberOfRowsInTableView(arg0); + return widget.numberOfRowsInTableView(id, sel, arg0); } else if (sel == OS.sel_comboBoxSelectionDidChange_) { - widget.comboBoxSelectionDidChange(arg0); + widget.comboBoxSelectionDidChange(id, sel, arg0); } else if (sel == OS.sel_tableViewSelectionDidChange_) { - widget.tableViewSelectionDidChange(arg0); + widget.tableViewSelectionDidChange(id, sel, arg0); } else if (sel == OS.sel_windowDidResignKey_) { - widget.windowDidResignKey(arg0); + widget.windowDidResignKey(id, sel, arg0); } else if (sel == OS.sel_windowDidBecomeKey_) { - widget.windowDidBecomeKey(arg0); + widget.windowDidBecomeKey(id, sel, arg0); } else if (sel == OS.sel_windowDidResize_) { - widget.windowDidResize(arg0); + widget.windowDidResize(id, sel, arg0); } else if (sel == OS.sel_windowDidMove_) { - widget.windowDidMove(arg0); + widget.windowDidMove(id, sel, arg0); } else if (sel == OS.sel_menuWillOpen_) { - widget.menuWillOpen(arg0); + widget.menuWillOpen(id, sel, arg0); } else if (sel == OS.sel_menuDidClose_) { - widget.menuDidClose(arg0); + widget.menuDidClose(id, sel, arg0); } else if (sel == OS.sel_menuNeedsUpdate_) { - widget.menuNeedsUpdate(arg0); + widget.menuNeedsUpdate(id, sel, arg0); } else if (sel == OS.sel_outlineViewSelectionDidChange_) { - widget.outlineViewSelectionDidChange(arg0); + widget.outlineViewSelectionDidChange(id, sel, arg0); } else if (sel == OS.sel_sendEvent_) { widget.windowSendEvent(id, sel, arg0); } else if (sel == OS.sel_helpRequested_) { - widget.helpRequested(arg0); + widget.helpRequested(id, sel, arg0); } else if (sel == OS.sel_scrollWheel_) { widget.scrollWheel(id, sel, arg0); } else if (sel == OS.sel_pageDown_) { @@ -3633,9 +3633,9 @@ int /*long*/ windowDelegateProc(int /*long*/ id, int /*long*/ sel, int /*long*/ } else if (sel == OS.sel_pageUp_) { widget.pageUp(id, sel, arg0); } else if (sel == OS.sel_textViewDidChangeSelection_) { - widget.textViewDidChangeSelection(arg0); + widget.textViewDidChangeSelection(id, sel, arg0); } else if (sel == OS.sel_textDidChange_) { - widget.textDidChange(arg0); + widget.textDidChange(id, sel, arg0); } else if (sel == OS.sel_attributedSubstringFromRange_) { return widget.attributedSubstringFromRange (id, sel, arg0); } else if (sel == OS.sel_characterIndexForPoint_) { @@ -3658,21 +3658,21 @@ int /*long*/ windowDelegateProc(int /*long*/ id, int /*long*/ sel, int /*long*/ Widget widget = getWidget(id); if (widget == null) return 0; if (sel == OS.sel_tabView_willSelectTabViewItem_) { - widget.willSelectTabViewItem(arg0, arg1); + widget.tabView_willSelectTabViewItem(id, sel, arg0, arg1); } else if (sel == OS.sel_outlineView_isItemExpandable_) { - return widget.outlineView_isItemExpandable(arg0, arg1) ? 1 : 0; + return widget.outlineView_isItemExpandable(id, sel, arg0, arg1) ? 1 : 0; } else if (sel == OS.sel_outlineView_numberOfChildrenOfItem_) { - return widget.outlineView_numberOfChildrenOfItem(arg0, arg1); + return widget.outlineView_numberOfChildrenOfItem(id, sel, arg0, arg1); } else if (sel == OS.sel_outlineView_shouldCollapseItem_) { - return widget.outlineView_shouldCollapseItem(arg0, arg1) ? 1 : 0; + return widget.outlineView_shouldCollapseItem(id, sel, arg0, arg1) ? 1 : 0; } else if (sel == OS.sel_outlineView_shouldExpandItem_) { - return widget.outlineView_shouldExpandItem(arg0, arg1) ? 1 : 0; + return widget.outlineView_shouldExpandItem(id, sel, arg0, arg1) ? 1 : 0; } else if (sel == OS.sel_menu_willHighlightItem_) { - widget.menu_willHighlightItem(arg0, arg1); + widget.menu_willHighlightItem(id, sel, arg0, arg1); } else if (sel == OS.sel_setMarkedText_selectedRange_) { widget.setMarkedText_selectedRange (id, sel, arg0, arg1); } else if (sel == OS.sel_drawInteriorWithFrame_inView_) { - widget.drawInteriorFrame_inView (arg0, arg1); + widget.drawInteriorFrame_inView (id, sel, arg0, arg1); } return 0; } @@ -3681,17 +3681,17 @@ int /*long*/ windowDelegateProc(int /*long*/ id, int /*long*/ sel, int /*long*/ Widget widget = getWidget(id); if (widget == null) return 0; if (sel == OS.sel_tableView_objectValueForTableColumn_row_) { - return widget.tableView_objectValueForTableColumn_row(arg0, arg1, arg2); + return widget.tableView_objectValueForTableColumn_row(id, sel, arg0, arg1, arg2); } else if (sel == OS.sel_tableView_shouldEditTableColumn_row_) { - return widget.tableView_shouldEditTableColumn_row(arg0, arg1, arg2) ? 1 : 0; + return widget.tableView_shouldEditTableColumn_row(id, sel, arg0, arg1, arg2) ? 1 : 0; } else if (sel == OS.sel_textView_clickedOnLink_atIndex_) { - return widget.clickOnLink(arg0, arg1, arg2) ? 1 : 0; + return widget.textView_clickOnLink_atIndex(id, sel, arg0, arg1, arg2) ? 1 : 0; } else if (sel == OS.sel_outlineView_child_ofItem_) { - return widget.outlineView_child_ofItem(arg0, arg1, arg2); + return widget.outlineView_child_ofItem(id, sel, arg0, arg1, arg2); } else if (sel == OS.sel_outlineView_objectValueForTableColumn_byItem_) { - return widget.outlineView_objectValueForTableColumn_byItem(arg0, arg1, arg2); + return widget.outlineView_objectValueForTableColumn_byItem(id, sel, arg0, arg1, arg2); } else if (sel == OS.sel_textView_willChangeSelectionFromCharacterRange_toCharacterRange_) { - NSRange range = widget.textView_willChangeSelectionFromCharacterRange_toCharacterRange(arg0, arg1, arg2); + NSRange range = widget.textView_willChangeSelectionFromCharacterRange_toCharacterRange(id, sel, arg0, arg1, arg2); /* NOTE that this is freed in C */ int /*long*/ result = OS.malloc (NSRange.sizeof); OS.memmove (result, range, NSRange.sizeof); @@ -3704,13 +3704,13 @@ int /*long*/ windowDelegateProc(int /*long*/ id, int /*long*/ sel, int /*long*/ Widget widget = getWidget(id); if (widget == null) return 0; if (sel == OS.sel_tableView_willDisplayCell_forTableColumn_row_) { - widget.tableView_willDisplayCell_forTableColumn_row(arg0, arg1, arg2, arg3); + widget.tableView_willDisplayCell_forTableColumn_row(id, sel, arg0, arg1, arg2, arg3); } else if (sel == OS.sel_outlineView_willDisplayCell_forTableColumn_item_) { - widget.outlineView_willDisplayCell_forTableColumn_item(arg0, arg1, arg2, arg3); + widget.outlineView_willDisplayCell_forTableColumn_item(id, sel, arg0, arg1, arg2, arg3); } else if (sel == OS.sel_outlineView_setObjectValue_forTableColumn_byItem_) { - widget.outlineView_setObjectValue_forTableColumn_byItem(arg0, arg1, arg2, arg3); + widget.outlineView_setObjectValue_forTableColumn_byItem(id, sel, arg0, arg1, arg2, arg3); } else if (sel == OS.sel_tableView_setObjectValue_forTableColumn_row_) { - widget.tableView_setObjectValue_forTableColumn_row(arg0, arg1, arg2, arg3); + widget.tableView_setObjectValue_forTableColumn_row(id, sel, arg0, arg1, arg2, arg3); } return 0; } diff --git a/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/FileDialog.java b/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/FileDialog.java index 32d02b25a1..097d151e79 100755 --- a/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/FileDialog.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/FileDialog.java @@ -202,13 +202,13 @@ public String open () { } if (filterPath != null) panel.setDirectory(NSString.stringWith(filterPath)); panel.setTitle(NSString.stringWith(title != null ? title : "")); - int response = panel.runModal(); + int /*long*/ response = panel.runModal(); if (response == OS.NSFileHandlingPanelOKButton) { NSString filename = panel.filename(); fullPath = filename.getString(); if ((style & SWT.SAVE) == 0) { NSArray filenames = ((NSOpenPanel)panel).filenames(); - int count = filenames.count(); + int count = (int)/*64*/filenames.count(); fileNames = new String[count]; for (int i = 0; i < count; i++) { filename = new NSString(filenames.objectAtIndex(i)); diff --git a/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/FontDialog.java b/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/FontDialog.java index 3a22deddde..b984e9a801 100755 --- a/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/FontDialog.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/FontDialog.java @@ -84,7 +84,7 @@ public FontDialog (Shell parent, int style) { checkSubclass (); } -void changeFont(int arg0) { +void changeFont(int /*long*/ id, int /*long*/ sel, int /*long*/ arg0) { selected = true; } @@ -210,7 +210,7 @@ public FontData open () { Font font = create ? new Font(display, fontData) : display.getSystemFont(); panel.setPanelFont(font.handle, false); SWTPanelDelegate delegate = (SWTPanelDelegate)new SWTPanelDelegate().alloc().init(); - int jniRef = OS.NewGlobalRef(this); + int /*long*/ jniRef = OS.NewGlobalRef(this); if (jniRef == 0) SWT.error(SWT.ERROR_NO_HANDLES); OS.object_setInstanceVariable(delegate.id, Display.SWT_OBJECT, jniRef); panel.setDelegate(delegate); @@ -278,7 +278,7 @@ public void setRGB (RGB rgb) { this.rgb = rgb; } -void windowWillClose(int sender) { +void windowWillClose(int /*long*/ id, int /*long*/ sel, int /*long*/ sender) { NSApplication.sharedApplication().stop(null); } diff --git a/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/IME.java b/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/IME.java index f67dc37391..bc459bf012 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/IME.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/IME.java @@ -84,14 +84,14 @@ public IME (Canvas parent, int style) { createWidget (); } -int attributedSubstringFromRange (int id, int sel, int rangePtr) { +int /*long*/ attributedSubstringFromRange (int /*long*/ id, int /*long*/ sel, int /*long*/ rangePtr) { Event event = new Event (); event.detail = SWT.COMPOSITION_SELECTION; sendEvent (SWT.ImeComposition, event); NSRange range = new NSRange (); OS.memmove (range, rangePtr, NSRange.sizeof); - int start = range.location; - int end = range.location + range.length; + int start = (int)/*64*/range.location; + int end = (int)/*64*/(range.location + range.length); if (event.start <= start && start <= event.end && event.start <= end && end <= event.end) { NSString str = NSString.stringWith (event.text.substring(start - event.start, end - event.start)); NSAttributedString attriStr = ((NSAttributedString)new NSAttributedString().alloc()).initWithString(str, null); @@ -101,7 +101,7 @@ int attributedSubstringFromRange (int id, int sel, int rangePtr) { return 0; } -int characterIndexForPoint (int id, int sel, int point) { +int /*long*/ characterIndexForPoint (int /*long*/ id, int /*long*/ sel, int /*long*/ point) { if (!isInlineEnabled ()) return OS.NSNotFound; NSPoint pt = new NSPoint (); OS.memmove (pt, point, NSPoint.sizeof); @@ -125,7 +125,7 @@ void createWidget () { } } -NSRect firstRectForCharacterRange(int id, int sel, int range) { +NSRect firstRectForCharacterRange(int /*long*/ id, int /*long*/ sel, int /*long*/ range) { NSRect rect = new NSRect (); Caret caret = parent.caret; if (caret != null) { @@ -253,21 +253,21 @@ public TextStyle [] getStyles () { TextStyle getStyle (NSDictionary attribs) { NSArray keys = attribs.allKeys (); - int count = keys.count (); + int /*long*/ count = keys.count (); TextStyle style = new TextStyle (); for (int j = 0; j < count; j++) { NSString key = new NSString (keys.objectAtIndex (j)); if (key.isEqualTo (OS.NSBackgroundColorAttributeName)) { NSColor color = new NSColor (attribs.objectForKey (key)).colorUsingColorSpaceName (OS.NSCalibratedRGBColorSpace); - float [] rgbColor = new float []{color.redComponent(), color.greenComponent(), color.blueComponent(), color.alphaComponent()}; + float [] rgbColor = new float []{(float)/*64*/color.redComponent(), (float)/*64*/color.greenComponent(), (float)/*64*/color.blueComponent(), (float)/*64*/color.alphaComponent()}; style.background = Color.cocoa_new (display, rgbColor); } else if (key.isEqualTo (OS.NSForegroundColorAttributeName)) { NSColor color = new NSColor (attribs.objectForKey (key)).colorUsingColorSpaceName (OS.NSCalibratedRGBColorSpace); - float [] rgbColor = new float []{color.redComponent(), color.greenComponent(), color.blueComponent(), color.alphaComponent()}; + float [] rgbColor = new float []{(float)/*64*/color.redComponent(), (float)/*64*/color.greenComponent(), (float)/*64*/color.blueComponent(), (float)/*64*/color.alphaComponent()}; style.foreground = Color.cocoa_new (display, rgbColor); } else if (key.isEqualTo (OS.NSUnderlineColorAttributeName)) { NSColor color = new NSColor (attribs.objectForKey (key)).colorUsingColorSpaceName (OS.NSCalibratedRGBColorSpace); - float [] rgbColor = new float []{color.redComponent(), color.greenComponent(), color.blueComponent(), color.alphaComponent()}; + float [] rgbColor = new float []{(float)/*64*/color.redComponent(), (float)/*64*/color.greenComponent(), (float)/*64*/color.blueComponent(), (float)/*64*/color.alphaComponent()}; style.underlineColor = Color.cocoa_new (display, rgbColor); } else if (key.isEqualTo (OS.NSUnderlineStyleAttributeName)) { NSNumber value = new NSNumber (attribs.objectForKey (key)); @@ -279,7 +279,7 @@ TextStyle getStyle (NSDictionary attribs) { style.underline = value.intValue () != OS.NSUnderlineStyleNone; } else if (key.isEqualTo (OS.NSStrikethroughColorAttributeName)) { NSColor color = new NSColor (attribs.objectForKey (key)).colorUsingColorSpaceName (OS.NSCalibratedRGBColorSpace); - float [] rgbColor = new float []{color.redComponent(), color.greenComponent(), color.blueComponent(), color.alphaComponent()}; + float [] rgbColor = new float []{(float)/*64*/color.redComponent(), (float)/*64*/color.greenComponent(), (float)/*64*/color.blueComponent(), (float)/*64*/color.alphaComponent()}; style.strikeoutColor = Color.cocoa_new (display, rgbColor); } else if (key.isEqualTo (OS.NSStrikethroughStyleAttributeName)) { NSNumber value = new NSNumber (attribs.objectForKey (key)); @@ -330,17 +330,17 @@ public boolean getWideCaret() { return false; } -boolean hasMarkedText (int id, int sel) { +boolean hasMarkedText (int /*long*/ id, int /*long*/ sel) { return text.length () != 0; } -boolean insertText (int id, int sel, int string) { +boolean insertText (int /*long*/ id, int /*long*/ sel, int /*long*/ string) { if (startOffset == -1) return true; NSString str = new NSString (string); if (str.isKindOfClass (OS.objc_getClass ("NSAttributedString"))) { str = new NSAttributedString (string).string (); } - int length = str.length (); + int length = (int)/*64*/str.length (); int end = startOffset + text.length (); ranges = null; styles = null; @@ -361,7 +361,7 @@ boolean isInlineEnabled () { return hooks (SWT.ImeComposition); } -NSRange markedRange (int id, int sel) { +NSRange markedRange (int /*long*/ id, int /*long*/ sel) { if (startOffset == -1) { Event event = new Event (); event.detail = SWT.COMPOSITION_SELECTION; @@ -387,7 +387,7 @@ void releaseWidget () { ranges = null; } -NSRange selectedRange (int id, int sel) { +NSRange selectedRange (int /*long*/ id, int /*long*/ sel) { Event event = new Event (); event.detail = SWT.COMPOSITION_SELECTION; sendEvent (SWT.ImeComposition, event); @@ -421,7 +421,7 @@ public void setCompositionOffset (int offset) { } } -boolean setMarkedText_selectedRange (int id, int sel, int string, int selRange) { +boolean setMarkedText_selectedRange (int /*long*/ id, int /*long*/ sel, int /*long*/ string, int /*long*/ selRange) { if (!isInlineEnabled ()) return true; ranges = null; styles = null; @@ -438,7 +438,7 @@ boolean setMarkedText_selectedRange (int id, int sel, int string, int selRange) if (str.isKindOfClass (OS.objc_getClass ("NSAttributedString"))) { NSAttributedString attribStr = new NSAttributedString (string); str = attribStr.string (); - int length = str.length (); + int length = (int)/*64*/str.length (); styles = new TextStyle [length]; ranges = new int [length * 2]; NSRange rangeLimit = new NSRange (), effectiveRange = new NSRange (); @@ -448,9 +448,9 @@ boolean setMarkedText_selectedRange (int id, int sel, int string, int selRange) for (int i = 0; i < length;) { NSDictionary attribs = attribStr.attributesAtIndex(i, ptr, rangeLimit); OS.memmove (effectiveRange, ptr, NSRange.sizeof); - i = effectiveRange.location + effectiveRange.length; - ranges [rangeCount * 2] = effectiveRange.location; - ranges [rangeCount * 2 + 1] = effectiveRange.location + effectiveRange.length - 1; + i = (int)/*64*/(effectiveRange.location + effectiveRange.length); + ranges [rangeCount * 2] = (int)/*64*/effectiveRange.location; + ranges [rangeCount * 2 + 1] = (int)/*64*/(effectiveRange.location + effectiveRange.length - 1); styles [rangeCount++] = getStyle (attribs); } OS.free (ptr); @@ -463,14 +463,14 @@ boolean setMarkedText_selectedRange (int id, int sel, int string, int selRange) ranges = newRanges; } } - int length = str.length (); + int length = (int)/*64*/str.length (); if (ranges == null && length > 0) { styles = new TextStyle []{getStyle (display.markedAttributes)}; ranges = new int[]{0, length - 1}; } NSRange range = new NSRange (); OS.memmove (range, selRange, NSRange.sizeof); - caretOffset = range.location; + caretOffset = (int)/*64*/range.location; Event event = new Event (); event.detail = SWT.COMPOSITION_CHANGED; event.start = startOffset; @@ -480,7 +480,7 @@ boolean setMarkedText_selectedRange (int id, int sel, int string, int selRange) return true; } -int validAttributesForMarkedText (int id, int sel) { +int /*long*/ validAttributesForMarkedText (int /*long*/ id, int /*long*/ sel) { NSMutableArray attribs = NSMutableArray.arrayWithCapacity (6); attribs.addObject (new NSString (OS.NSForegroundColorAttributeName ())); attribs.addObject (new NSString (OS.NSBackgroundColorAttributeName ())); diff --git a/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Link.java b/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Link.java index 38a65db508..7798595560 100755 --- a/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Link.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Link.java @@ -108,7 +108,7 @@ public void addSelectionListener (SelectionListener listener) { addListener (SWT.DefaultSelection, typedListener); } -boolean clickOnLink(int textView, int link, int charIndex) { +boolean textView_clickOnLink_atIndex(int /*long*/ id, int /*long*/ sel, int /*long*/ textView, int /*long*/ link, int /*long*/ charIndex) { NSString str = new NSString (link); Event event = new Event (); event.text = str.getString(); diff --git a/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/List.java b/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/List.java index 126dfd2fa7..b2d5f5a206 100755 --- a/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/List.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/List.java @@ -375,7 +375,7 @@ void fixSelection (int index, boolean add) { */ public int getFocusIndex () { checkWidget(); - return ((NSTableView)view).selectedRow(); + return (int)/*64*/((NSTableView)view).selectedRow(); } /** @@ -476,7 +476,7 @@ public String [] getSelection () { return new String [0]; } NSIndexSet selection = widget.selectedRowIndexes(); - int count = selection.count(); + int count = (int)/*64*/selection.count(); int [] indexBuffer = new int [count]; selection.getIndexes(indexBuffer, count, 0); String [] result = new String [count]; @@ -498,7 +498,7 @@ public String [] getSelection () { */ public int getSelectionCount () { checkWidget (); - return ((NSTableView)view).numberOfSelectedRows(); + return (int)/*64*/((NSTableView)view).numberOfSelectedRows(); } /** @@ -519,7 +519,7 @@ public int getSelectionIndex () { return -1; } NSIndexSet selection = widget.selectedRowIndexes(); - int count = selection.count(); + int count = (int)/*64*/selection.count(); int [] result = new int [count]; selection.getIndexes(result, count, 0); return result [0]; @@ -548,7 +548,7 @@ public int [] getSelectionIndices () { return new int [0]; } NSIndexSet selection = widget.selectedRowIndexes(); - int count = selection.count(); + int count = (int)/*64*/selection.count(); int [] result = new int [count]; selection.getIndexes(result, count, 0); return result; @@ -573,7 +573,7 @@ public int getTopIndex () { NSPoint point = new NSPoint(); point.x = rect.x; point.y = rect.y; - int result = ((NSTableView)view).rowAtPoint(point); + int result = (int)/*64*/((NSTableView)view).rowAtPoint(point); if (result == -1) result = 0; return result; } @@ -653,7 +653,7 @@ public boolean isSelected (int index) { return ((NSTableView)view).isRowSelected(index); } -int numberOfRowsInTableView(int aTableView) { +int /*long*/ numberOfRowsInTableView(int /*long*/ id, int /*long*/ sel, int /*long*/ aTableView) { return itemCount; } @@ -1216,16 +1216,16 @@ public void showSelection () { if (index >= 0) showIndex (index); } -void tableViewSelectionDidChange (int aNotification) { +void tableViewSelectionDidChange (int /*long*/ id, int /*long*/ sel, int /*long*/ aNotification) { if (ignoreSelect) return; postEvent (SWT.Selection); } -boolean tableView_shouldEditTableColumn_row(int aTableView, int aTableColumn, int rowIndex) { +boolean tableView_shouldEditTableColumn_row(int /*long*/ id, int /*long*/ sel, int /*long*/ aTableView, int /*long*/ aTableColumn, int /*long*/ rowIndex) { return false; } -int tableView_objectValueForTableColumn_row(int aTableView, int aTableColumn, int rowIndex) { +int /*long*/ tableView_objectValueForTableColumn_row(int /*long*/ id, int /*long*/ sel, int /*long*/ aTableView, int /*long*/ aTableColumn, int /*long*/ rowIndex) { NSMutableDictionary dict = NSMutableDictionary.dictionaryWithCapacity(4); if (foreground != null) { NSColor color = NSColor.colorWithDeviceRed(foreground.handle[0], foreground.handle[1], foreground.handle[2], 1); @@ -1238,7 +1238,7 @@ int tableView_objectValueForTableColumn_row(int aTableView, int aTableColumn, in NSColor color = NSColor.colorWithDeviceRed(background.handle[0], background.handle[1], background.handle[2], 1); dict.setObject(color, OS.NSBackgroundColorAttributeName); } - String text = items[rowIndex]; + String text = items[(int)/*64*/rowIndex]; int length = text.length(); char[] chars = new char[length]; text.getChars(0, length, chars, 0); diff --git a/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Menu.java b/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Menu.java index dcb8aee0e1..39b56d51b7 100755 --- a/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Menu.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Menu.java @@ -647,7 +647,7 @@ public boolean isVisible () { return getVisible (); } -void menu_willHighlightItem(int menu, int itemID) { +void menu_willHighlightItem(int /*long*/ id, int /*long*/ sel, int /*long*/ menu, int /*long*/ itemID) { Widget widget = display.getWidget(itemID); if (widget instanceof MenuItem) { MenuItem item = (MenuItem)widget; @@ -655,17 +655,14 @@ void menu_willHighlightItem(int menu, int itemID) { } } -void menuNeedsUpdate(int menu) { +void menuNeedsUpdate(int /*long*/ id, int /*long*/ sel, int /*long*/ menu) { sendEvent (SWT.Show); } -void menuDidClose(int menu) { +void menuDidClose(int /*long*/ id, int /*long*/ sel, int /*long*/ menu) { sendEvent (SWT.Hide); } -void menuWillOpen(int menu) { -} - int modifierIndex (String accelText) { int start = accelText.length () - 1; int index = start; diff --git a/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/MessageBox.java b/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/MessageBox.java index 8f09423682..c4b2091c46 100755 --- a/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/MessageBox.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/MessageBox.java @@ -168,7 +168,7 @@ public int open () { NSAlert alert = NSAlert.alertWithMessageText(NSString.stringWith(""), defaultButton, alternateButton, otherButton, message); new NSWindow(alert.window().id).setTitle(title); alert.setAlertStyle(alertType); - int response = alert.runModal(); + int response = (int)/*64*/alert.runModal(); switch (bits) { case SWT.OK: switch (response) { diff --git a/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Sash.java b/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Sash.java index 00f6135cbd..7e362819fb 100755 --- a/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Sash.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Sash.java @@ -120,7 +120,7 @@ static int checkStyle (int style) { return checkBits (style, SWT.HORIZONTAL, SWT.VERTICAL, 0, 0, 0, 0); } -boolean becomeFirstResponder (int id, int sel) { +boolean becomeFirstResponder (int /*long*/ id, int /*long*/ sel) { boolean result = super.becomeFirstResponder(id, sel); NSRect frame = view.frame(); lastX = (int)frame.x; @@ -147,7 +147,7 @@ void createHandle () { view = widget; } -void drawWidget (int id, NSRect rect) { +void drawWidget (int /*long*/ id, NSRect rect) { NSGraphicsContext context = NSGraphicsContext.currentContext(); fillBackground (view, context, rect); super.drawWidget (id, rect); @@ -172,7 +172,7 @@ boolean sendKeyEvent(NSEvent nsEvent, int type) { case 124: /* Right arrow */ { int xChange = 0, yChange = 0; int stepSize = PAGE_INCREMENT; - int modifiers = nsEvent.modifierFlags(); + int /*long*/ modifiers = nsEvent.modifierFlags(); if ((modifiers & OS.NSControlKeyMask) != 0) stepSize = INCREMENT; if ((style & SWT.VERTICAL) != 0) { if (keyCode == 126 || keyCode == 125) break; @@ -221,7 +221,7 @@ boolean sendKeyEvent(NSEvent nsEvent, int type) { return true; } -void mouseDown(int id, int sel, int theEvent) { +void mouseDown(int /*long*/ id, int /*long*/ sel, int /*long*/ theEvent) { //TODO use sendMouseEvent // super.mouseDown(id, sel, theEvent); NSEvent nsEvent = new NSEvent(theEvent); @@ -246,7 +246,7 @@ void mouseDown(int id, int sel, int theEvent) { } } -void mouseDragged(int id, int sel, int theEvent) { +void mouseDragged(int /*long*/ id, int /*long*/ sel, int /*long*/ theEvent) { //TODO use sendMouseEvent // super.mouseDragged(id, sel, theEvent); if (!dragging) return; @@ -276,7 +276,7 @@ void mouseDragged(int id, int sel, int theEvent) { } } -void mouseUp(int id, int sel, int theEvent) { +void mouseUp(int /*long*/ id, int /*long*/ sel, int /*long*/ theEvent) { //TODO use sendMouseEvent // super.mouseUp(id, sel, theEvent); if (!dragging) return; diff --git a/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/ScrollBar.java b/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/ScrollBar.java index 2a77346956..dbfe569d07 100755 --- a/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/ScrollBar.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/ScrollBar.java @@ -89,7 +89,7 @@ public class ScrollBar extends Widget { int increment = 1; int pageIncrement = 10; id target; - int actionSelector;; + int /*long*/ actionSelector;; ScrollBar () { /* Do nothing */ @@ -413,7 +413,7 @@ void sendSelection () { value = getSelection (); } Event event = new Event(); - int hitPart = ((NSScroller)view).hitPart(); + int hitPart = (int)/*64*/((NSScroller)view).hitPart(); switch (hitPart) { case OS.NSScrollerDecrementLine: value -= increment; diff --git a/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Scrollable.java b/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Scrollable.java index a5dfc7c01c..020b51710e 100755 --- a/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Scrollable.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Scrollable.java @@ -124,7 +124,7 @@ ScrollBar createScrollBar (int style) { bar.style = style; bar.display = display; NSScroller scroller; - int actionSelector; + int /*long*/ actionSelector; NSRect rect = new NSRect(); if ((style & SWT.H_SCROLL) != 0) { rect.width = 1; diff --git a/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Shell.java b/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Shell.java index ea8b8cbcc0..b6bb1b7b41 100755 --- a/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Shell.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Shell.java @@ -490,7 +490,7 @@ void createHandle () { } display.cascadeWindow(window, screen); NSRect screenFrame = screen.frame(); - float width = screenFrame.width * 5 / 8, height = screenFrame.height * 5 / 8;; + double /*float*/ width = screenFrame.width * 5 / 8, height = screenFrame.height * 5 / 8;; NSRect frame = window.frame(); NSRect primaryFrame = primaryScreen.frame(); frame.y = primaryFrame.height - ((primaryFrame.height - (frame.y + frame.height)) + height); @@ -556,7 +556,7 @@ void destroyWidget () { } } -void drawWidget (int id, NSRect rect) { +void drawWidget (int /*long*/ id, NSRect rect) { if (regionPath != null && background == null) { NSGraphicsContext context = NSGraphicsContext.currentContext(); context.saveGraphicsState(); @@ -634,7 +634,7 @@ public int getAlpha () { public Rectangle getBounds () { checkWidget(); NSRect frame = window.frame(); - float y = display.getPrimaryFrame().height - (int)(frame.y + frame.height); + double /*float*/ y = display.getPrimaryFrame().height - (int)(frame.y + frame.height); return new Rectangle ((int)frame.x, (int)y, (int)frame.width, (int)frame.height); } @@ -702,7 +702,7 @@ public int getImeInputMode () { public Point getLocation () { checkWidget(); NSRect frame = window.frame(); - float y = display.getPrimaryFrame().height - (int)(frame.y + frame.height); + double /*float*/ y = display.getPrimaryFrame().height - (int)(frame.y + frame.height); return new Point ((int)frame.x, (int)y); } @@ -825,7 +825,7 @@ boolean hasBorder () { return false; } -void helpRequested(int theEvent) { +void helpRequested(int /*long*/ id, int /*long*/ sel, int /*long*/ theEvent) { Control control = display.getFocusControl(); while (control != null) { if (control.hooks (SWT.Help)) { @@ -1429,8 +1429,8 @@ void updateSystemUIMode () { // } } -void windowDidBecomeKey(int notification) { - super.windowDidBecomeKey(notification); +void windowDidBecomeKey(int /*long*/ id, int /*long*/ sel, int /*long*/ notification) { + super.windowDidBecomeKey(id, sel, notification); Display display = this.display; display.setMenuBar (menuBar); sendEvent (SWT.Activate); @@ -1440,12 +1440,12 @@ void windowDidBecomeKey(int notification) { // } } -void windowDidMove(int notification) { +void windowDidMove(int /*long*/ id, int /*long*/ sel, int /*long*/ notification) { moved = true; sendEvent(SWT.Move); } -void windowDidResize(int notification) { +void windowDidResize(int /*long*/ id, int /*long*/ sel, int /*long*/ notification) { resized = true; sendEvent (SWT.Resize); if (isDisposed ()) return; @@ -1455,8 +1455,8 @@ void windowDidResize(int notification) { } } -void windowDidResignKey(int notification) { - super.windowDidResignKey(notification); +void windowDidResignKey(int /*long*/ id, int /*long*/ sel, int /*long*/ notification) { + super.windowDidResignKey(id, sel, notification); Display display = this.display; sendEvent (SWT.Deactivate); if (isDisposed ()) return; @@ -1476,12 +1476,9 @@ void windowDidResignKey(int notification) { display.setMenuBar (null); } -boolean windowShouldClose(int window) { +boolean windowShouldClose(int /*long*/ id, int /*long*/ sel, int /*long*/ window) { closeWidget (); return false; } -void windowWillClose(int notification) { -} - } diff --git a/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Slider.java b/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Slider.java index e292d7e162..f7eb81a7c0 100755 --- a/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Slider.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Slider.java @@ -312,7 +312,7 @@ public void removeSelectionListener(SelectionListener listener) { void sendSelection () { Event event = new Event(); - int hitPart = ((NSScroller)view).hitPart(); + int hitPart = (int)/*64*/((NSScroller)view).hitPart(); int value = getSelection (); switch (hitPart) { case OS.NSScrollerDecrementLine: diff --git a/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Spinner.java b/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Spinner.java index d3a7fb2200..63b6393f53 100755 --- a/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Spinner.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Spinner.java @@ -80,7 +80,7 @@ public Spinner (Composite parent, int style) { super (parent, checkStyle (style)); } -boolean acceptsFirstResponder(int id, int sel) { +boolean acceptsFirstResponder(int /*long*/ id, int /*long*/ sel) { if (id == view.id) return false; return super.acceptsFirstResponder (id, sel); } @@ -197,8 +197,8 @@ public Point computeSize (int wHint, int hHint, boolean changed) { NSAttributedString str = ((NSAttributedString) new NSAttributedString ().alloc ()).initWithString (nsString, dict); NSSize size = str.size (); str.release (); - width = size.width; - height = size.height; + width = (int)/*64*/size.width; + height = (int)/*64*/size.height; NSRect frameRect = textView.frame(); NSCell cell = new NSCell (textView.cell ()); NSRect cellRect = cell.drawingRectForBounds(frameRect); @@ -210,7 +210,7 @@ public Point computeSize (int wHint, int hHint, boolean changed) { NSRect newRect = buttonView.frame (); buttonView.setFrame (oldRect); width += newRect.width; - height = Math.max (height, newRect.height); + height = Math.max (height, (int)/*64*/newRect.height); if (wHint != SWT.DEFAULT) width = wHint; if (hHint != SWT.DEFAULT) height = hHint; Rectangle trim = computeTrim (0, 0, (int) width, (int) height); @@ -687,7 +687,7 @@ void setSelection (int value, boolean setPos, boolean setText, boolean notify) { } NSCell cell = new NSCell(textView.cell()); if (hooks (SWT.Verify) || filters (SWT.Verify)) { - int length = cell.title().length(); + int length = (int)/*64*/cell.title().length(); string = verifyText (string, 0, length, null); if (string == null) return; } @@ -738,7 +738,7 @@ public void setValues (int selection, int minimum, int maximum, int digits, int setSelection (selection, true, true, false); } -void textDidChange (int aNotification) { +void textDidChange (int /*long*/ id, int /*long*/ sel, int /*long*/ aNotification) { postEvent (SWT.Modify); } diff --git a/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/TabFolder.java b/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/TabFolder.java index b47c74598d..85d76e911e 100755 --- a/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/TabFolder.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/TabFolder.java @@ -591,7 +591,7 @@ boolean traversePage (boolean next) { return index == getSelectionIndex (); } -void willSelectTabViewItem(int tabView, int tabViewItem) { +void tabView_willSelectTabViewItem(int /*long*/ id, int /*long*/ sel, int /*long*/ tabView, int /*long*/ tabViewItem) { if (tabViewItem == 0) return; for (int i = 0; i < itemCount; i++) { TabItem item = items [i]; diff --git a/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/TabItem.java b/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/TabItem.java index ba6743975b..56198ab1f8 100755 --- a/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/TabItem.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/TabItem.java @@ -137,8 +137,8 @@ public Rectangle getBounds() { checkWidget(); Rectangle result = new Rectangle (0, 0, 0, 0); if (nsItem.respondsToSelector (OS.sel_accessibilityAttributeValue_)) { - int posValue = OS.objc_msgSend (nsItem.id, OS.sel_accessibilityAttributeValue_, OS.NSAccessibilityPositionAttribute ()); - int sizeValue = OS.objc_msgSend (nsItem.id, OS.sel_accessibilityAttributeValue_, OS.NSAccessibilitySizeAttribute ()); + int /*long*/ posValue = OS.objc_msgSend (nsItem.id, OS.sel_accessibilityAttributeValue_, OS.NSAccessibilityPositionAttribute ()); + int /*long*/ sizeValue = OS.objc_msgSend (nsItem.id, OS.sel_accessibilityAttributeValue_, OS.NSAccessibilitySizeAttribute ()); NSValue val = new NSValue (posValue); NSPoint pt = val.pointValue (); NSWindow window = parent.view.window (); diff --git a/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Table.java b/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Table.java index f00a7eb8c7..9b9b6925af 100755 --- a/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Table.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Table.java @@ -980,7 +980,7 @@ public TableItem getItem (Point point) { NSPoint pt = new NSPoint(); pt.x = point.x; pt.y = point.y; - int row = widget.rowAtPoint(pt); + int row = (int)/*64*/widget.rowAtPoint(pt); if (row == -1) return null; return items[row]; } @@ -1090,7 +1090,7 @@ public TableItem [] getSelection () { return new TableItem [0]; } NSIndexSet selection = widget.selectedRowIndexes(); - int count = selection.count(); + int count = (int)/*64*/selection.count(); int [] indexBuffer = new int [count]; selection.getIndexes(indexBuffer, count, 0); TableItem [] result = new TableItem [count]; @@ -1112,7 +1112,7 @@ public TableItem [] getSelection () { */ public int getSelectionCount () { checkWidget (); - return ((NSTableView)view).numberOfSelectedRows(); + return (int)/*64*/((NSTableView)view).numberOfSelectedRows(); } /** @@ -1133,7 +1133,7 @@ public int getSelectionIndex () { return -1; } NSIndexSet selection = widget.selectedRowIndexes(); - int count = selection.count(); + int count = (int)/*64*/selection.count(); int [] result = new int [count]; selection.getIndexes(result, count, 0); return result [0]; @@ -1162,7 +1162,7 @@ public int [] getSelectionIndices () { return new int [0]; } NSIndexSet selection = widget.selectedRowIndexes(); - int count = selection.count(); + int count = (int)/*64*/selection.count(); int [] result = new int [count]; selection.getIndexes(result, count, 0); return result; @@ -1229,7 +1229,7 @@ public int getTopIndex () { NSPoint point = new NSPoint(); point.x = rect.x; point.y = rect.y; - return ((NSTableView)view).rowAtPoint(point); + return (int)/*64*/((NSTableView)view).rowAtPoint(point); } @@ -1315,7 +1315,7 @@ public boolean isSelected (int index) { return ((NSTableView)view).isRowSelected(index); } -int numberOfRowsInTableView(int aTableView) { +int /*long*/ numberOfRowsInTableView(int /*long*/ id, int /*long*/ sel, int /*long*/ aTableView) { return itemCount; } @@ -2220,10 +2220,10 @@ void sendDoubleSelection() { postEvent (SWT.DefaultSelection); } -void tableViewSelectionDidChange (int aNotification) { +void tableViewSelectionDidChange (int /*long*/ id, int /*long*/ sel, int /*long*/ aNotification) { if (ignoreSelect) return; NSTableView widget = (NSTableView) view; - int row = widget.selectedRow (); + int row = (int)/*64*/widget.selectedRow (); if(row == -1) postEvent (SWT.Selection); else { @@ -2235,8 +2235,8 @@ void tableViewSelectionDidChange (int aNotification) { } } -int tableView_objectValueForTableColumn_row (int aTableView, int aTableColumn, int rowIndex) { - TableItem item = _getItem (rowIndex); +int /*long*/ tableView_objectValueForTableColumn_row (int /*long*/ id, int /*long*/ sel, int /*long*/ aTableView, int /*long*/ aTableColumn, int /*long*/ rowIndex) { + TableItem item = _getItem ((int)/*64*/rowIndex); if (checkColumn != null && aTableColumn == checkColumn.id) { NSNumber value; if (item.checked && item.grayed) { @@ -2254,25 +2254,25 @@ int tableView_objectValueForTableColumn_row (int aTableView, int aTableColumn, i return item.createString (0).id; } -void tableView_setObjectValue_forTableColumn_row (int aTableView, int anObject, int aTableColumn, int rowIndex) { - TableItem item = items [rowIndex]; +void tableView_setObjectValue_forTableColumn_row (int /*long*/ id, int /*long*/ sel, int /*long*/ aTableView, int /*long*/ anObject, int /*long*/ aTableColumn, int /*long*/ rowIndex) { + TableItem item = items [(int)/*64*/rowIndex]; if (checkColumn != null && aTableColumn == checkColumn.id) { item.checked = !item.checked; Event event = new Event (); event.detail = SWT.CHECK; event.item = item; - event.index = rowIndex; + event.index = (int)/*64*/rowIndex; postEvent (SWT.Selection, event); } } -boolean tableView_shouldEditTableColumn_row (int aTableView, int aTableColumn, int rowIndex) { +boolean tableView_shouldEditTableColumn_row (int /*long*/ id, int /*long*/ sel, int /*long*/ aTableView, int /*long*/ aTableColumn, int /*long*/ rowIndex) { return false; } -void tableView_willDisplayCell_forTableColumn_row (int aTableView, int aCell, int aTableColumn, int rowIndex) { +void tableView_willDisplayCell_forTableColumn_row (int /*long*/ id, int /*long*/ sel, int /*long*/ aTableView, int /*long*/ aCell, int /*long*/ aTableColumn, int /*long*/ rowIndex) { if (checkColumn != null && aTableColumn == checkColumn.id) return; - TableItem item = items [rowIndex]; + TableItem item = items [(int)/*64*/rowIndex]; Image image = item.image; for (int i=0; i<columnCount; i++) { if (columns [i].nsColumn.id == aTableColumn) { diff --git a/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/TableColumn.java b/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/TableColumn.java index b72a98ade4..5fb4cb3bb9 100755 --- a/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/TableColumn.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/TableColumn.java @@ -199,7 +199,7 @@ void destroyWidget () { releaseHandle (); } -void drawInteriorFrame_inView (int cellFrame, int view) { +void drawInteriorFrame_inView (int /*long*/ id, int /*long*/ sel, int /*long*/ cellFrame, int /*long*/ view) { NSRect cellRect = new NSRect (); OS.memmove (cellRect, cellFrame, NSRect.sizeof); NSGraphicsContext context = NSGraphicsContext.currentContext (); diff --git a/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Text.java b/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Text.java index 283a84e468..b3ec82ddb5 100755 --- a/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Text.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Text.java @@ -251,7 +251,7 @@ public void append (String string) { if (string.length () != 0) sendEvent (SWT.Modify); } -boolean becomeFirstResponder (int id, int sel) { +boolean becomeFirstResponder (int /*long*/ id, int /*long*/ sel) { receivingFocus = true; boolean result = super.becomeFirstResponder (id, sel); receivingFocus = false; @@ -569,7 +569,7 @@ public int getCaretPosition () { return 0; } else { NSRange range = ((NSTextView)view).selectedRange(); - return range.location; + return (int)/*64*/range.location; } } @@ -586,9 +586,9 @@ public int getCaretPosition () { public int getCharCount () { checkWidget (); if ((style & SWT.SINGLE) != 0) { - return new NSCell (((NSControl) view).cell ()).title ().length (); + return (int)/*64*/new NSCell (((NSControl) view).cell ()).title ().length (); } else { - return ((NSTextView) view).textStorage ().length (); + return (int)/*64*/((NSTextView) view).textStorage ().length (); } } @@ -651,7 +651,7 @@ public boolean getEditable () { char [] getEditText () { NSString str = new NSTextFieldCell (((NSTextField) view).cell ()).title (); - int length = str.length (); + int length = (int)/*64*/str.length (); char [] buffer = new char [length]; if (hiddenText != null) { hiddenText.getChars (0, length, buffer, 0); @@ -665,16 +665,16 @@ char [] getEditText () { char [] getEditText (int start, int end) { NSString str = new NSTextFieldCell (((NSTextField) view).cell ()).title (); - int length = str.length (); + int length = (int)/*64*/str.length (); end = Math.min (end, length - 1); if (start > end) return new char [0]; start = Math.max (0, start); NSRange range = new NSRange (); range.location = start; range.length = Math.max (0, end - start + 1); - char [] buffer = new char [range.length]; + char [] buffer = new char [(int)/*64*/range.length]; if (hiddenText != null) { - hiddenText.getChars (range.location, range.location + range.length, buffer, 0); + hiddenText.getChars ((int)/*64*/range.location, (int)/*64*/(range.location + range.length), buffer, 0); } else { str.getCharacters (buffer, range); } @@ -694,7 +694,7 @@ char [] getEditText (int start, int end) { public int getLineCount () { checkWidget (); if ((style & SWT.SINGLE) != 0) return 1; - return ((NSTextView) view).textStorage ().paragraphs ().count (); + return (int)/*64*/((NSTextView) view).textStorage ().paragraphs ().count (); } /** @@ -807,13 +807,13 @@ public Point getSelection () { if ((style & SWT.SINGLE) != 0) { if (selectionRange == null) { NSString str = new NSTextFieldCell (((NSTextField) view).cell ()).title (); - return new Point(str.length (), str.length ()); + return new Point((int)/*64*/str.length (), (int)/*64*/str.length ()); } - return new Point (selectionRange.location, selectionRange.location + selectionRange.length); + return new Point ((int)/*64*/selectionRange.location, (int)/*64*/(selectionRange.location + selectionRange.length)); } else { NSTextView widget = (NSTextView) view; NSRange range = widget.selectedRange (); - return new Point (range.location, range.location + range.length); + return new Point ((int)/*64*/range.location, (int)/*64*/(range.location + range.length)); } } @@ -830,11 +830,11 @@ public Point getSelection () { public int getSelectionCount () { checkWidget (); if ((style & SWT.SINGLE) != 0) { - return selectionRange != null ? selectionRange.length : 0; + return selectionRange != null ? (int)/*64*/selectionRange.length : 0; } else { NSTextView widget = (NSTextView) view; NSRange range = widget.selectedRange (); - return range.length; + return (int)/*64*/range.length; } } @@ -858,7 +858,7 @@ public String getSelectionText () { NSTextView widget = (NSTextView) view; NSRange range = widget.selectedRange (); NSString str = widget.textStorage ().string (); - char[] buffer = new char [range.length]; + char[] buffer = new char [(int)/*64*/range.length]; str.getCharacters (buffer, range); return new String (buffer); } @@ -934,7 +934,7 @@ public String getText (int start, int end) { return new String (getEditText (start, end)); } NSTextStorage storage = ((NSTextView) view).textStorage (); - end = Math.min (end, storage.length () - 1); + end = Math.min (end, (int)/*64*/storage.length () - 1); if (start > end) return ""; //$NON-NLS-1$ start = Math.max (0, start); NSRange range = new NSRange (); @@ -1535,7 +1535,7 @@ public void setSelection (int start, int end) { checkWidget (); if ((style & SWT.SINGLE) != 0) { NSString str = new NSCell (((NSTextField) view).cell ()).title (); - int length = str.length (); + int length = (int)/*64*/str.length (); int selStart = Math.min (Math.max (Math.min (start, end), 0), length); int selEnd = Math.min (Math.max (Math.max (start, end), 0), length); selectionRange = new NSRange (); @@ -1546,7 +1546,7 @@ public void setSelection (int start, int end) { editor.setSelectedRange (selectionRange); } } else { - int length = ((NSTextView) view).textStorage ().length (); + int length = (int)/*64*/((NSTextView) view).textStorage ().length (); int selStart = Math.min (Math.max (Math.min (start, end), 0), length); int selEnd = Math.min (Math.max (Math.max (start, end), 0), length); NSRange range = new NSRange (); @@ -1726,17 +1726,17 @@ public void showSelection () { } } -void textViewDidChangeSelection(int aNotification) { +void textViewDidChangeSelection(int /*long*/ id, int /*long*/ sel, int /*long*/ aNotification) { NSNotification notification = new NSNotification (aNotification); NSText editor = new NSText (notification.object ().id); selectionRange = editor.selectedRange (); } -void textDidChange (int aNotification) { +void textDidChange (int /*long*/ id, int /*long*/ sel, int /*long*/ aNotification) { postEvent (SWT.Modify); } -NSRange textView_willChangeSelectionFromCharacterRange_toCharacterRange (int aTextView, int oldSelectedCharRange, int newSelectedCharRange) { +NSRange textView_willChangeSelectionFromCharacterRange_toCharacterRange (int /*long*/ id, int /*long*/ sel, int /*long*/ aTextView, int /*long*/ oldSelectedCharRange, int /*long*/ newSelectedCharRange) { /* * If the selection is changing as a result of the receiver getting focus * then return the receiver's last selection range, otherwise the full @@ -1756,7 +1756,7 @@ int traversalCode (int key, NSEvent theEvent) { if ((style & SWT.MULTI) != 0) { bits &= ~SWT.TRAVERSE_RETURN; if (key == 48 /* Tab */ && theEvent != null) { - int modifiers = theEvent.modifierFlags (); + int /*long*/ modifiers = theEvent.modifierFlags (); boolean next = (modifiers & OS.NSShiftKeyMask) == 0; if (next && (modifiers & OS.NSControlKeyMask) == 0) { bits &= ~(SWT.TRAVERSE_TAB_NEXT | SWT.TRAVERSE_TAB_PREVIOUS); diff --git a/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/ToolItem.java b/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/ToolItem.java index 50e27c9df0..1eb4ed4ce5 100755 --- a/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/ToolItem.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/ToolItem.java @@ -283,7 +283,7 @@ void destroyWidget() { super.destroyWidget(); } -void drawWidget (int id, NSRect rect) { +void drawWidget (int /*long*/ id, NSRect rect) { if (id == view.id && getSelection ()) { NSRect bounds = view.bounds(); NSGraphicsContext context = NSGraphicsContext.currentContext(); @@ -514,11 +514,11 @@ public boolean isEnabled () { return getEnabled () && parent.isEnabled (); } -int menuForEvent (int id, int sel, int theEvent) { +int /*long*/ menuForEvent (int /*long*/ id, int /*long*/ sel, int /*long*/ theEvent) { return parent.menuForEvent (id, sel, theEvent); } -void mouseDown(int id, int sel, int theEvent) { +void mouseDown(int /*long*/ id, int /*long*/ sel, int /*long*/ theEvent) { Display display = this.display; display.trackingControl = parent; super.mouseDown(id, sel, theEvent); diff --git a/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Tracker.java b/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Tracker.java index 76f4a1fd1e..36b3907092 100755 --- a/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Tracker.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Tracker.java @@ -530,7 +530,7 @@ void mouse (NSEvent nsEvent) { } oldX = newX; oldY = newY; } - switch (nsEvent.type()) { + switch ((int)/*64*/nsEvent.type()) { case OS.NSLeftMouseUp: case OS.NSRightMouseUp: case OS.NSOtherMouseUp: @@ -541,7 +541,7 @@ void mouse (NSEvent nsEvent) { void key (NSEvent nsEvent) { //TODO send event // if (!sendKeyEvent (SWT.KeyDown, theEvent)) return OS.noErr; - int modifierFlags = nsEvent.modifierFlags(); + int /*long*/ modifierFlags = nsEvent.modifierFlags(); int stepSize = (modifierFlags & OS.NSControlKeyMask) != 0 ? STEPSIZE_SMALL : STEPSIZE_LARGE; int xChange = 0, yChange = 0; switch (nsEvent.keyCode()) { @@ -703,14 +703,14 @@ public boolean open () { tracking = true; window = (NSWindow)new NSWindow().alloc(); NSArray screens = NSScreen.screens(); - float minX = Float.MAX_VALUE, maxX = Float.MIN_VALUE; - float minY = Float.MAX_VALUE, maxY = Float.MIN_VALUE; - int count = screens.count(); + double /*float*/ minX = Float.MAX_VALUE, maxX = Float.MIN_VALUE; + double /*float*/ minY = Float.MAX_VALUE, maxY = Float.MIN_VALUE; + int count = (int)/*64*/screens.count(); for (int i = 0; i < count; i++) { NSScreen screen = new NSScreen(screens.objectAtIndex(i)); NSRect frame = screen.frame(); - float x1 = frame.x, x2 = frame.x + frame.width; - float y1 = frame.y, y2 = frame.y + frame.height; + double /*float*/ x1 = frame.x, x2 = frame.x + frame.width; + double /*float*/ y1 = frame.y, y2 = frame.y + frame.height; if (x1 < minX) minX = x1; if (x2 < minX) minX = x2; if (x1 > maxX) maxX = x1; @@ -754,7 +754,7 @@ public boolean open () { boolean down = false; NSApplication application = NSApplication.sharedApplication(); NSEvent currentEvent = application.currentEvent(); - switch (currentEvent.type()) { + switch ((int)/*64*/currentEvent.type()) { case OS.NSLeftMouseDown: case OS.NSRightMouseDown: case OS.NSOtherMouseDown: @@ -779,7 +779,7 @@ public boolean open () { NSAutoreleasePool pool = (NSAutoreleasePool)new NSAutoreleasePool().alloc().init(); NSEvent event = application.nextEventMatchingMask(0, NSDate.distantFuture(), OS.NSDefaultRunLoopMode, true); if (event == null) continue; - int type = event.type(); + int type = (int)/*64*/event.type(); switch (type) { case OS.NSLeftMouseUp: case OS.NSRightMouseUp: diff --git a/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/TrayItem.java b/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/TrayItem.java index d3aff5e21c..4aca800d8d 100755 --- a/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/TrayItem.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/TrayItem.java @@ -337,7 +337,7 @@ public void setImage (Image image) { if (image != null && image.isDisposed ()) error (SWT.ERROR_INVALID_ARGUMENT); super.setImage (image); view.setImage(image != null ? image.handle : null); - float width = image != null && visible ? image.handle.size().width + BORDER : 0; + double /*float*/ width = image != null && visible ? image.handle.size().width + BORDER : 0; item.setLength(width); } @@ -404,7 +404,7 @@ public void setVisible (boolean visible) { if (isDisposed ()) return; } this.visible = visible; - float width = image != null && visible ? image.handle.size().width + BORDER : 0; + double /*float*/ width = image != null && visible ? image.handle.size().width + BORDER : 0; item.setLength(width); if (!visible) sendEvent (SWT.Hide); } @@ -418,29 +418,27 @@ void showMenu () { _setToolTipText (toolTipText); } -void mouseDown(int id, int sel, int event) { +void mouseDown(int /*long*/ id, int /*long*/ sel, int /*long*/ event) { NSEvent nsEvent = new NSEvent(event); - int mask = nsEvent.modifierFlags() & OS.NSDeviceIndependentModifierFlagsMask; - if (mask == OS.NSControlKeyMask) { + if ((nsEvent.modifierFlags() & OS.NSDeviceIndependentModifierFlagsMask) == OS.NSControlKeyMask) { showMenu(); } else { highlight = true; view.setNeedsDisplay(true); - int clickCount = nsEvent.clickCount(); - postEvent(clickCount == 2 ? SWT.DefaultSelection : SWT.Selection); + postEvent(nsEvent.clickCount() == 2 ? SWT.DefaultSelection : SWT.Selection); } } -void mouseUp(int id, int sel, int theEvent) { +void mouseUp(int /*long*/ id, int /*long*/ sel, int /*long*/ theEvent) { highlight = false; view.setNeedsDisplay(true); } -void rightMouseDown(int id, int sel, int theEvent) { +void rightMouseDown(int /*long*/ id, int /*long*/ sel, int /*long*/ theEvent) { showMenu(); } -void drawRect(int id, int sel, NSRect rect) { +void drawRect(int /*long*/ id, int /*long*/ sel, NSRect rect) { item.drawStatusBarBackgroundInRect(rect, highlight); super.drawRect(id, sel, rect); } diff --git a/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Tree.java b/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Tree.java index 9eecf37c5b..e75e0feb95 100755 --- a/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Tree.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Tree.java @@ -80,7 +80,7 @@ public class Tree extends Composite { TreeColumn sortColumn; int columnCount; int sortDirection; - float levelIndent; + double /*float*/ levelIndent; boolean ignoreExpand, ignoreSelect; /** @@ -351,7 +351,7 @@ public Point computeSize (int wHint, int hHint, boolean changed) { width = wHint; } if (hHint == SWT.DEFAULT) { - height = ((NSTableView) view).numberOfRows () * getItemHeight () + getHeaderHeight (); + height = (int)/*64*/((NSTableView) view).numberOfRows () * getItemHeight () + getHeaderHeight (); } else { height = hHint; } @@ -1014,7 +1014,7 @@ public TreeItem getItem (Point point) { NSPoint pt = new NSPoint(); pt.x = point.x; pt.y = point.y; - int row = widget.rowAtPoint(pt); + int row = (int)/*64*/widget.rowAtPoint(pt); if (row == -1) return null; id id = widget.itemAtRow(row); Widget item = display.getWidget (id.id); @@ -1152,7 +1152,7 @@ public TreeItem [] getSelection () { return new TreeItem [0]; } NSIndexSet selection = widget.selectedRowIndexes (); - int count = selection.count (); + int count = (int)/*64*/selection.count (); int [] indexBuffer = new int [count]; selection.getIndexes (indexBuffer, count, 0); TreeItem [] result = new TreeItem [count]; @@ -1179,7 +1179,7 @@ public TreeItem [] getSelection () { */ public int getSelectionCount () { checkWidget (); - return ((NSTableView) view).numberOfSelectedRows (); + return (int)/*64*/((NSTableView) view).numberOfSelectedRows (); } /** @@ -1315,15 +1315,15 @@ public int indexOf (TreeItem item) { return -1; } -int outlineView_child_ofItem (int outlineView, int index, int ref) { - TreeItem parent = (TreeItem) display.getWidget (ref); - TreeItem item = _getItem (parent, index, true); +int /*long*/ outlineView_child_ofItem (int /*long*/ id, int /*long*/ sel, int /*long*/ outlineView, int /*long*/ index, int /*long*/ itemID) { + TreeItem parent = (TreeItem) display.getWidget (itemID); + TreeItem item = _getItem (parent, (int)/*64*/index, true); checkData (item, false); return item.handle.id; } -int outlineView_objectValueForTableColumn_byItem (int outlineView, int tableColumn, int ref) { - TreeItem item = (TreeItem) display.getWidget (ref); +int /*long*/ outlineView_objectValueForTableColumn_byItem (int /*long*/ id, int /*long*/ sel, int /*long*/ outlineView, int /*long*/ tableColumn, int /*long*/ itemID) { + TreeItem item = (TreeItem) display.getWidget (itemID); if (checkColumn != null && tableColumn == checkColumn.id) { NSNumber value; if (item.checked && item.grayed) { @@ -1341,19 +1341,19 @@ int outlineView_objectValueForTableColumn_byItem (int outlineView, int tableColu return item.createString (0).id; } -boolean outlineView_isItemExpandable (int outlineView, int ref) { - if (ref == 0) return true; - return ((TreeItem) display.getWidget (ref)).itemCount != 0; +boolean outlineView_isItemExpandable (int /*long*/ id, int /*long*/ sel, int /*long*/ outlineView, int /*long*/ item) { + if (item == 0) return true; + return ((TreeItem) display.getWidget (item)).itemCount != 0; } -int outlineView_numberOfChildrenOfItem (int outlineView, int ref) { - if (ref == 0) return itemCount; - return ((TreeItem) display.getWidget (ref)).itemCount; +int /*long*/ outlineView_numberOfChildrenOfItem (int /*long*/ id, int /*long*/ sel, int /*long*/ outlineView, int /*long*/ item) { + if (item == 0) return itemCount; + return ((TreeItem) display.getWidget (item)).itemCount; } -void outlineView_willDisplayCell_forTableColumn_item (int outlineView, int cell, int tableColumn, int ref) { +void outlineView_willDisplayCell_forTableColumn_item (int /*long*/ id, int /*long*/ sel, int /*long*/ outlineView, int /*long*/ cell, int /*long*/ tableColumn, int /*long*/ itemID) { if (checkColumn != null && tableColumn == checkColumn.id) return; - TreeItem item = (TreeItem) display.getWidget(ref); + TreeItem item = (TreeItem) display.getWidget(itemID); Image image = item.image; for (int i=0; i<columnCount; i++) { if (columns [i].nsColumn.id == tableColumn) { @@ -1364,10 +1364,10 @@ void outlineView_willDisplayCell_forTableColumn_item (int outlineView, int cell, browserCell.setImage (image != null ? image.handle : null); } -void outlineViewSelectionDidChange (int notification) { +void outlineViewSelectionDidChange (int /*long*/ id, int /*long*/ sel, int /*long*/ notification) { if (ignoreSelect) return; NSOutlineView widget = (NSOutlineView) view; - int row = widget.selectedRow (); + int row = (int)/*64*/widget.selectedRow (); if(row == -1) postEvent (SWT.Selection); else { @@ -1380,8 +1380,8 @@ void outlineViewSelectionDidChange (int notification) { } } -boolean outlineView_shouldCollapseItem (int outlineView, int ref) { - TreeItem item = (TreeItem) display.getWidget (ref); +boolean outlineView_shouldCollapseItem (int /*long*/ id, int /*long*/ sel, int /*long*/ outlineView, int /*long*/ itemID) { + TreeItem item = (TreeItem) display.getWidget (itemID); if (!ignoreExpand) { Event event = new Event (); event.item = item; @@ -1395,8 +1395,8 @@ boolean outlineView_shouldCollapseItem (int outlineView, int ref) { return !item.expanded; } -boolean outlineView_shouldExpandItem (int outlineView, int ref) { - final TreeItem item = (TreeItem) display.getWidget (ref); +boolean outlineView_shouldExpandItem (int /*long*/ id, int /*long*/ sel, int /*long*/ outlineView, int /*long*/ itemID) { + final TreeItem item = (TreeItem) display.getWidget (itemID); if (!ignoreExpand) { Event event = new Event (); event.item = item; @@ -1410,8 +1410,8 @@ boolean outlineView_shouldExpandItem (int outlineView, int ref) { return item.expanded; } -void outlineView_setObjectValue_forTableColumn_byItem (int outlineView, int object, int tableColumn, int ref) { - TreeItem item = (TreeItem) display.getWidget (ref); +void outlineView_setObjectValue_forTableColumn_byItem (int /*long*/ id, int /*long*/ sel, int /*long*/ outlineView, int /*long*/ object, int /*long*/ tableColumn, int /*long*/ itemID) { + TreeItem item = (TreeItem) display.getWidget (itemID); if (checkColumn != null && tableColumn == checkColumn.id) { item.checked = !item.checked; Event event = new Event (); @@ -1592,8 +1592,7 @@ public void select (TreeItem item) { if (item.isDisposed ()) error (SWT.ERROR_INVALID_ARGUMENT); showItem (item); NSOutlineView outlineView = (NSOutlineView) view; - int row = outlineView.rowForItem (item.handle); - outlineView.selectRow (row, false); + outlineView.selectRow (outlineView.rowForItem (item.handle), false); } void sendDoubleSelection() { @@ -1931,8 +1930,7 @@ public void setSelection (TreeItem [] items) { if (items [i].isDisposed ()) error (SWT.ERROR_INVALID_ARGUMENT); TreeItem item = items [i]; showItem (items [i], false); - int row = outlineView.rowForItem (item.handle); - rows.addIndex (row); + rows.addIndex (outlineView.rowForItem (item.handle)); } } ignoreSelect = true; @@ -2031,9 +2029,8 @@ public void setTopItem (TreeItem item) { if (item.isDisposed ()) error (SWT.ERROR_INVALID_ARGUMENT); showItem (item, false); NSOutlineView outlineView = (NSOutlineView) view; - int row = outlineView.rowForItem (item.handle); //FIXME - ((NSTableView) view).scrollRowToVisible (row); + ((NSTableView) view).scrollRowToVisible (outlineView.rowForItem (item.handle)); } /** @@ -2097,8 +2094,7 @@ void showItem (TreeItem item, boolean scroll) { } if (scroll) { NSOutlineView outlineView = (NSOutlineView) view; - int row = outlineView.rowForItem (item.handle); - outlineView.scrollRowToVisible (row); + outlineView.scrollRowToVisible (outlineView.rowForItem (item.handle)); } } diff --git a/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/TreeColumn.java b/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/TreeColumn.java index f09df8ca07..2ff172e7db 100755 --- a/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/TreeColumn.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/TreeColumn.java @@ -201,7 +201,7 @@ void destroyWidget () { releaseHandle (); } -void drawInteriorFrame_inView (int cellFrame, int view) { +void drawInteriorFrame_inView (int /*long*/ id, int /*long*/ sel, int /*long*/ cellFrame, int /*long*/ view) { NSRect cellRect = new NSRect (); OS.memmove (cellRect, cellFrame, NSRect.sizeof); NSGraphicsContext context = NSGraphicsContext.currentContext (); diff --git a/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/TreeItem.java b/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/TreeItem.java index 6a418d0c6f..4a1f8b2ea2 100755 --- a/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/TreeItem.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/TreeItem.java @@ -255,8 +255,7 @@ int calculateWidth (int index, GC gc, boolean recurse) { // width = event.width; // } if (index == 0) { - int level = ((NSOutlineView) parent.view).levelForItem (handle); - width += parent.levelIndent * level; + width += parent.levelIndent * ((NSOutlineView) parent.view).levelForItem (handle); this.width = width; } } @@ -438,8 +437,7 @@ public Rectangle getBounds () { checkWidget (); if (!parent.checkData (this, true)) error (SWT.ERROR_WIDGET_DISPOSED); NSOutlineView outlineView = (NSOutlineView) parent.view; - int row = outlineView.rowForItem (handle); - NSRect rect = outlineView.rectOfRow (row); + NSRect rect = outlineView.rectOfRow (outlineView.rowForItem (handle)); return new Rectangle((int) rect.x, (int) rect.y, (int) rect.width, (int) rect.height); } @@ -462,9 +460,8 @@ public Rectangle getBounds (int index) { if (!parent.checkData (this, true)) error (SWT.ERROR_WIDGET_DISPOSED); if (index != 0 && !(0 <= index && index < parent.columnCount)) return new Rectangle (0, 0, 0, 0); NSOutlineView outlineView = (NSOutlineView) parent.view; - int row = outlineView.rowForItem (handle); if ((parent.style & SWT.CHECK) != 0) index ++; - NSRect rect = outlineView.frameOfCellAtColumn (index, row); + NSRect rect = outlineView.frameOfCellAtColumn (index, outlineView.rowForItem (handle)); return new Rectangle((int) rect.x, (int) rect.y, (int) rect.width, (int) rect.height); } @@ -658,9 +655,8 @@ public Rectangle getImageBounds (int index) { if (!parent.checkData (this, true)) error (SWT.ERROR_WIDGET_DISPOSED); if (index != 0 && !(0 <= index && index < parent.columnCount)) return new Rectangle (0, 0, 0, 0); NSOutlineView outlineView = (NSOutlineView) parent.view; - int row = outlineView.rowForItem (handle); if ((parent.style & SWT.CHECK) != 0) index ++; - NSRect rect = outlineView.frameOfCellAtColumn (index, row); + NSRect rect = outlineView.frameOfCellAtColumn (index, outlineView.rowForItem (handle)); //TODO is this right? Image image = index == 0 ? this.image : (images != null) ? images [index] : null; rect.width = image != null ? image.getBounds().width : 0; @@ -827,9 +823,8 @@ public Rectangle getTextBounds (int index) { if (!parent.checkData (this, true)) error (SWT.ERROR_WIDGET_DISPOSED); if (index != 0 && !(0 <= index && index < parent.columnCount)) return new Rectangle (0, 0, 0, 0); NSOutlineView outlineView = (NSOutlineView) parent.view; - int row = outlineView.rowForItem (handle); if ((parent.style & SWT.CHECK) != 0) index ++; - NSRect rect = outlineView.frameOfCellAtColumn (index, row); + NSRect rect = outlineView.frameOfCellAtColumn (index, outlineView.rowForItem (handle)); //TODO is this right? Image image = index == 0 ? this.image : (images != null) ? images [index] : null; if (image != null) { diff --git a/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Widget.java b/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Widget.java index 47167a33b5..7a4853f105 100755 --- a/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Widget.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Widget.java @@ -50,7 +50,7 @@ public abstract class Widget { EventTable eventTable; Object data; - int jniRef; + int /*long*/ jniRef; /* Global state flags */ static final int DISPOSED = 1 << 0; @@ -139,37 +139,37 @@ NSBezierPath getClipping () { return null; } -int attributedSubstringFromRange (int id, int sel, int range) { +int /*long*/ attributedSubstringFromRange (int /*long*/ id, int /*long*/ sel, int /*long*/ range) { return 0; } -void callSuper(int id, int selector, int arg0) { +void callSuper(int /*long*/ id, int /*long*/ sel, int /*long*/ arg0) { objc_super super_struct = new objc_super(); super_struct.receiver = id; super_struct.cls = OS.objc_msgSend(id, OS.sel_superclass); - OS.objc_msgSendSuper(super_struct, selector, arg0); + OS.objc_msgSendSuper(super_struct, sel, arg0); } -boolean callSuperBoolean(int id, int sel) { +boolean callSuperBoolean(int /*long*/ id, int /*long*/ sel) { objc_super super_struct = new objc_super(); super_struct.receiver = id; super_struct.cls = OS.objc_msgSend(id, OS.sel_superclass); return OS.objc_msgSendSuper(super_struct, sel) != 0; } -int characterIndexForPoint (int id, int sel, int point) { +int /*long*/ characterIndexForPoint (int /*long*/ id, int /*long*/ sel, int /*long*/ point) { return OS.NSNotFound; } -boolean acceptsFirstResponder (int id, int sel) { +boolean acceptsFirstResponder (int /*long*/ id, int /*long*/ sel) { return callSuperBoolean(id, sel); } -boolean becomeFirstResponder (int id, int sel) { +boolean becomeFirstResponder (int /*long*/ id, int /*long*/ sel) { return callSuperBoolean(id, sel); } -boolean resignFirstResponder (int id, int sel) { +boolean resignFirstResponder (int /*long*/ id, int /*long*/ sel) { return callSuperBoolean(id, sel); } @@ -330,11 +330,11 @@ protected void checkWidget () { if ((state & DISPOSED) != 0) error (SWT.ERROR_WIDGET_DISPOSED); } -boolean clickOnLink(int textView, int link, int charIndex) { +boolean textView_clickOnLink_atIndex(int /*long*/ id, int /*long*/ sel, int /*long*/ textView, int /*long*/ link, int /*long*/ charIndex) { return true; } -void comboBoxSelectionDidChange(int notification) { +void comboBoxSelectionDidChange(int /*long*/ id, int /*long*/ sel, int /*long*/ notification) { } void copyToClipboard (char [] buffer) { @@ -403,7 +403,7 @@ public void dispose () { release (true); } -boolean doCommandBySelector (int id, int sel, int aSelector) { +boolean doCommandBySelector (int /*long*/ id, int /*long*/ sel, int /*long*/ aSelector) { callSuper (id, sel, aSelector); return true; } @@ -412,10 +412,10 @@ void drawBackground (int control, int context) { /* Do nothing */ } -void drawInteriorFrame_inView (int cellFrame, int view) { +void drawInteriorFrame_inView (int /*long*/ id, int /*long*/ sel, int /*long*/ cellFrame, int /*long*/ view) { } -void drawRect (int id, int sel, NSRect rect) { +void drawRect (int /*long*/ id, int /*long*/ sel, NSRect rect) { //TODO offset region to view coordinates //TODO use region from control as well shell region NSGraphicsContext current = NSGraphicsContext.currentContext(); @@ -434,7 +434,7 @@ void drawRect (int id, int sel, NSRect rect) { } } -void drawWidget (int id, NSRect rect) { +void drawWidget (int /*long*/ id, NSRect rect) { } void error (int code) { @@ -445,7 +445,7 @@ boolean filters (int eventType) { return display.filters (eventType); } -NSRect firstRectForCharacterRange(int id, int sel, int range) { +NSRect firstRectForCharacterRange(int /*long*/ id, int /*long*/ sel, int /*long*/ range) { return new NSRect (); } @@ -608,14 +608,14 @@ public int getStyle () { return style; } -boolean hasMarkedText (int id, int sel) { +boolean hasMarkedText (int /*long*/ id, int /*long*/ sel) { return false; } -void helpRequested(int theEvent) { +void helpRequested(int /*long*/ id, int /*long*/ sel, int /*long*/ theEvent) { } -int hitTest (int id, int sel, NSPoint point) { +int /*long*/ hitTest (int /*long*/ id, int /*long*/ sel, NSPoint point) { objc_super super_struct = new objc_super(); super_struct.receiver = id; super_struct.cls = OS.objc_msgSend(id, OS.sel_superclass); @@ -627,7 +627,7 @@ boolean hooks (int eventType) { return eventTable.hooks (eventType); } -boolean insertText (int id, int sel, int string) { +boolean insertText (int /*long*/ id, int /*long*/ sel, int /*long*/ string) { callSuper (id, sel, string); return true; } @@ -647,7 +647,7 @@ public boolean isDisposed () { return (state & DISPOSED) != 0; } -boolean isFlipped () { +boolean isFlipped (int /*long*/ id, int /*long*/ sel) { return true; } @@ -672,7 +672,7 @@ public boolean isListening (int eventType) { return hooks (eventType); } -boolean isOpaque(int id, int sel) { +boolean isOpaque(int /*long*/ id, int /*long*/ sel) { return false; } @@ -684,116 +684,116 @@ boolean isValidThread () { return getDisplay ().isValidThread (); } -void flagsChanged (int id, int sel, int theEvent) { +void flagsChanged (int /*long*/ id, int /*long*/ sel, int /*long*/ theEvent) { callSuper (id, sel, theEvent); } -void keyDown (int id, int sel, int theEvent) { +void keyDown (int /*long*/ id, int /*long*/ sel, int /*long*/ theEvent) { callSuper(id, sel, theEvent); } -void keyUp (int id, int sel, int theEvent) { +void keyUp (int /*long*/ id, int /*long*/ sel, int /*long*/ theEvent) { callSuper(id, sel, theEvent); } -void mouseDown(int id, int sel, int theEvent) { +void mouseDown(int /*long*/ id, int /*long*/ sel, int /*long*/ theEvent) { callSuper(id, sel, theEvent); } -void mouseUp(int id, int sel, int theEvent) { +void mouseUp(int /*long*/ id, int /*long*/ sel, int /*long*/ theEvent) { callSuper(id, sel, theEvent); } -void rightMouseDown(int id, int sel, int theEvent) { +void rightMouseDown(int /*long*/ id, int /*long*/ sel, int /*long*/ theEvent) { callSuper(id, sel, theEvent); } -void rightMouseUp(int id, int sel, int theEvent) { +void rightMouseUp(int /*long*/ id, int /*long*/ sel, int /*long*/ theEvent) { callSuper(id, sel, theEvent); } -void otherMouseDown(int id, int sel, int theEvent) { +void otherMouseDown(int /*long*/ id, int /*long*/ sel, int /*long*/ theEvent) { callSuper(id, sel, theEvent); } -void otherMouseUp(int id, int sel, int theEvent) { +void otherMouseUp(int /*long*/ id, int /*long*/ sel, int /*long*/ theEvent) { callSuper(id, sel, theEvent); } -void mouseMoved(int id, int sel, int theEvent) { +void mouseMoved(int /*long*/ id, int /*long*/ sel, int /*long*/ theEvent) { callSuper(id, sel, theEvent); } -void mouseDragged(int id, int sel, int theEvent) { +void mouseDragged(int /*long*/ id, int /*long*/ sel, int /*long*/ theEvent) { callSuper(id, sel, theEvent); } -void mouseEntered(int id, int sel, int theEvent) { +void mouseEntered(int /*long*/ id, int /*long*/ sel, int /*long*/ theEvent) { callSuper(id, sel, theEvent); } -void mouseExited(int id, int sel, int theEvent) { +void mouseExited(int /*long*/ id, int /*long*/ sel, int /*long*/ theEvent) { callSuper(id, sel, theEvent); } -int menuForEvent (int id, int sel, int theEvent) { +int /*long*/ menuForEvent (int /*long*/ id, int /*long*/ sel, int /*long*/ theEvent) { objc_super super_struct = new objc_super(); super_struct.receiver = id; super_struct.cls = OS.objc_msgSend(id, OS.sel_superclass); return OS.objc_msgSendSuper(super_struct, sel, theEvent); } -void menuNeedsUpdate(int menu) { +void menuNeedsUpdate(int /*long*/ id, int /*long*/ sel, int /*long*/ menu) { } -NSRange markedRange (int id, int sel) { +NSRange markedRange (int /*long*/ id, int /*long*/ sel) { return new NSRange (); } -void menu_willHighlightItem(int menu, int item) { +void menu_willHighlightItem(int /*long*/ id, int /*long*/ sel, int /*long*/ menu, int /*long*/ item) { } -void menuDidClose(int menu) { +void menuDidClose(int /*long*/ id, int /*long*/ sel, int /*long*/ menu) { } -void menuWillOpen(int menu) { +void menuWillOpen(int /*long*/ id, int /*long*/ sel, int /*long*/ menu) { } -int numberOfRowsInTableView(int aTableView) { +int /*long*/ numberOfRowsInTableView(int /*long*/ id, int /*long*/ sel, int /*long*/ aTableView) { return 0; } -int outlineView_child_ofItem(int outlineView, int index, int item) { +int /*long*/ outlineView_child_ofItem(int /*long*/ id, int /*long*/ sel, int /*long*/ outlineView, int /*long*/ index, int /*long*/ item) { return 0; } -int outlineView_objectValueForTableColumn_byItem(int outlineView, int tableColumn, int item) { +int /*long*/ outlineView_objectValueForTableColumn_byItem(int /*long*/ id, int /*long*/ sel, int /*long*/ outlineView, int /*long*/ tableColumn, int /*long*/ item) { return 0; } -boolean outlineView_isItemExpandable(int outlineView, int item) { +boolean outlineView_isItemExpandable(int /*long*/ id, int /*long*/ sel, int /*long*/ outlineView, int /*long*/ item) { return false; } -int outlineView_numberOfChildrenOfItem(int outlineView, int item) { +int /*long*/ outlineView_numberOfChildrenOfItem(int /*long*/ id, int /*long*/ sel, int /*long*/ outlineView, int /*long*/ item) { return 0; } -void outlineView_willDisplayCell_forTableColumn_item(int outlineView, int cell, int tableColumn, int item) { +void outlineView_willDisplayCell_forTableColumn_item(int /*long*/ id, int /*long*/ sel, int /*long*/ outlineView, int /*long*/ cell, int /*long*/ tableColumn, int /*long*/ item) { } -boolean outlineView_shouldCollapseItem(int outlineView, int item) { +boolean outlineView_shouldCollapseItem(int /*long*/ id, int /*long*/ sel, int /*long*/ outlineView, int /*long*/ item) { return false; } -boolean outlineView_shouldExpandItem(int outlineView, int item) { +boolean outlineView_shouldExpandItem(int /*long*/ id, int /*long*/ sel, int /*long*/ outlineView, int /*long*/ item) { return false; } -void outlineViewSelectionDidChange(int notification) { +void outlineViewSelectionDidChange(int /*long*/ id, int /*long*/ sel, int /*long*/ notification) { } -void outlineView_setObjectValue_forTableColumn_byItem(int outlineView, int object, int tableColumn, int item) { +void outlineView_setObjectValue_forTableColumn_byItem(int /*long*/ id, int /*long*/ sel, int /*long*/ outlineView, int /*long*/ object, int /*long*/ tableColumn, int /*long*/ item) { } /** @@ -822,11 +822,11 @@ public void notifyListeners (int eventType, Event event) { sendEvent (eventType, event); } -void pageDown (int id, int sel, int sender) { +void pageDown (int /*long*/ id, int /*long*/ sel, int /*long*/ sender) { callSuper(id, sel, sender); } -void pageUp (int id, int sel, int sender) { +void pageUp (int /*long*/ id, int /*long*/ sel, int /*long*/ sender) { callSuper(id, sel, sender); } @@ -965,11 +965,11 @@ public void removeDisposeListener (DisposeListener listener) { eventTable.unhook (SWT.Dispose, listener); } -void scrollWheel (int id, int sel, int theEvent) { +void scrollWheel (int /*long*/ id, int /*long*/ sel, int /*long*/ theEvent) { callSuper(id, sel, theEvent); } -NSRange selectedRange (int id, int sel) { +NSRange selectedRange (int /*long*/ id, int /*long*/ sel) { return new NSRange (); } @@ -1146,14 +1146,14 @@ public void setData (String key, Object value) { } } -void setFrameOrigin (int id, int sel, NSPoint point) { +void setFrameOrigin (int /*long*/ id, int /*long*/ sel, NSPoint point) { objc_super super_struct = new objc_super(); super_struct.receiver = id; super_struct.cls = OS.objc_msgSend(id, OS.sel_superclass); OS.objc_msgSendSuper(super_struct, sel, point); } -void setFrameSize (int id, int sel, NSSize size) { +void setFrameSize (int /*long*/ id, int /*long*/ sel, NSSize size) { objc_super super_struct = new objc_super(); super_struct.receiver = id; super_struct.cls = OS.objc_msgSend(id, OS.sel_superclass); @@ -1162,17 +1162,17 @@ void setFrameSize (int id, int sel, NSSize size) { boolean setInputState (Event event, NSEvent nsEvent, int type) { if (nsEvent == null) return true; - int modifierFlags = nsEvent.modifierFlags(); + int /*long*/ modifierFlags = nsEvent.modifierFlags(); if ((modifierFlags & OS.NSAlternateKeyMask) != 0) event.stateMask |= SWT.ALT; if ((modifierFlags & OS.NSShiftKeyMask) != 0) event.stateMask |= SWT.SHIFT; if ((modifierFlags & OS.NSControlKeyMask) != 0) event.stateMask |= SWT.CONTROL; if ((modifierFlags & OS.NSCommandKeyMask) != 0) event.stateMask |= SWT.COMMAND; //TODO multiple mouse buttons pressed - switch (nsEvent.type()) { + switch ((int)/*64*/nsEvent.type()) { case OS.NSLeftMouseDragged: case OS.NSRightMouseDragged: case OS.NSOtherMouseDragged: - switch (nsEvent.buttonNumber()) { + switch ((int)/*64*/nsEvent.buttonNumber()) { case 0: event.stateMask |= SWT.BUTTON1; break; case 1: event.stateMask |= SWT.BUTTON3; break; case 2: event.stateMask |= SWT.BUTTON2; break; @@ -1253,34 +1253,34 @@ boolean setKeyState (Event event, int type, NSEvent nsEvent) { return true; } -boolean setMarkedText_selectedRange (int id, int sel, int string, int range) { +boolean setMarkedText_selectedRange (int /*long*/ id, int /*long*/ sel, int /*long*/ string, int /*long*/ range) { return true; } -void tableViewSelectionDidChange (int aNotification) { +void tableViewSelectionDidChange (int /*long*/ id, int /*long*/ sel, int /*long*/ aNotification) { } -int tableView_objectValueForTableColumn_row(int aTableView, int aTableColumn, int rowIndex) { +int /*long*/ tableView_objectValueForTableColumn_row(int /*long*/ id, int /*long*/ sel, int /*long*/ aTableView, int /*long*/ aTableColumn, int /*long*/ rowIndex) { return 0; } -void tableView_setObjectValue_forTableColumn_row(int aTableView, int anObject, int aTableColumn, int rowIndex) { +void tableView_setObjectValue_forTableColumn_row(int /*long*/ id, int /*long*/ sel, int /*long*/ aTableView, int /*long*/ anObject, int /*long*/ aTableColumn, int /*long*/ rowIndex) { } -boolean tableView_shouldEditTableColumn_row(int aTableView, int aTableColumn, int rowIndex) { +boolean tableView_shouldEditTableColumn_row(int /*long*/ id, int /*long*/ sel, int /*long*/ aTableView, int /*long*/ aTableColumn, int /*long*/ rowIndex) { return true; } -void tableView_willDisplayCell_forTableColumn_row(int aTableView, int aCell, int aTableColumn, int rowIndex) { +void tableView_willDisplayCell_forTableColumn_row(int /*long*/ id, int /*long*/ sel, int /*long*/ aTableView, int /*long*/ aCell, int /*long*/ aTableColumn, int /*long*/ rowIndex) { } -void textViewDidChangeSelection(int aNotification) { +void textViewDidChangeSelection(int /*long*/ id, int /*long*/ sel, int /*long*/ aNotification) { } -void textDidChange(int aNotification) { +void textDidChange(int /*long*/ id, int /*long*/ sel, int /*long*/ aNotification) { } -NSRange textView_willChangeSelectionFromCharacterRange_toCharacterRange(int aTextView, int oldSelectedCharRange, int newSelectedCharRange) { +NSRange textView_willChangeSelectionFromCharacterRange_toCharacterRange(int /*long*/ id, int /*long*/ sel, int /*long*/ aTextView, int /*long*/ oldSelectedCharRange, int /*long*/ newSelectedCharRange) { return new NSRange(); } @@ -1299,34 +1299,34 @@ public String toString () { return getName () + " {" + string + "}"; } -int validAttributesForMarkedText (int id, int sel) { +int /*long*/ validAttributesForMarkedText (int /*long*/ id, int /*long*/ sel) { return 0; } -void willSelectTabViewItem(int tabView, int tabViewItem) { +void tabView_willSelectTabViewItem(int /*long*/ id, int /*long*/ sel, int /*long*/ tabView, int /*long*/ tabViewItem) { } -void windowDidMove(int notification) { +void windowDidMove(int /*long*/ id, int /*long*/ sel, int /*long*/ notification) { } -void windowDidResize(int notification) { +void windowDidResize(int /*long*/ id, int /*long*/ sel, int /*long*/ notification) { } -void windowDidResignKey(int notification) { +void windowDidResignKey(int /*long*/ id, int /*long*/ sel, int /*long*/ notification) { } -void windowDidBecomeKey(int notification) { +void windowDidBecomeKey(int /*long*/ id, int /*long*/ sel, int /*long*/ notification) { } -void windowSendEvent(int id, int sel, int event) { +void windowSendEvent(int /*long*/ id, int /*long*/ sel, int /*long*/ event) { callSuper(id, sel, event); } -boolean windowShouldClose(int window) { +boolean windowShouldClose(int /*long*/ id, int /*long*/ sel, int /*long*/ window) { return false; } -void windowWillClose(int notification) { +void windowWillClose(int /*long*/ id, int /*long*/ sel, int /*long*/ notification) { } } |