summaryrefslogtreecommitdiffstats
path: root/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/graphics/Image.java
diff options
context:
space:
mode:
Diffstat (limited to 'bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/graphics/Image.java')
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/graphics/Image.java174
1 files changed, 87 insertions, 87 deletions
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/graphics/Image.java b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/graphics/Image.java
index 25997c9183..dca9e8a368 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/graphics/Image.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/graphics/Image.java
@@ -96,7 +96,7 @@ public final class Image extends Resource implements Drawable {
*
* @noreference This field is not intended to be referenced by clients.
*/
- public int /*long*/ handle;
+ public long /*int*/ handle;
/**
* specifies the transparent pixel
@@ -225,17 +225,17 @@ public Image(Device device, Image srcImage, int flag) {
switch (type) {
case SWT.BITMAP:
/* Get the HDC for the device */
- int /*long*/ hDC = device.internal_new_GC(null);
+ long /*int*/ hDC = device.internal_new_GC(null);
/* Copy the bitmap */
- int /*long*/ hdcSource = OS.CreateCompatibleDC(hDC);
- int /*long*/ hdcDest = OS.CreateCompatibleDC(hDC);
- int /*long*/ hOldSrc = OS.SelectObject(hdcSource, srcImage.handle);
+ long /*int*/ hdcSource = OS.CreateCompatibleDC(hDC);
+ long /*int*/ hdcDest = OS.CreateCompatibleDC(hDC);
+ long /*int*/ hOldSrc = OS.SelectObject(hdcSource, srcImage.handle);
BITMAP bm = new BITMAP();
OS.GetObject(srcImage.handle, BITMAP.sizeof, bm);
handle = OS.CreateCompatibleBitmap(hdcSource, rect.width, bm.bmBits != 0 ? -rect.height : rect.height);
if (handle == 0) SWT.error(SWT.ERROR_NO_HANDLES);
- int /*long*/ hOldDest = OS.SelectObject(hdcDest, handle);
+ long /*int*/ hOldDest = OS.SelectObject(hdcDest, handle);
OS.BitBlt(hdcDest, 0, 0, rect.width, rect.height, hdcSource, 0, 0, OS.SRCCOPY);
OS.SelectObject(hdcSource, hOldSrc);
OS.SelectObject(hdcDest, hOldDest);
@@ -604,14 +604,14 @@ void initNative(String filename) {
int length = filename.length();
char[] chars = new char[length+1];
filename.getChars(0, length, chars, 0);
- int /*long*/ bitmap = Gdip.Bitmap_new(chars, false);
+ long /*int*/ bitmap = Gdip.Bitmap_new(chars, false);
if (bitmap != 0) {
int error = SWT.ERROR_NO_HANDLES;
int status = Gdip.Image_GetLastStatus(bitmap);
if (status == 0) {
if (filename.toLowerCase().endsWith(".ico")) {
this.type = SWT.ICON;
- int /*long*/[] hicon = new int /*long*/[1];
+ long /*int*/[] hicon = new long /*int*/[1];
status = Gdip.Bitmap_GetHICON(bitmap, hicon);
this.handle = hicon[0];
} else {
@@ -643,10 +643,10 @@ void initNative(String filename) {
* This performs better than getting the bits with Bitmap.LockBits(),
* but it cannot be used when there is transparency.
*/
- int /*long*/ hDC = device.internal_new_GC(null);
- int /*long*/ srcHDC = OS.CreateCompatibleDC(hDC);
- int /*long*/ oldSrcBitmap = OS.SelectObject(srcHDC, this.handle);
- int /*long*/ graphics = Gdip.Graphics_new(srcHDC);
+ long /*int*/ hDC = device.internal_new_GC(null);
+ long /*int*/ srcHDC = OS.CreateCompatibleDC(hDC);
+ long /*int*/ oldSrcBitmap = OS.SelectObject(srcHDC, this.handle);
+ long /*int*/ graphics = Gdip.Graphics_new(srcHDC);
if (graphics != 0) {
Rect rect = new Rect();
rect.Width = width;
@@ -663,14 +663,14 @@ void initNative(String filename) {
OS.DeleteDC(srcHDC);
device.internal_dispose_GC(hDC, null);
} else {
- int /*long*/ lockedBitmapData = Gdip.BitmapData_new();
+ long /*int*/ lockedBitmapData = Gdip.BitmapData_new();
if (lockedBitmapData != 0) {
status = Gdip.Bitmap_LockBits(bitmap, 0, 0, pixelFormat, lockedBitmapData);
if (status == 0) {
BitmapData bitmapData = new BitmapData();
Gdip.MoveMemory(bitmapData, lockedBitmapData);
int stride = bitmapData.Stride;
- int /*long*/ pixels = bitmapData.Scan0;
+ long /*int*/ pixels = bitmapData.Scan0;
int depth = 0, scanlinePad = 4, transparentPixel = -1;
switch (bitmapData.PixelFormat) {
case Gdip.PixelFormat1bppIndexed: depth = 1; break;
@@ -690,8 +690,8 @@ void initNative(String filename) {
case Gdip.PixelFormat4bppIndexed:
case Gdip.PixelFormat8bppIndexed:
int paletteSize = Gdip.Image_GetPaletteSize(bitmap);
- int /*long*/ hHeap = OS.GetProcessHeap();
- int /*long*/ palette = OS.HeapAlloc(hHeap, OS.HEAP_ZERO_MEMORY, paletteSize);
+ long /*int*/ hHeap = OS.GetProcessHeap();
+ long /*int*/ palette = OS.HeapAlloc(hHeap, OS.HEAP_ZERO_MEMORY, paletteSize);
if (palette == 0) SWT.error(SWT.ERROR_NO_HANDLES);
Gdip.Image_GetPalette(bitmap, palette, paletteSize);
ColorPalette colorPalette = new ColorPalette();
@@ -757,7 +757,7 @@ void initNative(String filename) {
* Create a DIB from a DDB without using GetDIBits. Note that
* the DDB should not be selected into a HDC.
*/
-int /*long*/ createDIBFromDDB(int /*long*/ hDC, int /*long*/ hBitmap, int width, int height) {
+long /*int*/ createDIBFromDDB(long /*int*/ hDC, long /*int*/ hBitmap, int width, int height) {
/* Determine the DDB depth */
int bits = OS.GetDeviceCaps (hDC, OS.BITSPIXEL);
@@ -848,15 +848,15 @@ int /*long*/ createDIBFromDDB(int /*long*/ hDC, int /*long*/ hBitmap, int width,
offset += 4;
}
}
- int /*long*/[] pBits = new int /*long*/[1];
- int /*long*/ hDib = OS.CreateDIBSection(0, bmi, OS.DIB_RGB_COLORS, pBits, 0, 0);
+ long /*int*/[] pBits = new long /*int*/[1];
+ long /*int*/ hDib = OS.CreateDIBSection(0, bmi, OS.DIB_RGB_COLORS, pBits, 0, 0);
if (hDib == 0) SWT.error(SWT.ERROR_NO_HANDLES);
/* Bitblt DDB into DIB */
- int /*long*/ hdcSource = OS.CreateCompatibleDC(hDC);
- int /*long*/ hdcDest = OS.CreateCompatibleDC(hDC);
- int /*long*/ hOldSrc = OS.SelectObject(hdcSource, hBitmap);
- int /*long*/ hOldDest = OS.SelectObject(hdcDest, hDib);
+ long /*int*/ hdcSource = OS.CreateCompatibleDC(hDC);
+ long /*int*/ hdcDest = OS.CreateCompatibleDC(hDC);
+ long /*int*/ hOldSrc = OS.SelectObject(hdcSource, hBitmap);
+ long /*int*/ hOldDest = OS.SelectObject(hdcDest, hDib);
OS.BitBlt(hdcDest, 0, 0, width, height, hdcSource, 0, 0, OS.SRCCOPY);
OS.SelectObject(hdcSource, hOldSrc);
OS.SelectObject(hdcDest, hOldDest);
@@ -866,7 +866,7 @@ int /*long*/ createDIBFromDDB(int /*long*/ hDC, int /*long*/ hBitmap, int width,
return hDib;
}
-int /*long*/ [] createGdipImage() {
+long /*int*/ [] createGdipImage() {
switch (type) {
case SWT.BITMAP: {
if (alpha != -1 || alphaData != null || transparentPixel != -1) {
@@ -874,13 +874,13 @@ int /*long*/ [] createGdipImage() {
OS.GetObject(handle, BITMAP.sizeof, bm);
int imgWidth = bm.bmWidth;
int imgHeight = bm.bmHeight;
- int /*long*/ hDC = device.internal_new_GC(null);
- int /*long*/ srcHdc = OS.CreateCompatibleDC(hDC);
- int /*long*/ oldSrcBitmap = OS.SelectObject(srcHdc, handle);
- int /*long*/ memHdc = OS.CreateCompatibleDC(hDC);
- int /*long*/ memDib = createDIB(imgWidth, imgHeight, 32);
+ long /*int*/ hDC = device.internal_new_GC(null);
+ long /*int*/ srcHdc = OS.CreateCompatibleDC(hDC);
+ long /*int*/ oldSrcBitmap = OS.SelectObject(srcHdc, handle);
+ long /*int*/ memHdc = OS.CreateCompatibleDC(hDC);
+ long /*int*/ memDib = createDIB(imgWidth, imgHeight, 32);
if (memDib == 0) SWT.error(SWT.ERROR_NO_HANDLES);
- int /*long*/ oldMemBitmap = OS.SelectObject(memHdc, memDib);
+ long /*int*/ oldMemBitmap = OS.SelectObject(memHdc, memDib);
BITMAP dibBM = new BITMAP();
OS.GetObject(memDib, BITMAP.sizeof, dibBM);
int sizeInBytes = dibBM.bmWidthBytes * dibBM.bmHeight;
@@ -956,13 +956,13 @@ int /*long*/ [] createGdipImage() {
}
}
}
- int /*long*/ hHeap = OS.GetProcessHeap();
- int /*long*/ pixels = OS.HeapAlloc(hHeap, OS.HEAP_ZERO_MEMORY, srcData.length);
+ long /*int*/ hHeap = OS.GetProcessHeap();
+ long /*int*/ pixels = OS.HeapAlloc(hHeap, OS.HEAP_ZERO_MEMORY, srcData.length);
if (pixels == 0) SWT.error(SWT.ERROR_NO_HANDLES);
OS.MoveMemory(pixels, srcData, sizeInBytes);
- return new int /*long*/ []{Gdip.Bitmap_new(imgWidth, imgHeight, dibBM.bmWidthBytes, Gdip.PixelFormat32bppARGB, pixels), pixels};
+ return new long /*int*/ []{Gdip.Bitmap_new(imgWidth, imgHeight, dibBM.bmWidthBytes, Gdip.PixelFormat32bppARGB, pixels), pixels};
}
- return new int /*long*/ []{Gdip.Bitmap_new(handle, 0), 0};
+ return new long /*int*/ []{Gdip.Bitmap_new(handle, 0), 0};
}
case SWT.ICON: {
/*
@@ -976,13 +976,13 @@ int /*long*/ [] createGdipImage() {
} else {
OS.GetIconInfo(handle, iconInfo);
}
- int /*long*/ hBitmap = iconInfo.hbmColor;
+ long /*int*/ hBitmap = iconInfo.hbmColor;
if (hBitmap == 0) hBitmap = iconInfo.hbmMask;
BITMAP bm = new BITMAP();
OS.GetObject(hBitmap, BITMAP.sizeof, bm);
int imgWidth = bm.bmWidth;
int imgHeight = hBitmap == iconInfo.hbmMask ? bm.bmHeight / 2 : bm.bmHeight;
- int /*long*/ img = 0, pixels = 0;
+ long /*int*/ img = 0, pixels = 0;
/*
* Bug in GDI+. Bitmap_new() segments fault if the image width
* is greater than the image height.
@@ -991,13 +991,13 @@ int /*long*/ [] createGdipImage() {
* channel when the icon depth is 32.
*/
if (imgWidth > imgHeight || bm.bmBitsPixel == 32) {
- int /*long*/ hDC = device.internal_new_GC(null);
- int /*long*/ srcHdc = OS.CreateCompatibleDC(hDC);
- int /*long*/ oldSrcBitmap = OS.SelectObject(srcHdc, hBitmap);
- int /*long*/ memHdc = OS.CreateCompatibleDC(hDC);
- int /*long*/ memDib = createDIB(imgWidth, imgHeight, 32);
+ long /*int*/ hDC = device.internal_new_GC(null);
+ long /*int*/ srcHdc = OS.CreateCompatibleDC(hDC);
+ long /*int*/ oldSrcBitmap = OS.SelectObject(srcHdc, hBitmap);
+ long /*int*/ memHdc = OS.CreateCompatibleDC(hDC);
+ long /*int*/ memDib = createDIB(imgWidth, imgHeight, 32);
if (memDib == 0) SWT.error(SWT.ERROR_NO_HANDLES);
- int /*long*/ oldMemBitmap = OS.SelectObject(memHdc, memDib);
+ long /*int*/ oldMemBitmap = OS.SelectObject(memHdc, memDib);
BITMAP dibBM = new BITMAP();
OS.GetObject(memDib, BITMAP.sizeof, dibBM);
OS.BitBlt(memHdc, 0, 0, imgWidth, imgHeight, srcHdc, 0, hBitmap == iconInfo.hbmMask ? imgHeight : 0, OS.SRCCOPY);
@@ -1022,7 +1022,7 @@ int /*long*/ [] createGdipImage() {
OS.SelectObject(srcHdc, oldSrcBitmap);
OS.DeleteObject(srcHdc);
device.internal_dispose_GC(hDC, null);
- int /*long*/ hHeap = OS.GetProcessHeap();
+ long /*int*/ hHeap = OS.GetProcessHeap();
pixels = OS.HeapAlloc(hHeap, OS.HEAP_ZERO_MEMORY, srcData.length);
if (pixels == 0) SWT.error(SWT.ERROR_NO_HANDLES);
OS.MoveMemory(pixels, srcData, srcData.length);
@@ -1032,7 +1032,7 @@ int /*long*/ [] createGdipImage() {
}
if (iconInfo.hbmColor != 0) OS.DeleteObject(iconInfo.hbmColor);
if (iconInfo.hbmMask != 0) OS.DeleteObject(iconInfo.hbmMask);
- return new int /*long*/ []{img, pixels};
+ return new long /*int*/ []{img, pixels};
}
default: SWT.error(SWT.ERROR_INVALID_IMAGE);
}
@@ -1091,13 +1091,13 @@ public Color getBackground() {
if (transparentPixel == -1) return null;
/* Get the HDC for the device */
- int /*long*/ hDC = device.internal_new_GC(null);
+ long /*int*/ hDC = device.internal_new_GC(null);
/* Compute the background color */
BITMAP bm = new BITMAP();
OS.GetObject(handle, BITMAP.sizeof, bm);
- int /*long*/ hdcMem = OS.CreateCompatibleDC(hDC);
- int /*long*/ hOldObject = OS.SelectObject(hdcMem, handle);
+ long /*int*/ hdcMem = OS.CreateCompatibleDC(hDC);
+ long /*int*/ hOldObject = OS.SelectObject(hdcMem, handle);
int red = 0, green = 0, blue = 0;
if (bm.bmBitsPixel <= 8) {
if (OS.IsWinCE) {
@@ -1177,7 +1177,7 @@ public Rectangle getBounds() {
} else {
ICONINFO info = new ICONINFO();
OS.GetIconInfo(handle, info);
- int /*long*/ hBitmap = info.hbmColor;
+ long /*int*/ hBitmap = info.hbmColor;
if (hBitmap == 0) hBitmap = info.hbmMask;
bm = new BITMAP();
OS.GetObject(hBitmap, BITMAP.sizeof, bm);
@@ -1217,7 +1217,7 @@ public ImageData getImageData() {
if (OS.IsWinCE) SWT.error(SWT.ERROR_NOT_IMPLEMENTED);
OS.GetIconInfo(handle, info);
/* Get the basic BITMAP information */
- int /*long*/ hBitmap = info.hbmColor;
+ long /*int*/ hBitmap = info.hbmColor;
if (hBitmap == 0) hBitmap = info.hbmMask;
bm = new BITMAP();
OS.GetObject(hBitmap, BITMAP.sizeof, bm);
@@ -1239,15 +1239,15 @@ public ImageData getImageData() {
OS.MoveMemory(bmi, bmiHeader, BITMAPINFOHEADER.sizeof);
/* Get the HDC for the device */
- int /*long*/ hDC = device.internal_new_GC(null);
+ long /*int*/ hDC = device.internal_new_GC(null);
/* Create the DC and select the bitmap */
- int /*long*/ hBitmapDC = OS.CreateCompatibleDC(hDC);
- int /*long*/ hOldBitmap = OS.SelectObject(hBitmapDC, hBitmap);
+ long /*int*/ hBitmapDC = OS.CreateCompatibleDC(hDC);
+ long /*int*/ hOldBitmap = OS.SelectObject(hBitmapDC, hBitmap);
/* Select the palette if necessary */
- int /*long*/ oldPalette = 0;
+ long /*int*/ oldPalette = 0;
if (depth <= 8) {
- int /*long*/ hPalette = device.hPalette;
+ long /*int*/ hPalette = device.hPalette;
if (hPalette != 0) {
oldPalette = OS.SelectPalette(hBitmapDC, hPalette, false);
OS.RealizePalette(hBitmapDC);
@@ -1359,14 +1359,14 @@ public ImageData getImageData() {
/* Find out whether this is a DIB or a DDB. */
boolean isDib = (bm.bmBits != 0);
/* Get the HDC for the device */
- int /*long*/ hDC = device.internal_new_GC(null);
+ long /*int*/ hDC = device.internal_new_GC(null);
/*
* Feature in WinCE. GetDIBits is not available in WinCE. The
* workaround is to create a temporary DIB from the DDB and use
* the bmBits field of DIBSECTION to retrieve the image data.
*/
- int /*long*/ handle = this.handle;
+ long /*int*/ handle = this.handle;
if (OS.IsWinCE) {
if (!isDib) {
boolean mustRestore = false;
@@ -1381,7 +1381,7 @@ public ImageData getImageData() {
}
handle = createDIBFromDDB(hDC, this.handle, width, height);
if (mustRestore) {
- int /*long*/ hOldBitmap = OS.SelectObject(memGC.handle, this.handle);
+ long /*int*/ hOldBitmap = OS.SelectObject(memGC.handle, this.handle);
memGC.data.hNullBitmap = hOldBitmap;
}
isDib = true;
@@ -1417,12 +1417,12 @@ public ImageData getImageData() {
}
/* Create the DC and select the bitmap */
- int /*long*/ hBitmapDC = OS.CreateCompatibleDC(hDC);
- int /*long*/ hOldBitmap = OS.SelectObject(hBitmapDC, handle);
+ long /*int*/ hBitmapDC = OS.CreateCompatibleDC(hDC);
+ long /*int*/ hOldBitmap = OS.SelectObject(hBitmapDC, handle);
/* Select the palette if necessary */
- int /*long*/ oldPalette = 0;
+ long /*int*/ oldPalette = 0;
if (!isDib && depth <= 8) {
- int /*long*/ hPalette = device.hPalette;
+ long /*int*/ hPalette = device.hPalette;
if (hPalette != 0) {
oldPalette = OS.SelectPalette(hBitmapDC, hPalette, false);
OS.RealizePalette(hBitmapDC);
@@ -1558,7 +1558,7 @@ void init(int width, int height) {
SWT.error (SWT.ERROR_INVALID_ARGUMENT);
}
type = SWT.BITMAP;
- int /*long*/ hDC = device.internal_new_GC(null);
+ long /*int*/ hDC = device.internal_new_GC(null);
handle = OS.CreateCompatibleBitmap(hDC, width, height);
/*
* Feature in Windows. CreateCompatibleBitmap() may fail
@@ -1573,8 +1573,8 @@ void init(int width, int height) {
handle = createDIB(width, height, depth);
}
if (handle != 0) {
- int /*long*/ memDC = OS.CreateCompatibleDC(hDC);
- int /*long*/ hOldBitmap = OS.SelectObject(memDC, handle);
+ long /*int*/ memDC = OS.CreateCompatibleDC(hDC);
+ long /*int*/ hOldBitmap = OS.SelectObject(memDC, handle);
OS.PatBlt(memDC, 0, 0, width, height, OS.PATCOPY);
OS.SelectObject(memDC, hOldBitmap);
OS.DeleteDC(memDC);
@@ -1585,7 +1585,7 @@ void init(int width, int height) {
}
}
-static int /*long*/ createDIB(int width, int height, int depth) {
+static long /*int*/ createDIB(int width, int height, int depth) {
BITMAPINFOHEADER bmiHeader = new BITMAPINFOHEADER();
bmiHeader.biSize = BITMAPINFOHEADER.sizeof;
bmiHeader.biWidth = width;
@@ -1617,7 +1617,7 @@ static int /*long*/ createDIB(int width, int height, int depth) {
bmi[offset + 11] = (byte)((blueMask & 0xFF) >> 0);
}
- int /*long*/[] pBits = new int /*long*/[1];
+ long /*int*/[] pBits = new long /*int*/[1];
return OS.CreateDIBSection(0, bmi, OS.DIB_RGB_COLORS, pBits, 0, 0);
}
@@ -1633,12 +1633,12 @@ static int /*long*/ createDIB(int width, int height, int depth) {
* if the regular GetIconInfo had been used.
*/
static void GetIconInfo(Image image, ICONINFO info) {
- int /*long*/ [] result = init(image.device, null, image.data);
+ long /*int*/ [] result = init(image.device, null, image.data);
info.hbmColor = result[0];
info.hbmMask = result[1];
}
-static int /*long*/ [] init(Device device, Image image, ImageData i) {
+static long /*int*/ [] init(Device device, Image image, ImageData i) {
/*
* BUG in Windows 98:
* A monochrome DIBSection will display as solid black
@@ -1794,8 +1794,8 @@ static int /*long*/ [] init(Device device, Image image, ImageData i) {
offset += 4;
}
}
- int /*long*/[] pBits = new int /*long*/[1];
- int /*long*/ hDib = OS.CreateDIBSection(0, bmi, OS.DIB_RGB_COLORS, pBits, 0, 0);
+ long /*int*/[] pBits = new long /*int*/[1];
+ long /*int*/ hDib = OS.CreateDIBSection(0, bmi, OS.DIB_RGB_COLORS, pBits, 0, 0);
if (hDib == 0) SWT.error(SWT.ERROR_NO_HANDLES);
/* In case of a scanline pad other than 4, do the work to convert it */
byte[] data = i.data;
@@ -1804,17 +1804,17 @@ static int /*long*/ [] init(Device device, Image image, ImageData i) {
}
OS.MoveMemory(pBits[0], data, data.length);
- int /*long*/ [] result = null;
+ long /*int*/ [] result = null;
if (i.getTransparencyType() == SWT.TRANSPARENCY_MASK) {
/* Get the HDC for the device */
- int /*long*/ hDC = device.internal_new_GC(null);
+ long /*int*/ hDC = device.internal_new_GC(null);
/* Create the color bitmap */
- int /*long*/ hdcSrc = OS.CreateCompatibleDC(hDC);
+ long /*int*/ hdcSrc = OS.CreateCompatibleDC(hDC);
OS.SelectObject(hdcSrc, hDib);
- int /*long*/ hBitmap = OS.CreateCompatibleBitmap(hDC, i.width, i.height);
+ long /*int*/ hBitmap = OS.CreateCompatibleBitmap(hDC, i.width, i.height);
if (hBitmap == 0) SWT.error(SWT.ERROR_NO_HANDLES);
- int /*long*/ hdcDest = OS.CreateCompatibleDC(hDC);
+ long /*int*/ hdcDest = OS.CreateCompatibleDC(hDC);
OS.SelectObject(hdcDest, hBitmap);
OS.BitBlt(hdcDest, 0, 0, i.width, i.height, hdcSrc, 0, 0, OS.SRCCOPY);
@@ -1823,7 +1823,7 @@ static int /*long*/ [] init(Device device, Image image, ImageData i) {
/* Create the mask. Windows requires icon masks to have a scanline pad of 2. */
byte[] maskData = ImageData.convertPad(i.maskData, i.width, i.height, 1, i.maskPad, 2);
- int /*long*/ hMask = OS.CreateBitmap(i.width, i.height, 1, 1, maskData);
+ long /*int*/ hMask = OS.CreateBitmap(i.width, i.height, 1, 1, maskData);
if (hMask == 0) SWT.error(SWT.ERROR_NO_HANDLES);
OS.SelectObject(hdcSrc, hMask);
OS.PatBlt(hdcSrc, 0, 0, i.width, i.height, OS.DSTINVERT);
@@ -1832,14 +1832,14 @@ static int /*long*/ [] init(Device device, Image image, ImageData i) {
OS.DeleteObject(hDib);
if (image == null) {
- result = new int /*long*/ []{hBitmap, hMask};
+ result = new long /*int*/ []{hBitmap, hMask};
} else {
/* Create the icon */
ICONINFO info = new ICONINFO();
info.fIcon = true;
info.hbmColor = hBitmap;
info.hbmMask = hMask;
- int /*long*/ hIcon = OS.CreateIconIndirect(info);
+ long /*int*/ hIcon = OS.CreateIconIndirect(info);
if (hIcon == 0) SWT.error(SWT.ERROR_NO_HANDLES);
OS.DeleteObject(hBitmap);
OS.DeleteObject(hMask);
@@ -1849,7 +1849,7 @@ static int /*long*/ [] init(Device device, Image image, ImageData i) {
}
} else {
if (image == null) {
- result = new int /*long*/ []{hDib};
+ result = new long /*int*/ []{hDib};
} else {
image.handle = hDib;
image.type = SWT.BITMAP;
@@ -1867,7 +1867,7 @@ static int /*long*/ [] init(Device device, Image image, ImageData i) {
return result;
}
-static int /*long*/ [] init(Device device, Image image, ImageData source, ImageData mask) {
+static long /*int*/ [] init(Device device, Image image, ImageData source, ImageData mask) {
/* Create a temporary image and locate the black pixel */
ImageData imageData;
int blackIndex = 0;
@@ -1960,7 +1960,7 @@ void init(ImageData i) {
*
* @noreference This method is not intended to be referenced by clients.
*/
-public int /*long*/ internal_new_GC (GCData data) {
+public long /*int*/ internal_new_GC (GCData data) {
if (handle == 0) SWT.error(SWT.ERROR_GRAPHIC_DISPOSED);
/*
* Create a new GC that can draw into the image.
@@ -1971,8 +1971,8 @@ public int /*long*/ internal_new_GC (GCData data) {
}
/* Create a compatible HDC for the device */
- int /*long*/ hDC = device.internal_new_GC(null);
- int /*long*/ imageDC = OS.CreateCompatibleDC(hDC);
+ long /*int*/ hDC = device.internal_new_GC(null);
+ long /*int*/ imageDC = OS.CreateCompatibleDC(hDC);
device.internal_dispose_GC(hDC, null);
if (imageDC == 0) SWT.error(SWT.ERROR_NO_HANDLES);
@@ -2006,7 +2006,7 @@ public int /*long*/ internal_new_GC (GCData data) {
*
* @noreference This method is not intended to be referenced by clients.
*/
-public void internal_dispose_GC (int /*long*/ hDC, GCData data) {
+public void internal_dispose_GC (long /*int*/ hDC, GCData data) {
OS.DeleteDC(hDC);
}
@@ -2070,12 +2070,12 @@ public void setBackground(Color color) {
transparentColor = -1;
/* Get the HDC for the device */
- int /*long*/ hDC = device.internal_new_GC(null);
+ long /*int*/ hDC = device.internal_new_GC(null);
/* Change the background color in the image */
BITMAP bm = new BITMAP();
OS.GetObject(handle, BITMAP.sizeof, bm);
- int /*long*/ hdcMem = OS.CreateCompatibleDC(hDC);
+ long /*int*/ hdcMem = OS.CreateCompatibleDC(hDC);
OS.SelectObject(hdcMem, handle);
int maxColors = 1 << bm.bmBitsPixel;
byte[] colors = new byte[maxColors * 4];
@@ -2121,7 +2121,7 @@ public String toString () {
*
* @noreference This method is not intended to be referenced by clients.
*/
-public static Image win32_new(Device device, int type, int /*long*/ handle) {
+public static Image win32_new(Device device, int type, long /*int*/ handle) {
Image image = new Image(device);
image.type = type;
image.handle = handle;