summaryrefslogtreecommitdiffstats
path: root/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/graphics
diff options
context:
space:
mode:
Diffstat (limited to 'bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/graphics')
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/graphics/Color.java4
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/graphics/Cursor.java14
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/graphics/Device.java44
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/graphics/Font.java4
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/graphics/FontData.java4
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/graphics/GC.java316
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/graphics/GCData.java22
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/graphics/Image.java174
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/graphics/Path.java12
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/graphics/Pattern.java16
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/graphics/Region.java12
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/graphics/TextLayout.java198
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/graphics/Transform.java2
13 files changed, 411 insertions, 411 deletions
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/graphics/Color.java b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/graphics/Color.java
index d1c6a09805..25bf06620b 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/graphics/Color.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/graphics/Color.java
@@ -121,7 +121,7 @@ void destroy() {
* If the reference count reaches 0, the slot may
* be reused when another color is allocated.
*/
- int /*long*/ hPal = device.hPalette;
+ long /*int*/ hPal = device.hPalette;
if (hPal != 0) {
int index = OS.GetNearestPaletteIndex(hPal, handle);
int[] colorRefCount = device.colorRefCount;
@@ -241,7 +241,7 @@ void init(int red, int green, int blue) {
handle = (red & 0xFF) | ((green & 0xFF) << 8) | ((blue & 0xFF) << 16);
/* If this is not a palette-based device, return */
- int /*long*/ hPal = device.hPalette;
+ long /*int*/ hPal = device.hPalette;
if (hPal == 0) return;
int[] colorRefCount = device.colorRefCount;
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/graphics/Cursor.java b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/graphics/Cursor.java
index 2f064a3e22..062a9f39d1 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/graphics/Cursor.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/graphics/Cursor.java
@@ -56,7 +56,7 @@ public final class Cursor extends Resource {
*
* @noreference This field is not intended to be referenced by clients.
*/
- public int /*long*/ handle;
+ public long /*int*/ handle;
boolean isIcon;
@@ -192,7 +192,7 @@ Cursor(Device device) {
*/
public Cursor(Device device, int style) {
super(device);
- int /*long*/ lpCursorName = 0;
+ long /*int*/ lpCursorName = 0;
switch (style) {
case SWT.CURSOR_HAND: lpCursorName = OS.IDC_HAND; break;
case SWT.CURSOR_ARROW: lpCursorName = OS.IDC_ARROW; break;
@@ -228,7 +228,7 @@ public Cursor(Device device, int style) {
int width = OS.GetSystemMetrics(OS.SM_CXCURSOR);
int height = OS.GetSystemMetrics(OS.SM_CYCURSOR);
if (width == 32 && height == 32) {
- int /*long*/ hInst = OS.GetModuleHandle(null);
+ long /*int*/ hInst = OS.GetModuleHandle(null);
if (OS.IsWinCE) SWT.error(SWT.ERROR_NOT_IMPLEMENTED);
handle = OS.CreateCursor(hInst, 5, 0, 32, 32, HAND_SOURCE, HAND_MASK);
@@ -296,7 +296,7 @@ public Cursor(Device device, ImageData source, ImageData mask, int hotspotX, int
byte[] maskData = ImageData.convertPad(mask.data, mask.width, mask.height, mask.depth, mask.scanlinePad, 2);
/* Create the cursor */
- int /*long*/ hInst = OS.GetModuleHandle(null);
+ long /*int*/ hInst = OS.GetModuleHandle(null);
if (OS.IsWinCE) SWT.error (SWT.ERROR_NOT_IMPLEMENTED);
handle = OS.CreateCursor(hInst, hotspotX, hotspotY, source.width, source.height, sourceData, maskData);
if (handle == 0) SWT.error(SWT.ERROR_NO_HANDLES);
@@ -338,8 +338,8 @@ public Cursor(Device device, ImageData source, int hotspotX, int hotspotY) {
hotspotY >= source.height || hotspotY < 0) {
SWT.error(SWT.ERROR_INVALID_ARGUMENT);
}
- int /*long*/ hBitmap = 0;
- int /*long*/ hMask = 0;
+ long /*int*/ hBitmap = 0;
+ long /*int*/ hMask = 0;
if (source.maskData == null && source.transparentPixel == -1 && (source.alpha != -1 || source.alphaData != null)) {
PaletteData palette = source.palette;
PaletteData newPalette = new PaletteData(0xFF00, 0xFF0000, 0xFF000000);
@@ -388,7 +388,7 @@ public Cursor(Device device, ImageData source, int hotspotX, int hotspotY) {
if (hMask == 0) SWT.error(SWT.ERROR_NO_HANDLES);
} else {
ImageData mask = source.getTransparencyMask();
- int /*long*/ [] result = Image.init(this.device, null, source, mask);
+ long /*int*/ [] result = Image.init(this.device, null, source, mask);
hBitmap = result[0];
hMask = result[1];
}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/graphics/Device.java b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/graphics/Device.java
index a885a9d07c..f8df00e229 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/graphics/Device.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/graphics/Device.java
@@ -46,7 +46,7 @@ public abstract class Device implements Drawable {
*
* @noreference This field is not intended to be referenced by clients.
*/
- public int /*long*/ hPalette = 0;
+ public long /*int*/ hPalette = 0;
int [] colorRefCount;
/* System Font */
@@ -59,11 +59,11 @@ public abstract class Device implements Drawable {
int[] pixels;
/* Scripts */
- int /*long*/ [] scripts;
+ long /*int*/ [] scripts;
/* Advanced Graphics */
- int /*long*/ [] gdipToken;
- int /*long*/ fontCollection;
+ long /*int*/ [] gdipToken;
+ long /*int*/ fontCollection;
String[] loadedFonts;
boolean disposed;
@@ -186,7 +186,7 @@ void checkGDIP() {
int oldErrorMode = 0;
if (!OS.IsWinCE) oldErrorMode = OS.SetErrorMode (OS.SEM_FAILCRITICALERRORS);
try {
- int /*long*/ [] token = new int /*long*/ [1];
+ long /*int*/ [] token = new long /*int*/ [1];
GdiplusStartupInput input = new GdiplusStartupInput ();
input.GdiplusVersion = 1;
if (Gdip.GdiplusStartup (token, input, 0) == 0) {
@@ -231,14 +231,14 @@ protected void create (DeviceData data) {
}
int computePixels(float height) {
- int /*long*/ hDC = internal_new_GC (null);
+ long /*int*/ hDC = internal_new_GC (null);
int pixels = -(int)(0.5f + (height * OS.GetDeviceCaps(hDC, OS.LOGPIXELSY) / 72f));
internal_dispose_GC (hDC, null);
return pixels;
}
-float computePoints(LOGFONT logFont, int /*long*/ hFont) {
- int /*long*/ hDC = internal_new_GC (null);
+float computePoints(LOGFONT logFont, long /*int*/ hFont) {
+ long /*int*/ hDC = internal_new_GC (null);
int logPixelsY = OS.GetDeviceCaps(hDC, OS.LOGPIXELSY);
int pixels = 0;
if (logFont.lfHeight > 0) {
@@ -249,7 +249,7 @@ float computePoints(LOGFONT logFont, int /*long*/ hFont) {
* height of a font in points does not include the internal leading,
* we must subtract the internal leading, which requires a TEXTMETRIC.
*/
- int /*long*/ oldFont = OS.SelectObject(hDC, hFont);
+ long /*int*/ oldFont = OS.SelectObject(hDC, hFont);
TEXTMETRIC lptm = OS.IsUnicode ? (TEXTMETRIC)new TEXTMETRICW() : new TEXTMETRICA();
OS.GetTextMetrics(hDC, lptm);
OS.SelectObject(hDC, oldFont);
@@ -318,7 +318,7 @@ void dispose_Object (Object object) {
}
}
-int /*long*/ EnumFontFamProc (int /*long*/ lpelfe, int /*long*/ lpntme, int /*long*/ FontType, int /*long*/ lParam) {
+long /*int*/ EnumFontFamProc (long /*int*/ lpelfe, long /*int*/ lpntme, long /*int*/ FontType, long /*int*/ lParam) {
boolean isScalable = ((int)/*64*/FontType & OS.RASTER_FONTTYPE) == 0;
boolean scalable = lParam == 1;
if (isScalable == scalable) {
@@ -365,7 +365,7 @@ int /*long*/ EnumFontFamProc (int /*long*/ lpelfe, int /*long*/ lpntme, int /*lo
*/
public Rectangle getBounds () {
checkDevice ();
- int /*long*/ hDC = internal_new_GC (null);
+ long /*int*/ hDC = internal_new_GC (null);
int width = OS.GetDeviceCaps (hDC, OS.HORZRES);
int height = OS.GetDeviceCaps (hDC, OS.VERTRES);
internal_dispose_GC (hDC, null);
@@ -444,7 +444,7 @@ public Rectangle getClientArea () {
*/
public int getDepth () {
checkDevice ();
- int /*long*/ hDC = internal_new_GC (null);
+ long /*int*/ hDC = internal_new_GC (null);
int bits = OS.GetDeviceCaps (hDC, OS.BITSPIXEL);
int planes = OS.GetDeviceCaps (hDC, OS.PLANES);
internal_dispose_GC (hDC, null);
@@ -464,7 +464,7 @@ public int getDepth () {
*/
public Point getDPI () {
checkDevice ();
- int /*long*/ hDC = internal_new_GC (null);
+ long /*int*/ hDC = internal_new_GC (null);
int dpiX = OS.GetDeviceCaps (hDC, OS.LOGPIXELSX);
int dpiY = OS.GetDeviceCaps (hDC, OS.LOGPIXELSY);
internal_dispose_GC (hDC, null);
@@ -489,7 +489,7 @@ public FontData [] getFontList (String faceName, boolean scalable) {
/* Create the callback */
Callback callback = new Callback (this, "EnumFontFamProc", 4); //$NON-NLS-1$
- int /*long*/ lpEnumFontFamProc = callback.getAddress ();
+ long /*int*/ lpEnumFontFamProc = callback.getAddress ();
if (lpEnumFontFamProc == 0) SWT.error (SWT.ERROR_NO_MORE_CALLBACKS);
/* Initialize the instance variables */
@@ -503,7 +503,7 @@ public FontData [] getFontList (String faceName, boolean scalable) {
/* Enumerate */
int offset = 0;
- int /*long*/ hDC = internal_new_GC (null);
+ long /*int*/ hDC = internal_new_GC (null);
if (faceName == null) {
/* The user did not specify a face name, so they want all versions of all available face names */
OS.EnumFontFamilies (hDC, null, lpEnumFontFamProc, scalable ? 1 : 0);
@@ -574,7 +574,7 @@ String getLastError () {
String getLastErrorText () {
int error = OS.GetLastError();
if (error == 0) return ""; //$NON-NLS-1$
- int /*long*/ [] buffer = new int /*long*/ [1];
+ long /*int*/ [] buffer = new long /*int*/ [1];
int dwFlags = OS.FORMAT_MESSAGE_ALLOCATE_BUFFER | OS.FORMAT_MESSAGE_FROM_SYSTEM | OS.FORMAT_MESSAGE_IGNORE_INSERTS;
int length = OS.FormatMessage(dwFlags, 0, error, OS.LANG_USER_DEFAULT, buffer, 0, 0);
if (length == 0) return " [GetLastError=0x" + Integer.toHexString(error) + "]"; //$NON-NLS-1$ //$NON-NLS-2$
@@ -648,7 +648,7 @@ public Color getSystemColor (int id) {
*/
public Font getSystemFont () {
checkDevice ();
- int /*long*/ hFont = OS.GetStockObject (OS.SYSTEM_FONT);
+ long /*int*/ hFont = OS.GetStockObject (OS.SYSTEM_FONT);
return Font.win32_new (this, hFont);
}
@@ -690,10 +690,10 @@ protected void init () {
/* Initialize scripts list */
if (!OS.IsWinCE) {
- int /*long*/ [] ppSp = new int /*long*/ [1];
+ long /*int*/ [] ppSp = new long /*int*/ [1];
int [] piNumScripts = new int [1];
OS.ScriptGetProperties (ppSp, piNumScripts);
- scripts = new int /*long*/ [piNumScripts [0]];
+ scripts = new long /*int*/ [piNumScripts [0]];
OS.MoveMemory (scripts, ppSp [0], scripts.length * OS.PTR_SIZEOF);
}
@@ -701,7 +701,7 @@ protected void init () {
* If we're not on a device which supports palettes,
* don't create one.
*/
- int /*long*/ hDC = internal_new_GC (null);
+ long /*int*/ hDC = internal_new_GC (null);
int rc = OS.GetDeviceCaps (hDC, OS.RASTERCAPS);
int bits = OS.GetDeviceCaps (hDC, OS.BITSPIXEL);
int planes = OS.GetDeviceCaps (hDC, OS.PLANES);
@@ -775,7 +775,7 @@ protected void init () {
*
* @noreference This method is not intended to be referenced by clients.
*/
-public abstract int /*long*/ internal_new_GC (GCData data);
+public abstract long /*int*/ internal_new_GC (GCData data);
/**
* Invokes platform specific functionality to dispose a GC handle.
@@ -792,7 +792,7 @@ public abstract int /*long*/ internal_new_GC (GCData data);
*
* @noreference This method is not intended to be referenced by clients.
*/
-public abstract void /*long*/ internal_dispose_GC (int /*long*/ hDC, GCData data);
+public abstract void /*long*/ internal_dispose_GC (long /*int*/ hDC, GCData data);
/**
* Returns <code>true</code> if the device has been disposed,
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/graphics/Font.java b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/graphics/Font.java
index b21356c1d0..816c8df78b 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/graphics/Font.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/graphics/Font.java
@@ -45,7 +45,7 @@ public final class Font extends Resource {
*
* @noreference This field is not intended to be referenced by clients.
*/
- public int /*long*/ handle;
+ public long /*int*/ handle;
/**
* Prevents uninitialized instances from being created outside the package.
@@ -253,7 +253,7 @@ public String toString () {
*
* @noreference This method is not intended to be referenced by clients.
*/
-public static Font win32_new(Device device, int /*long*/ handle) {
+public static Font win32_new(Device device, long /*int*/ handle) {
Font font = new Font(device);
font.handle = handle;
return font;
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/graphics/FontData.java b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/graphics/FontData.java
index 31c12847b7..a39509ee91 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/graphics/FontData.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/graphics/FontData.java
@@ -321,7 +321,7 @@ public boolean equals (Object object) {
getName().equals(fd.getName());
}
-int /*long*/ EnumLocalesProc(int /*long*/ lpLocaleString) {
+long /*int*/ EnumLocalesProc(long /*int*/ lpLocaleString) {
/* Get the locale ID */
int length = 8;
@@ -531,7 +531,7 @@ public void setLocale(String locale) {
data.lfCharSet = (byte)OS.DEFAULT_CHARSET;
} else {
Callback callback = new Callback (this, "EnumLocalesProc", 1); //$NON-NLS-1$
- int /*long*/ lpEnumLocalesProc = callback.getAddress ();
+ long /*int*/ lpEnumLocalesProc = callback.getAddress ();
if (lpEnumLocalesProc == 0) SWT.error(SWT.ERROR_NO_MORE_CALLBACKS);
OS.EnumSystemLocales(lpEnumLocalesProc, OS.LCID_SUPPORTED);
callback.dispose ();
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/graphics/GC.java b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/graphics/GC.java
index 2a80067e29..b91cf6c166 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/graphics/GC.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/graphics/GC.java
@@ -71,7 +71,7 @@ public final class GC extends Resource {
*
* @noreference This field is not intended to be referenced by clients.
*/
- public int /*long*/ handle;
+ public long /*int*/ handle;
Drawable drawable;
GCData data;
@@ -163,7 +163,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 /*long*/ hDC = drawable.internal_new_GC(data);
+ long /*int*/ hDC = drawable.internal_new_GC(data);
Device device = data.device;
if (device == null) device = Device.getDevice();
if (device == null) SWT.error(SWT.ERROR_NULL_ARGUMENT);
@@ -182,14 +182,14 @@ void checkGC(int mask) {
if ((state & mask) == mask) return;
state = (state ^ mask) & mask;
data.state |= mask;
- int /*long*/ gdipGraphics = data.gdipGraphics;
+ long /*int*/ gdipGraphics = data.gdipGraphics;
if (gdipGraphics != 0) {
- int /*long*/ pen = data.gdipPen;
+ long /*int*/ pen = data.gdipPen;
float width = data.lineWidth;
if ((state & FOREGROUND) != 0 || (pen == 0 && (state & (LINE_WIDTH | LINE_STYLE | LINE_MITERLIMIT | LINE_JOIN | LINE_CAP)) != 0)) {
if (data.gdipFgBrush != 0) Gdip.SolidBrush_delete(data.gdipFgBrush);
data.gdipFgBrush = 0;
- int /*long*/ brush;
+ long /*int*/ brush;
Pattern pattern = data.foregroundPattern;
if (pattern != null) {
brush = pattern.handle;
@@ -205,7 +205,7 @@ void checkGC(int mask) {
} else {
int foreground = data.foreground;
int rgb = ((foreground >> 16) & 0xFF) | (foreground & 0xFF00) | ((foreground & 0xFF) << 16);
- int /*long*/ color = Gdip.Color_new(data.alpha << 24 | rgb);
+ long /*int*/ color = Gdip.Color_new(data.alpha << 24 | rgb);
if (color == 0) SWT.error(SWT.ERROR_NO_HANDLES);
brush = Gdip.SolidBrush_new(color);
if (brush == 0) SWT.error(SWT.ERROR_NO_HANDLES);
@@ -285,7 +285,7 @@ void checkGC(int mask) {
if ((data.style & SWT.MIRRORED) != 0) {
switch (Gdip.Brush_GetType(data.gdipBrush)) {
case Gdip.BrushTypeTextureFill:
- int /*long*/ brush = Gdip.Brush_Clone(data.gdipBrush);
+ long /*int*/ brush = Gdip.Brush_Clone(data.gdipBrush);
if (brush == 0) SWT.error(SWT.ERROR_NO_HANDLES);
Gdip.TextureBrush_ScaleTransform(brush, -1, 1, Gdip.MatrixOrderPrepend);
data.gdipBrush = data.gdipBgBrush = brush;
@@ -294,9 +294,9 @@ void checkGC(int mask) {
} else {
int background = data.background;
int rgb = ((background >> 16) & 0xFF) | (background & 0xFF00) | ((background & 0xFF) << 16);
- int /*long*/ color = Gdip.Color_new(data.alpha << 24 | rgb);
+ long /*int*/ color = Gdip.Color_new(data.alpha << 24 | rgb);
if (color == 0) SWT.error(SWT.ERROR_NO_HANDLES);
- int /*long*/ brush = Gdip.SolidBrush_new(color);
+ long /*int*/ brush = Gdip.SolidBrush_new(color);
if (brush == 0) SWT.error(SWT.ERROR_NO_HANDLES);
Gdip.Color_delete(color);
data.gdipBrush = data.gdipBgBrush = brush;
@@ -305,8 +305,8 @@ void checkGC(int mask) {
if ((state & FONT) != 0) {
Font font = data.font;
OS.SelectObject(handle, font.handle);
- int /*long*/[] hFont = new int /*long*/[1];
- int /*long*/ gdipFont = createGdipFont(handle, font.handle, gdipGraphics, device.fontCollection, null, hFont);
+ long /*int*/[] hFont = new long /*int*/[1];
+ long /*int*/ gdipFont = createGdipFont(handle, font.handle, gdipGraphics, device.fontCollection, null, hFont);
if (hFont[0] != 0) OS.SelectObject(handle, hFont[0]);
if (data.hGDIFont != 0) OS.DeleteObject(data.hGDIFont);
data.hGDIFont = hFont[0];
@@ -315,7 +315,7 @@ void checkGC(int mask) {
}
if ((state & DRAW_OFFSET) != 0) {
data.gdipXOffset = data.gdipYOffset = 0;
- int /*long*/ matrix = Gdip.Matrix_new(1, 0, 0, 1, 0, 0);
+ long /*int*/ matrix = Gdip.Matrix_new(1, 0, 0, 1, 0, 0);
PointF point = new PointF();
point.X = point.Y = 1;
Gdip.Graphics_GetTransform(gdipGraphics, matrix);
@@ -379,7 +379,7 @@ void checkGC(int mask) {
* PS_SOLID for pens wider than 1 pixel created with CreatePen(). The fix
* is to use ExtCreatePen() instead.
*/
- int /*long*/ newPen;
+ long /*int*/ newPen;
if (OS.IsWinCE || (width == 0 && lineStyle != OS.PS_USERSTYLE) || style == 0) {
newPen = OS.CreatePen(style & OS.PS_STYLE_MASK, width, color);
} else {
@@ -402,7 +402,7 @@ void checkGC(int mask) {
data.state &= ~PEN;
}
if ((state & BACKGROUND) != 0) {
- int /*long*/ newBrush = OS.CreateSolidBrush(data.background);
+ long /*int*/ newBrush = OS.CreateSolidBrush(data.background);
OS.SelectObject(handle, newBrush);
data.state |= BRUSH;
data.state &= ~NULL_BRUSH;
@@ -450,8 +450,8 @@ public void copyArea(Image image, int x, int y) {
/* Copy the bitmap area */
Rectangle rect = image.getBounds();
- int /*long*/ memHdc = OS.CreateCompatibleDC(handle);
- int /*long*/ hOldBitmap = OS.SelectObject(memHdc, image.handle);
+ long /*int*/ memHdc = OS.CreateCompatibleDC(handle);
+ long /*int*/ hOldBitmap = OS.SelectObject(memHdc, image.handle);
OS.BitBlt(memHdc, 0, 0, rect.width, rect.height, handle, x, y, OS.SRCCOPY);
OS.SelectObject(memHdc, hOldBitmap);
OS.DeleteDC(memHdc);
@@ -501,12 +501,12 @@ public void copyArea(int srcX, int srcY, int width, int height, int destX, int d
* Feature in WinCE. The function WindowFromDC is not part of the
* WinCE SDK. The fix is to remember the HWND.
*/
- int /*long*/ hwnd = data.hwnd;
+ long /*int*/ hwnd = data.hwnd;
if (hwnd == 0) {
OS.BitBlt(handle, destX, destY, width, height, handle, srcX, srcY, OS.SRCCOPY);
} else {
RECT lprcClip = null;
- int /*long*/ hrgn = OS.CreateRectRgn(0, 0, 0, 0);
+ long /*int*/ hrgn = OS.CreateRectRgn(0, 0, 0, 0);
if (OS.GetClipRgn(handle, hrgn) == 1) {
lprcClip = new RECT();
OS.GetRgnBox(hrgn, lprcClip);
@@ -547,10 +547,10 @@ public void copyArea(int srcX, int srcY, int width, int height, int destX, int d
}
}
}
-static int /*long*/ createGdipFont(int /*long*/ hDC, int /*long*/ hFont, int /*long*/ graphics, int /*long*/ fontCollection, int /*long*/ [] outFamily, int /*long*/[] outFont) {
- int /*long*/ font = Gdip.Font_new(hDC, hFont);
+static long /*int*/ createGdipFont(long /*int*/ hDC, long /*int*/ hFont, long /*int*/ graphics, long /*int*/ fontCollection, long /*int*/ [] outFamily, long /*int*/[] outFont) {
+ long /*int*/ font = Gdip.Font_new(hDC, hFont);
if (font == 0) SWT.error(SWT.ERROR_NO_HANDLES);
- int /*long*/ family = 0;
+ long /*int*/ family = 0;
if (!Gdip.Font_IsAvailable(font)) {
Gdip.Font_delete(font);
LOGFONT logFont = OS.IsUnicode ? (LOGFONT)new LOGFONTW() : new LOGFONTA();
@@ -595,8 +595,8 @@ static int /*long*/ createGdipFont(int /*long*/ hDC, int /*long*/ hFont, int /*l
font = Gdip.Font_new(buffer, size, style, Gdip.UnitPixel, 0);
}
if (outFont != null && font != 0) {
- int /*long*/ hHeap = OS.GetProcessHeap();
- int /*long*/ pLogFont = OS.HeapAlloc(hHeap, OS.HEAP_ZERO_MEMORY, LOGFONTW.sizeof);
+ long /*int*/ hHeap = OS.GetProcessHeap();
+ long /*int*/ pLogFont = OS.HeapAlloc(hHeap, OS.HEAP_ZERO_MEMORY, LOGFONTW.sizeof);
Gdip.Font_GetLogFontW(font, graphics, pLogFont);
outFont[0] = OS.CreateFontIndirectW(pLogFont);
OS.HeapFree(hHeap, 0, pLogFont);
@@ -615,7 +615,7 @@ static int /*long*/ createGdipFont(int /*long*/ hDC, int /*long*/ hFont, int /*l
return font;
}
-static void destroyGdipBrush(int /*long*/ brush) {
+static void destroyGdipBrush(long /*int*/ brush) {
int type = Gdip.Brush_GetType(brush);
switch (type) {
case Gdip.BrushTypeSolidColor:
@@ -666,7 +666,7 @@ void destroy() {
* This will ensure that we have not left a bitmap
* selected in it when we delete the HDC.
*/
- int /*long*/ hNullBitmap = data.hNullBitmap;
+ long /*int*/ hNullBitmap = data.hNullBitmap;
if (hNullBitmap != 0) {
OS.SelectObject(handle, hNullBitmap);
data.hNullBitmap = 0;
@@ -737,15 +737,15 @@ public void drawArc (int x, int y, int width, int height, int startAngle, int ar
height = -height;
}
if (width == 0 || height == 0 || arcAngle == 0) return;
- int /*long*/ gdipGraphics = data.gdipGraphics;
+ long /*int*/ gdipGraphics = data.gdipGraphics;
if (gdipGraphics != 0) {
Gdip.Graphics_TranslateTransform(gdipGraphics, data.gdipXOffset, data.gdipYOffset, Gdip.MatrixOrderPrepend);
if (width == height) {
Gdip.Graphics_DrawArc(gdipGraphics, data.gdipPen, x, y, width, height, -startAngle, -arcAngle);
} else {
- int /*long*/ path = Gdip.GraphicsPath_new(Gdip.FillModeAlternate);
+ long /*int*/ path = Gdip.GraphicsPath_new(Gdip.FillModeAlternate);
if (path == 0) SWT.error(SWT.ERROR_NO_HANDLES);
- int /*long*/ matrix = Gdip.Matrix_new(width, 0, 0, height, x, y);
+ long /*int*/ matrix = Gdip.Matrix_new(width, 0, 0, height, x, y);
if (matrix == 0) SWT.error(SWT.ERROR_NO_HANDLES);
Gdip.GraphicsPath_AddArc(path, 0, 0, 1, 1, -startAngle, -arcAngle);
Gdip.GraphicsPath_Transform(path, matrix);
@@ -827,13 +827,13 @@ public void drawFocus (int x, int y, int width, int height) {
if (handle == 0) SWT.error(SWT.ERROR_GRAPHIC_DISPOSED);
if ((data.uiState & OS.UISF_HIDEFOCUS) != 0) return;
data.focusDrawn = true;
- int /*long*/ hdc = handle;
+ long /*int*/ hdc = handle;
int state = 0;
- int /*long*/ gdipGraphics = data.gdipGraphics;
+ long /*int*/ gdipGraphics = data.gdipGraphics;
if (gdipGraphics != 0) {
- int /*long*/ clipRgn = 0;
+ long /*int*/ clipRgn = 0;
Gdip.Graphics_SetPixelOffsetMode(gdipGraphics, Gdip.PixelOffsetModeNone);
- int /*long*/ rgn = Gdip.Region_new();
+ long /*int*/ rgn = Gdip.Region_new();
if (rgn == 0) SWT.error(SWT.ERROR_NO_HANDLES);
Gdip.Graphics_GetClip(gdipGraphics, rgn);
if (!Gdip.Region_IsInfinite(rgn, gdipGraphics)) {
@@ -842,7 +842,7 @@ public void drawFocus (int x, int y, int width, int height) {
Gdip.Region_delete(rgn);
Gdip.Graphics_SetPixelOffsetMode(gdipGraphics, Gdip.PixelOffsetModeHalf);
float[] lpXform = null;
- int /*long*/ matrix = Gdip.Matrix_new(1, 0, 0, 1, 0, 0);
+ long /*int*/ matrix = Gdip.Matrix_new(1, 0, 0, 1, 0, 0);
if (matrix == 0) SWT.error(SWT.ERROR_NO_HANDLES);
Gdip.Graphics_GetTransform(gdipGraphics, matrix);
if (!Gdip.Matrix_IsIdentity(matrix)) {
@@ -946,8 +946,8 @@ public void drawImage(Image image, int srcX, int srcY, int srcWidth, int srcHeig
void drawImage(Image srcImage, int srcX, int srcY, int srcWidth, int srcHeight, int destX, int destY, int destWidth, int destHeight, boolean simple) {
if (data.gdipGraphics != 0) {
//TODO - cache bitmap
- int /*long*/ [] gdipImage = srcImage.createGdipImage();
- int /*long*/ img = gdipImage[0];
+ long /*int*/ [] gdipImage = srcImage.createGdipImage();
+ long /*int*/ img = gdipImage[0];
int imgWidth = Gdip.Image_GetWidth(img);
int imgHeight = Gdip.Image_GetHeight(img);
if (simple) {
@@ -970,7 +970,7 @@ void drawImage(Image srcImage, int srcX, int srcY, int srcWidth, int srcHeight,
* Note that if the wrap mode is not WrapModeTileFlipXY, the scaled image
* is translucent around the borders.
*/
- int /*long*/ attrib = Gdip.ImageAttributes_new();
+ long /*int*/ attrib = Gdip.ImageAttributes_new();
Gdip.ImageAttributes_SetWrapMode(attrib, Gdip.WrapModeTileFlipXY);
if (data.alpha != 0xFF) {
float[] matrix = new float[]{
@@ -995,7 +995,7 @@ void drawImage(Image srcImage, int srcX, int srcY, int srcWidth, int srcHeight,
Gdip.ImageAttributes_delete(attrib);
Gdip.Bitmap_delete(img);
if (gdipImage[1] != 0) {
- int /*long*/ hHeap = OS.GetProcessHeap ();
+ long /*int*/ hHeap = OS.GetProcessHeap ();
OS.HeapFree(hHeap, 0, gdipImage[1]);
}
return;
@@ -1053,7 +1053,7 @@ void drawIcon(Image srcImage, int srcX, int srcY, int srcWidth, int srcHeight, i
}
/* Get the icon width and height */
- int /*long*/ hBitmap = srcIconInfo.hbmColor;
+ long /*int*/ hBitmap = srcIconInfo.hbmColor;
if (hBitmap == 0) hBitmap = srcIconInfo.hbmMask;
BITMAP bm = new BITMAP();
OS.GetObject(hBitmap, BITMAP.sizeof, bm);
@@ -1082,20 +1082,20 @@ void drawIcon(Image srcImage, int srcX, int srcY, int srcWidth, int srcHeight, i
/* Create the icon info and HDC's */
ICONINFO newIconInfo = new ICONINFO();
newIconInfo.fIcon = true;
- int /*long*/ srcHdc = OS.CreateCompatibleDC(handle);
- int /*long*/ dstHdc = OS.CreateCompatibleDC(handle);
+ long /*int*/ srcHdc = OS.CreateCompatibleDC(handle);
+ long /*int*/ dstHdc = OS.CreateCompatibleDC(handle);
/* Blt the color bitmap */
int srcColorY = srcY;
- int /*long*/ srcColor = srcIconInfo.hbmColor;
+ long /*int*/ srcColor = srcIconInfo.hbmColor;
if (srcColor == 0) {
srcColor = srcIconInfo.hbmMask;
srcColorY += iconHeight;
}
- int /*long*/ oldSrcBitmap = OS.SelectObject(srcHdc, srcColor);
+ long /*int*/ oldSrcBitmap = OS.SelectObject(srcHdc, srcColor);
newIconInfo.hbmColor = OS.CreateCompatibleBitmap(srcHdc, destWidth, destHeight);
if (newIconInfo.hbmColor == 0) SWT.error(SWT.ERROR_NO_HANDLES);
- int /*long*/ oldDestBitmap = OS.SelectObject(dstHdc, newIconInfo.hbmColor);
+ long /*int*/ oldDestBitmap = OS.SelectObject(dstHdc, newIconInfo.hbmColor);
boolean stretch = !simple && (srcWidth != destWidth || srcHeight != destHeight);
if (stretch) {
if (!OS.IsWinCE) OS.SetStretchBltMode(dstHdc, OS.COLORONCOLOR);
@@ -1124,7 +1124,7 @@ void drawIcon(Image srcImage, int srcX, int srcY, int srcWidth, int srcHeight, i
} else {
OS.SelectObject(srcHdc, oldSrcBitmap);
OS.SelectObject(dstHdc, oldDestBitmap);
- int /*long*/ hIcon = OS.CreateIconIndirect(newIconInfo);
+ long /*int*/ hIcon = OS.CreateIconIndirect(newIconInfo);
if (hIcon == 0) SWT.error(SWT.ERROR_NO_HANDLES);
if (offsetX != 0 || offsetY != 0) OS.SetWindowOrgEx(handle, 0, 0, null);
OS.DrawIconEx(handle, destX - offsetX, destY - offsetY, hIcon, destWidth, destHeight, 0, 0, flags);
@@ -1184,7 +1184,7 @@ void drawBitmap(Image srcImage, int srcX, int srcY, int srcWidth, int srcHeight,
drawBitmap(srcImage, srcX, srcY, srcWidth, srcHeight, destX, destY, destWidth, destHeight, simple, bm, imgWidth, imgHeight);
}
if (mustRestore) {
- int /*long*/ hOldBitmap = OS.SelectObject(memGC.handle, srcImage.handle);
+ long /*int*/ hOldBitmap = OS.SelectObject(memGC.handle, srcImage.handle);
memGC.data.hNullBitmap = hOldBitmap;
}
}
@@ -1212,16 +1212,16 @@ void drawBitmapAlpha(Image srcImage, int srcX, int srcY, int srcWidth, int srcHe
if (alphaBlendSupport) {
BLENDFUNCTION blend = new BLENDFUNCTION();
blend.BlendOp = OS.AC_SRC_OVER;
- int /*long*/ srcHdc = OS.CreateCompatibleDC(handle);
- int /*long*/ oldSrcBitmap = OS.SelectObject(srcHdc, srcImage.handle);
+ long /*int*/ srcHdc = OS.CreateCompatibleDC(handle);
+ long /*int*/ oldSrcBitmap = OS.SelectObject(srcHdc, srcImage.handle);
if (srcImage.alpha != -1) {
blend.SourceConstantAlpha = (byte)srcImage.alpha;
OS.AlphaBlend(handle, destX, destY, destWidth, destHeight, srcHdc, srcX, srcY, srcWidth, srcHeight, blend);
} else {
- int /*long*/ memDib = Image.createDIB(srcWidth, srcHeight, 32);
+ long /*int*/ memDib = Image.createDIB(srcWidth, srcHeight, 32);
if (memDib == 0) SWT.error(SWT.ERROR_NO_HANDLES);
- int /*long*/ memHdc = OS.CreateCompatibleDC(handle);
- int /*long*/ oldMemBitmap = OS.SelectObject(memHdc, memDib);
+ long /*int*/ memHdc = OS.CreateCompatibleDC(handle);
+ long /*int*/ oldMemBitmap = OS.SelectObject(memHdc, memDib);
BITMAP dibBM = new BITMAP();
OS.GetObject(memDib, BITMAP.sizeof, dibBM);
OS.BitBlt(memHdc, 0, 0, srcWidth, srcHeight, srcHdc, srcX, srcY, OS.SRCCOPY);
@@ -1283,12 +1283,12 @@ void drawBitmapAlpha(Image srcImage, int srcX, int srcY, int srcWidth, int srcHe
srcHeight = Math.max(1, sy2 - sy1);
/* Create resources */
- int /*long*/ srcHdc = OS.CreateCompatibleDC(handle);
- int /*long*/ oldSrcBitmap = OS.SelectObject(srcHdc, srcImage.handle);
- int /*long*/ memHdc = OS.CreateCompatibleDC(handle);
- int /*long*/ memDib = Image.createDIB(Math.max(srcWidth, destWidth), Math.max(srcHeight, destHeight), 32);
+ long /*int*/ srcHdc = OS.CreateCompatibleDC(handle);
+ long /*int*/ oldSrcBitmap = OS.SelectObject(srcHdc, srcImage.handle);
+ long /*int*/ memHdc = OS.CreateCompatibleDC(handle);
+ long /*int*/ memDib = Image.createDIB(Math.max(srcWidth, destWidth), Math.max(srcHeight, destHeight), 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);
@@ -1334,10 +1334,10 @@ void drawBitmapAlpha(Image srcImage, int srcX, int srcY, int srcWidth, int srcHe
* Note that this also fails when drawing to a printer.
*/
if ((OS.IsWinCE && (destWidth > srcWidth || destHeight > srcHeight)) || (!OS.IsWinNT && !OS.IsWinCE) || isPrinter) {
- int /*long*/ tempHdc = OS.CreateCompatibleDC(handle);
- int /*long*/ tempDib = Image.createDIB(destWidth, destHeight, 32);
+ long /*int*/ tempHdc = OS.CreateCompatibleDC(handle);
+ long /*int*/ tempDib = Image.createDIB(destWidth, destHeight, 32);
if (tempDib == 0) SWT.error(SWT.ERROR_NO_HANDLES);
- int /*long*/ oldTempBitmap = OS.SelectObject(tempHdc, tempDib);
+ long /*int*/ oldTempBitmap = OS.SelectObject(tempHdc, tempDib);
if (!simple && (srcWidth != destWidth || srcHeight != destHeight)) {
if (!OS.IsWinCE) OS.SetStretchBltMode(memHdc, OS.COLORONCOLOR);
OS.StretchBlt(tempHdc, 0, 0, destWidth, destHeight, memHdc, 0, 0, srcWidth, srcHeight, OS.SRCCOPY);
@@ -1384,13 +1384,13 @@ void drawBitmapAlpha(Image srcImage, int srcX, int srcY, int srcWidth, int srcHe
OS.DeleteDC(srcHdc);
}
-void drawBitmapTransparentByClipping(int /*long*/ srcHdc, int /*long*/ maskHdc, int srcX, int srcY, int srcWidth, int srcHeight, int destX, int destY, int destWidth, int destHeight, boolean simple, int imgWidth, int imgHeight) {
+void drawBitmapTransparentByClipping(long /*int*/ srcHdc, long /*int*/ maskHdc, int srcX, int srcY, int srcWidth, int srcHeight, int destX, int destY, int destWidth, int destHeight, boolean simple, int imgWidth, int imgHeight) {
/* Create a clipping region from the mask */
- int /*long*/ rgn = OS.CreateRectRgn(0, 0, 0, 0);
+ long /*int*/ rgn = OS.CreateRectRgn(0, 0, 0, 0);
for (int y=0; y<imgHeight; y++) {
for (int x=0; x<imgWidth; x++) {
if (OS.GetPixel(maskHdc, x, y) == 0) {
- int /*long*/ tempRgn = OS.CreateRectRgn(x, y, x+1, y+1);
+ long /*int*/ tempRgn = OS.CreateRectRgn(x, y, x+1, y+1);
OS.CombineRgn(rgn, rgn, tempRgn, OS.RGN_OR);
OS.DeleteObject(tempRgn);
}
@@ -1402,12 +1402,12 @@ void drawBitmapTransparentByClipping(int /*long*/ srcHdc, int /*long*/ maskHdc,
int[] lpRgnData = new int[nBytes / 4];
OS.GetRegionData (rgn, nBytes, lpRgnData);
float[] lpXform = new float[] {(float)destWidth/srcWidth, 0, 0, (float)destHeight/srcHeight, 0, 0};
- int /*long*/ tmpRgn = OS.ExtCreateRegion(lpXform, nBytes, lpRgnData);
+ long /*int*/ tmpRgn = OS.ExtCreateRegion(lpXform, nBytes, lpRgnData);
OS.DeleteObject(rgn);
rgn = tmpRgn;
}
OS.OffsetRgn(rgn, destX, destY);
- int /*long*/ clip = OS.CreateRectRgn(0, 0, 0, 0);
+ long /*int*/ clip = OS.CreateRectRgn(0, 0, 0, 0);
int result = OS.GetClipRgn(handle, clip);
if (result == 1) OS.CombineRgn(rgn, rgn, clip, OS.RGN_AND);
OS.SelectClipRgn(handle, rgn);
@@ -1432,17 +1432,17 @@ void drawBitmapTransparentByClipping(int /*long*/ srcHdc, int /*long*/ maskHdc,
OS.DeleteObject(rgn);
}
-void drawBitmapMask(Image srcImage, int /*long*/ srcColor, int /*long*/ srcMask, int srcX, int srcY, int srcWidth, int srcHeight, int destX, int destY, int destWidth, int destHeight, boolean simple, int imgWidth, int imgHeight, boolean offscreen) {
+void drawBitmapMask(Image srcImage, long /*int*/ srcColor, long /*int*/ srcMask, int srcX, int srcY, int srcWidth, int srcHeight, int destX, int destY, int destWidth, int destHeight, boolean simple, int imgWidth, int imgHeight, boolean offscreen) {
int srcColorY = srcY;
if (srcColor == 0) {
srcColor = srcMask;
srcColorY += imgHeight;
}
- int /*long*/ srcHdc = OS.CreateCompatibleDC(handle);
- int /*long*/ oldSrcBitmap = OS.SelectObject(srcHdc, srcColor);
- int /*long*/ destHdc = handle;
+ long /*int*/ srcHdc = OS.CreateCompatibleDC(handle);
+ long /*int*/ oldSrcBitmap = OS.SelectObject(srcHdc, srcColor);
+ long /*int*/ destHdc = handle;
int x = destX, y = destY;
- int /*long*/ tempHdc = 0, tempBitmap = 0, oldTempBitmap = 0;
+ long /*int*/ tempHdc = 0, tempBitmap = 0, oldTempBitmap = 0;
int oldBkColor = 0, oldTextColor = 0;
if (offscreen) {
tempHdc = OS.CreateCompatibleDC(handle);
@@ -1489,9 +1489,9 @@ void drawBitmapTransparent(Image srcImage, int srcX, int srcY, int srcWidth, int
/* Find the RGB values for the transparent pixel. */
boolean isDib = bm.bmBits != 0;
- int /*long*/ hBitmap = srcImage.handle;
- int /*long*/ srcHdc = OS.CreateCompatibleDC(handle);
- int /*long*/ oldSrcBitmap = OS.SelectObject(srcHdc, hBitmap);
+ long /*int*/ hBitmap = srcImage.handle;
+ long /*int*/ srcHdc = OS.CreateCompatibleDC(handle);
+ long /*int*/ oldSrcBitmap = OS.SelectObject(srcHdc, hBitmap);
byte[] originalColors = null;
int transparentColor = srcImage.transparentColor;
if (transparentColor == -1) {
@@ -1595,9 +1595,9 @@ void drawBitmapTransparent(Image srcImage, int srcX, int srcY, int srcWidth, int
OS.SetStretchBltMode(handle, mode);
} else {
/* Create the mask for the source image */
- int /*long*/ maskHdc = OS.CreateCompatibleDC(handle);
- int /*long*/ maskBitmap = OS.CreateBitmap(imgWidth, imgHeight, 1, 1, null);
- int /*long*/ oldMaskBitmap = OS.SelectObject(maskHdc, maskBitmap);
+ long /*int*/ maskHdc = OS.CreateCompatibleDC(handle);
+ long /*int*/ maskBitmap = OS.CreateBitmap(imgWidth, imgHeight, 1, 1, null);
+ long /*int*/ oldMaskBitmap = OS.SelectObject(maskHdc, maskBitmap);
OS.SetBkColor(srcHdc, transparentColor);
OS.BitBlt(maskHdc, 0, 0, imgWidth, imgHeight, srcHdc, 0, 0, OS.SRCCOPY);
if (originalColors != null) OS.SetDIBColorTable(srcHdc, 0, 1 << bm.bmBitsPixel, originalColors);
@@ -1607,9 +1607,9 @@ void drawBitmapTransparent(Image srcImage, int srcX, int srcY, int srcWidth, int
drawBitmapTransparentByClipping(srcHdc, maskHdc, srcX, srcY, srcWidth, srcHeight, destX, destY, destWidth, destHeight, simple, imgWidth, imgHeight);
} else {
/* Draw the source bitmap transparently using invert/and mask/invert */
- int /*long*/ tempHdc = OS.CreateCompatibleDC(handle);
- int /*long*/ tempBitmap = OS.CreateCompatibleBitmap(handle, destWidth, destHeight);
- int /*long*/ oldTempBitmap = OS.SelectObject(tempHdc, tempBitmap);
+ long /*int*/ tempHdc = OS.CreateCompatibleDC(handle);
+ long /*int*/ tempBitmap = OS.CreateCompatibleBitmap(handle, destWidth, destHeight);
+ long /*int*/ oldTempBitmap = OS.SelectObject(tempHdc, tempBitmap);
OS.BitBlt(tempHdc, 0, 0, destWidth, destHeight, handle, destX, destY, OS.SRCCOPY);
if (!simple && (srcWidth != destWidth || srcHeight != destHeight)) {
if (!OS.IsWinCE) OS.SetStretchBltMode(tempHdc, OS.COLORONCOLOR);
@@ -1636,8 +1636,8 @@ void drawBitmapTransparent(Image srcImage, int srcX, int srcY, int srcWidth, int
}
void drawBitmap(Image srcImage, int srcX, int srcY, int srcWidth, int srcHeight, int destX, int destY, int destWidth, int destHeight, boolean simple, BITMAP bm, int imgWidth, int imgHeight) {
- int /*long*/ srcHdc = OS.CreateCompatibleDC(handle);
- int /*long*/ oldSrcBitmap = OS.SelectObject(srcHdc, srcImage.handle);
+ long /*int*/ srcHdc = OS.CreateCompatibleDC(handle);
+ long /*int*/ oldSrcBitmap = OS.SelectObject(srcHdc, srcImage.handle);
int rop2 = 0;
if (!OS.IsWinCE) {
rop2 = OS.GetROP2(handle);
@@ -1674,7 +1674,7 @@ void drawBitmap(Image srcImage, int srcX, int srcY, int srcWidth, int srcHeight,
public void drawLine (int x1, int y1, int x2, int y2) {
if (handle == 0) SWT.error(SWT.ERROR_GRAPHIC_DISPOSED);
checkGC(DRAW);
- int /*long*/ gdipGraphics = data.gdipGraphics;
+ long /*int*/ gdipGraphics = data.gdipGraphics;
if (gdipGraphics != 0) {
Gdip.Graphics_TranslateTransform(gdipGraphics, data.gdipXOffset, data.gdipYOffset, Gdip.MatrixOrderPrepend);
Gdip.Graphics_DrawLine(gdipGraphics, data.gdipPen, x1, y1, x2, y2);
@@ -1723,7 +1723,7 @@ public void drawLine (int x1, int y1, int x2, int y2) {
public void drawOval (int x, int y, int width, int height) {
if (handle == 0) SWT.error(SWT.ERROR_GRAPHIC_DISPOSED);
checkGC(DRAW);
- int /*long*/ gdipGraphics = data.gdipGraphics;
+ long /*int*/ gdipGraphics = data.gdipGraphics;
if (gdipGraphics != 0) {
Gdip.Graphics_TranslateTransform(gdipGraphics, data.gdipXOffset, data.gdipYOffset, Gdip.MatrixOrderPrepend);
Gdip.Graphics_DrawEllipse(gdipGraphics, data.gdipPen, x, y, width, height);
@@ -1765,7 +1765,7 @@ public void drawPath (Path path) {
if (path.handle == 0) SWT.error(SWT.ERROR_INVALID_ARGUMENT);
initGdip();
checkGC(DRAW);
- int /*long*/ gdipGraphics = data.gdipGraphics;
+ long /*int*/ gdipGraphics = data.gdipGraphics;
Gdip.Graphics_TranslateTransform(gdipGraphics, data.gdipXOffset, data.gdipYOffset, Gdip.MatrixOrderPrepend);
Gdip.Graphics_DrawPath(gdipGraphics, data.gdipPen, path.handle);
Gdip.Graphics_TranslateTransform(gdipGraphics, -data.gdipXOffset, -data.gdipYOffset, Gdip.MatrixOrderPrepend);
@@ -1819,7 +1819,7 @@ public void drawPolygon(int[] pointArray) {
if (handle == 0) SWT.error(SWT.ERROR_GRAPHIC_DISPOSED);
if (pointArray == null) SWT.error(SWT.ERROR_NULL_ARGUMENT);
checkGC(DRAW);
- int /*long*/ gdipGraphics = data.gdipGraphics;
+ long /*int*/ gdipGraphics = data.gdipGraphics;
if (gdipGraphics != 0) {
Gdip.Graphics_TranslateTransform(gdipGraphics, data.gdipXOffset, data.gdipYOffset, Gdip.MatrixOrderPrepend);
Gdip.Graphics_DrawPolygon(gdipGraphics, data.gdipPen, pointArray, pointArray.length / 2);
@@ -1864,7 +1864,7 @@ public void drawPolyline(int[] pointArray) {
if (handle == 0) SWT.error(SWT.ERROR_GRAPHIC_DISPOSED);
if (pointArray == null) SWT.error(SWT.ERROR_NULL_ARGUMENT);
checkGC(DRAW);
- int /*long*/ gdipGraphics = data.gdipGraphics;
+ long /*int*/ gdipGraphics = data.gdipGraphics;
if (gdipGraphics != 0) {
Gdip.Graphics_TranslateTransform(gdipGraphics, data.gdipXOffset, data.gdipYOffset, Gdip.MatrixOrderPrepend);
Gdip.Graphics_DrawLines(gdipGraphics, data.gdipPen, pointArray, pointArray.length / 2);
@@ -1912,7 +1912,7 @@ public void drawPolyline(int[] pointArray) {
public void drawRectangle (int x, int y, int width, int height) {
if (handle == 0) SWT.error(SWT.ERROR_GRAPHIC_DISPOSED);
checkGC(DRAW);
- int /*long*/ gdipGraphics = data.gdipGraphics;
+ long /*int*/ gdipGraphics = data.gdipGraphics;
if (gdipGraphics != 0) {
if (width < 0) {
x = x + width;
@@ -2038,7 +2038,7 @@ public void drawRoundRectangle (int x, int y, int width, int height, int arcWidt
}
}
-void drawRoundRectangleGdip (int /*long*/ gdipGraphics, int /*long*/ pen, int x, int y, int width, int height, int arcWidth, int arcHeight) {
+void drawRoundRectangleGdip (long /*int*/ gdipGraphics, long /*int*/ pen, int x, int y, int width, int height, int arcWidth, int arcHeight) {
int nx = x;
int ny = y;
int nw = width;
@@ -2063,7 +2063,7 @@ void drawRoundRectangleGdip (int /*long*/ gdipGraphics, int /*long*/ pen, int x,
if (naw == 0 || nah == 0) {
Gdip.Graphics_DrawRectangle(gdipGraphics, data.gdipPen, x, y, width, height);
} else {
- int /*long*/ path = Gdip.GraphicsPath_new(Gdip.FillModeAlternate);
+ long /*int*/ path = Gdip.GraphicsPath_new(Gdip.FillModeAlternate);
if (path == 0) SWT.error(SWT.ERROR_NO_HANDLES);
if (nw > naw) {
if (nh > nah) {
@@ -2140,7 +2140,7 @@ public void drawString (String string, int x, int y, boolean isTransparent) {
if (length == 0) return;
char[] buffer = new char [length];
string.getChars(0, length, buffer, 0);
- int /*long*/ gdipGraphics = data.gdipGraphics;
+ long /*int*/ gdipGraphics = data.gdipGraphics;
if (gdipGraphics != 0) {
checkGC(FONT | FOREGROUND | (isTransparent ? 0 : BACKGROUND));
drawText(gdipGraphics, string, x, y, isTransparent ? SWT.DRAW_TRANSPARENT : 0, null);
@@ -2181,10 +2181,10 @@ public void drawString (String string, int x, int y, boolean isTransparent) {
OS.GetTextExtentPoint32W(handle, buffer, length, size);
}
int width = size.cx, height = size.cy;
- int /*long*/ hBitmap = OS.CreateCompatibleBitmap(handle, width, height);
+ long /*int*/ hBitmap = OS.CreateCompatibleBitmap(handle, width, height);
if (hBitmap == 0) SWT.error(SWT.ERROR_NO_HANDLES);
- int /*long*/ memDC = OS.CreateCompatibleDC(handle);
- int /*long*/ hOldBitmap = OS.SelectObject(memDC, hBitmap);
+ long /*int*/ memDC = OS.CreateCompatibleDC(handle);
+ long /*int*/ hOldBitmap = OS.SelectObject(memDC, hBitmap);
OS.PatBlt(memDC, 0, 0, width, height, OS.BLACKNESS);
OS.SetBkMode(memDC, OS.TRANSPARENT);
OS.SetTextColor(memDC, foreground);
@@ -2290,7 +2290,7 @@ public void drawText (String string, int x, int y, int flags) {
if (handle == 0) SWT.error(SWT.ERROR_GRAPHIC_DISPOSED);
if (string == null) SWT.error(SWT.ERROR_NULL_ARGUMENT);
if (string.length() == 0) return;
- int /*long*/ gdipGraphics = data.gdipGraphics;
+ long /*int*/ gdipGraphics = data.gdipGraphics;
if (gdipGraphics != 0) {
checkGC(FONT | FOREGROUND | ((flags & SWT.DRAW_TRANSPARENT) != 0 ? 0 : BACKGROUND));
drawText(gdipGraphics, string, x, y, flags, null);
@@ -2336,10 +2336,10 @@ public void drawText (String string, int x, int y, int flags) {
OS.DrawText(handle, buffer, buffer.length(), rect, uFormat | OS.DT_CALCRECT);
int width = rect.right - rect.left;
int height = rect.bottom - rect.top;
- int /*long*/ hBitmap = OS.CreateCompatibleBitmap(handle, width, height);
+ long /*int*/ hBitmap = OS.CreateCompatibleBitmap(handle, width, height);
if (hBitmap == 0) SWT.error(SWT.ERROR_NO_HANDLES);
- int /*long*/ memDC = OS.CreateCompatibleDC(handle);
- int /*long*/ hOldBitmap = OS.SelectObject(memDC, hBitmap);
+ long /*int*/ memDC = OS.CreateCompatibleDC(handle);
+ long /*int*/ hOldBitmap = OS.SelectObject(memDC, hBitmap);
OS.PatBlt(memDC, 0, 0, width, height, OS.BLACKNESS);
OS.SetBkMode(memDC, OS.TRANSPARENT);
OS.SetTextColor(memDC, foreground);
@@ -2360,7 +2360,7 @@ public void drawText (String string, int x, int y, int flags) {
OS.SetBkMode(handle, oldBkMode);
}
-boolean useGDIP (int /*long*/ hdc, char[] buffer) {
+boolean useGDIP (long /*int*/ hdc, char[] buffer) {
if (OS.IsWinCE || !OS.IsUnicode) return false;
short[] glyphs = new short[buffer.length];
OS.GetGlyphIndicesW(hdc, buffer, buffer.length, glyphs, OS.GGI_MARK_NONEXISTING_GLYPHS);
@@ -2379,14 +2379,14 @@ boolean useGDIP (int /*long*/ hdc, char[] buffer) {
return false;
}
-void drawText(int /*long*/ gdipGraphics, String string, int x, int y, int flags, Point size) {
+void drawText(long /*int*/ gdipGraphics, String string, int x, int y, int flags, Point size) {
int length = string.length();
char[] chars = new char [length];
string.getChars(0, length, chars, 0);
- int /*long*/ hdc = Gdip.Graphics_GetHDC(gdipGraphics);
- int /*long*/ hFont = data.hGDIFont;
+ long /*int*/ hdc = Gdip.Graphics_GetHDC(gdipGraphics);
+ long /*int*/ hFont = data.hGDIFont;
if (hFont == 0 && data.font != null) hFont = data.font.handle;
- int /*long*/ oldFont = 0;
+ long /*int*/ oldFont = 0;
if (hFont != 0) oldFont = OS.SelectObject(hdc, hFont);
TEXTMETRIC lptm = OS.IsUnicode ? (TEXTMETRIC)new TEXTMETRICW() : new TEXTMETRICA();
OS.GetTextMetrics(hdc, lptm);
@@ -2450,7 +2450,7 @@ void drawText(int /*long*/ gdipGraphics, String string, int x, int y, int flags,
}
}
-RectF drawText(int /*long*/ gdipGraphics, char[] buffer, int start, int length, int x, int y, int flags, int mnemonicIndex, TEXTMETRIC lptm, boolean draw) {
+RectF drawText(long /*int*/ gdipGraphics, char[] buffer, int start, int length, int x, int y, int flags, int mnemonicIndex, TEXTMETRIC lptm, boolean draw) {
boolean drawMnemonic = draw && mnemonicIndex != -1 && (data.uiState & OS.UISF_HIDEACCEL) == 0;
boolean needsBounds = !draw || drawMnemonic || (flags & SWT.DRAW_TRANSPARENT) == 0 || (data.style & SWT.MIRRORED) != 0 || (flags & SWT.DRAW_DELIMITER) != 0;
if (length <= 0) {
@@ -2465,18 +2465,18 @@ RectF drawText(int /*long*/ gdipGraphics, char[] buffer, int start, int length,
GCP_RESULTS result = new GCP_RESULTS();
result.lStructSize = GCP_RESULTS.sizeof;
result.nGlyphs = nGlyphs;
- int /*long*/ hHeap = OS.GetProcessHeap();
- int /*long*/ lpDx = result.lpDx = OS.HeapAlloc(hHeap, OS.HEAP_ZERO_MEMORY, nGlyphs * 4);
- int /*long*/ lpGlyphs = result.lpGlyphs = OS.HeapAlloc(hHeap, OS.HEAP_ZERO_MEMORY, nGlyphs * 2);
- int /*long*/ lpOrder = 0;
+ long /*int*/ hHeap = OS.GetProcessHeap();
+ long /*int*/ lpDx = result.lpDx = OS.HeapAlloc(hHeap, OS.HEAP_ZERO_MEMORY, nGlyphs * 4);
+ long /*int*/ lpGlyphs = result.lpGlyphs = OS.HeapAlloc(hHeap, OS.HEAP_ZERO_MEMORY, nGlyphs * 2);
+ long /*int*/ lpOrder = 0;
int dwFlags = OS.GCP_GLYPHSHAPE | OS.GCP_REORDER | OS.GCP_LIGATE;
if (drawMnemonic) {
lpOrder = result.lpOrder = OS.HeapAlloc(hHeap, OS.HEAP_ZERO_MEMORY, nGlyphs * 4);
}
- int /*long*/ hdc = Gdip.Graphics_GetHDC(gdipGraphics);
- int /*long*/ hFont = data.hGDIFont;
+ long /*int*/ hdc = Gdip.Graphics_GetHDC(gdipGraphics);
+ long /*int*/ hFont = data.hGDIFont;
if (hFont == 0 && data.font != null) hFont = data.font.handle;
- int /*long*/ oldFont = 0;
+ long /*int*/ oldFont = 0;
if (hFont != 0) oldFont = OS.SelectObject(hdc, hFont);
if (start != 0) {
char[] temp = new char[length];
@@ -2508,7 +2508,7 @@ RectF drawText(int /*long*/ gdipGraphics, char[] buffer, int start, int length,
Gdip.Graphics_FillRectangle(gdipGraphics, data.gdipBrush, x, y, (int)Math.ceil(bounds.Width), (int)Math.ceil(bounds.Height));
}
int gstate = 0;
- int /*long*/ brush = getFgBrush();
+ long /*int*/ brush = getFgBrush();
if ((data.style & SWT.MIRRORED) != 0) {
switch (Gdip.Brush_GetType(brush)) {
case Gdip.BrushTypeLinearGradient:
@@ -2537,7 +2537,7 @@ RectF drawText(int /*long*/ gdipGraphics, char[] buffer, int start, int length,
Gdip.Graphics_Restore(gdipGraphics, gstate);
}
if (drawMnemonic) {
- int /*long*/ pen = Gdip.Pen_new(brush, 1);
+ long /*int*/ pen = Gdip.Pen_new(brush, 1);
if (pen != 0) {
int[] order = new int[1];
OS.MoveMemory(order, result.lpOrder + mnemonicIndex * 4, 4);
@@ -2564,7 +2564,7 @@ RectF drawText(int /*long*/ gdipGraphics, char[] buffer, int start, int length,
return bounds;
}
-void drawTextGDIP(int /*long*/ gdipGraphics, String string, int x, int y, int flags, boolean draw, Point size) {
+void drawTextGDIP(long /*int*/ gdipGraphics, String string, int x, int y, int flags, boolean draw, Point size) {
boolean needsBounds = !draw || (flags & SWT.DRAW_TRANSPARENT) == 0;
char[] buffer;
int length = string.length();
@@ -2576,7 +2576,7 @@ void drawTextGDIP(int /*long*/ gdipGraphics, String string, int x, int y, int fl
buffer = new char[]{' '};
}
PointF pt = new PointF();
- int /*long*/ format = Gdip.StringFormat_Clone(Gdip.StringFormat_GenericTypographic());
+ long /*int*/ format = Gdip.StringFormat_Clone(Gdip.StringFormat_GenericTypographic());
int formatFlags = Gdip.StringFormat_GetFormatFlags(format) | Gdip.StringFormatFlagsMeasureTrailingSpaces;
if ((data.style & SWT.MIRRORED) != 0) formatFlags |= Gdip.StringFormatFlagsDirectionRightToLeft;
Gdip.StringFormat_SetFormatFlags(format, formatFlags);
@@ -2595,7 +2595,7 @@ void drawTextGDIP(int /*long*/ gdipGraphics, String string, int x, int y, int fl
Gdip.Graphics_FillRectangle(gdipGraphics, data.gdipBrush, x, y, (int)Math.ceil(bounds.Width), (int)Math.ceil(bounds.Height));
}
int gstate = 0;
- int /*long*/ brush = getFgBrush();
+ long /*int*/ brush = getFgBrush();
if ((data.style & SWT.MIRRORED) != 0) {
switch (Gdip.Brush_GetType(brush)) {
case Gdip.BrushTypeLinearGradient:
@@ -2692,7 +2692,7 @@ public void fillArc (int x, int y, int width, int height, int startAngle, int ar
height = -height;
}
if (width == 0 || height == 0 || arcAngle == 0) return;
- int /*long*/ gdipGraphics = data.gdipGraphics;
+ long /*int*/ gdipGraphics = data.gdipGraphics;
if (gdipGraphics != 0) {
if (width == height) {
Gdip.Graphics_FillPie(gdipGraphics, data.gdipBrush, x, y, width, height, -startAngle, -arcAngle);
@@ -2823,12 +2823,12 @@ public void fillGradientRectangle(int x, int y, int width, int height, boolean v
p2.Y = p1.Y;
}
int rgb = ((fromRGB.red & 0xFF) << 16) | ((fromRGB.green & 0xFF) << 8) | (fromRGB.blue & 0xFF);
- int /*long*/ fromGpColor = Gdip.Color_new(data.alpha << 24 | rgb);
+ long /*int*/ fromGpColor = Gdip.Color_new(data.alpha << 24 | rgb);
if (fromGpColor == 0) SWT.error(SWT.ERROR_NO_HANDLES);
rgb = ((toRGB.red & 0xFF) << 16) | ((toRGB.green & 0xFF) << 8) | (toRGB.blue & 0xFF);
- int /*long*/ toGpColor = Gdip.Color_new(data.alpha << 24 | rgb);
+ long /*int*/ toGpColor = Gdip.Color_new(data.alpha << 24 | rgb);
if (toGpColor == 0) SWT.error(SWT.ERROR_NO_HANDLES);
- int /*long*/ brush = Gdip.LinearGradientBrush_new(p1, p2, fromGpColor, toGpColor);
+ long /*int*/ brush = Gdip.LinearGradientBrush_new(p1, p2, fromGpColor, toGpColor);
Gdip.Graphics_FillRectangle(data.gdipGraphics, brush, x, y, width, height);
Gdip.LinearGradientBrush_delete(brush);
Gdip.Color_delete(fromGpColor);
@@ -2852,10 +2852,10 @@ public void fillGradientRectangle(int x, int y, int width, int height, boolean v
rop2 = OS.GetROP2(handle);
}
if (OS.IsWinNT && rop2 != OS.R2_XORPEN && OS.GetDeviceCaps(handle, OS.TECHNOLOGY) != OS.DT_RASPRINTER) {
- final int /*long*/ hHeap = OS.GetProcessHeap();
- final int /*long*/ pMesh = OS.HeapAlloc(hHeap, OS.HEAP_ZERO_MEMORY, GRADIENT_RECT.sizeof + TRIVERTEX.sizeof * 2);
+ final long /*int*/ hHeap = OS.GetProcessHeap();
+ final long /*int*/ pMesh = OS.HeapAlloc(hHeap, OS.HEAP_ZERO_MEMORY, GRADIENT_RECT.sizeof + TRIVERTEX.sizeof * 2);
if (pMesh == 0) SWT.error(SWT.ERROR_NO_HANDLES);
- final int /*long*/ pVertex = pMesh + GRADIENT_RECT.sizeof;
+ final long /*int*/ pVertex = pMesh + GRADIENT_RECT.sizeof;
GRADIENT_RECT gradientRect = new GRADIENT_RECT();
gradientRect.UpperLeft = 0;
@@ -3082,7 +3082,7 @@ public void fillRoundRectangle (int x, int y, int width, int height, int arcWidt
OS.RoundRect(handle, x,y,x+width+1,y+height+1,arcWidth, arcHeight);
}
-void fillRoundRectangleGdip (int /*long*/ gdipGraphics, int /*long*/ brush, int x, int y, int width, int height, int arcWidth, int arcHeight) {
+void fillRoundRectangleGdip (long /*int*/ gdipGraphics, long /*int*/ brush, int x, int y, int width, int height, int arcWidth, int arcHeight) {
int nx = x;
int ny = y;
int nw = width;
@@ -3106,7 +3106,7 @@ void fillRoundRectangleGdip (int /*long*/ gdipGraphics, int /*long*/ brush, int
if (naw == 0 || nah == 0) {
Gdip.Graphics_FillRectangle(data.gdipGraphics, data.gdipBrush, x, y, width, height);
} else {
- int /*long*/ path = Gdip.GraphicsPath_new(Gdip.FillModeAlternate);
+ long /*int*/ path = Gdip.GraphicsPath_new(Gdip.FillModeAlternate);
if (path == 0) SWT.error(SWT.ERROR_NO_HANDLES);
if (nw > naw) {
if (nh > nah) {
@@ -3140,7 +3140,7 @@ void flush () {
* underline HDC. This is done by calling GetHDC()
* followed by ReleaseHDC().
*/
- int /*long*/ hdc = Gdip.Graphics_GetHDC(data.gdipGraphics);
+ long /*int*/ hdc = Gdip.Graphics_GetHDC(data.gdipGraphics);
Gdip.Graphics_ReleaseHDC(data.gdipGraphics, hdc);
}
}
@@ -3344,7 +3344,7 @@ public int getCharWidth(char ch) {
*/
public Rectangle getClipping() {
if (handle == 0) SWT.error(SWT.ERROR_GRAPHIC_DISPOSED);
- int /*long*/ gdipGraphics = data.gdipGraphics;
+ long /*int*/ gdipGraphics = data.gdipGraphics;
if (gdipGraphics != 0) {
Rect rect = new Rect();
Gdip.Graphics_SetPixelOffsetMode(gdipGraphics, Gdip.PixelOffsetModeNone);
@@ -3375,9 +3375,9 @@ public void getClipping (Region region) {
if (handle == 0) SWT.error(SWT.ERROR_GRAPHIC_DISPOSED);
if (region == null) SWT.error (SWT.ERROR_NULL_ARGUMENT);
if (region.isDisposed()) SWT.error (SWT.ERROR_INVALID_ARGUMENT);
- int /*long*/ gdipGraphics = data.gdipGraphics;
+ long /*int*/ gdipGraphics = data.gdipGraphics;
if (gdipGraphics != 0) {
- int /*long*/ rgn = Gdip.Region_new();
+ long /*int*/ rgn = Gdip.Region_new();
Gdip.Graphics_GetClip(data.gdipGraphics, rgn);
if (Gdip.Region_IsInfinite(rgn, gdipGraphics)) {
Rect rect = new Rect();
@@ -3386,11 +3386,11 @@ public void getClipping (Region region) {
Gdip.Graphics_SetPixelOffsetMode(gdipGraphics, Gdip.PixelOffsetModeHalf);
OS.SetRectRgn(region.handle, rect.X, rect.Y, rect.X + rect.Width, rect.Y + rect.Height);
} else {
- int /*long*/ matrix = Gdip.Matrix_new(1, 0, 0, 1, 0, 0);
- int /*long*/ identity = Gdip.Matrix_new(1, 0, 0, 1, 0, 0);
+ long /*int*/ matrix = Gdip.Matrix_new(1, 0, 0, 1, 0, 0);
+ long /*int*/ identity = Gdip.Matrix_new(1, 0, 0, 1, 0, 0);
Gdip.Graphics_GetTransform(gdipGraphics, matrix);
Gdip.Graphics_SetTransform(gdipGraphics, identity);
- int /*long*/ hRgn = Gdip.Region_GetHRGN(rgn, data.gdipGraphics);
+ long /*int*/ hRgn = Gdip.Region_GetHRGN(rgn, data.gdipGraphics);
Gdip.Graphics_SetTransform(gdipGraphics, matrix);
Gdip.Matrix_delete(identity);
Gdip.Matrix_delete(matrix);
@@ -3416,22 +3416,22 @@ public void getClipping (Region region) {
OS.OffsetRgn (region.handle, pt.x, pt.y);
}
if (!OS.IsWinCE) {
- int /*long*/ metaRgn = OS.CreateRectRgn (0, 0, 0, 0);
+ long /*int*/ metaRgn = OS.CreateRectRgn (0, 0, 0, 0);
if (OS.GetMetaRgn (handle, metaRgn) != 0) {
OS.OffsetRgn (metaRgn, pt.x, pt.y);
OS.CombineRgn (region.handle, metaRgn, region.handle, OS.RGN_AND);
}
OS.DeleteObject(metaRgn);
- int /*long*/ hwnd = data.hwnd;
+ long /*int*/ hwnd = data.hwnd;
if (hwnd != 0 && data.ps != null) {
- int /*long*/ sysRgn = OS.CreateRectRgn (0, 0, 0, 0);
+ long /*int*/ sysRgn = OS.CreateRectRgn (0, 0, 0, 0);
if (OS.GetRandomRgn (handle, sysRgn, OS.SYSRGN) == 1) {
if (OS.WIN32_VERSION >= OS.VERSION(4, 10)) {
if ((OS.GetLayout(handle) & OS.LAYOUT_RTL) != 0) {
int nBytes = OS.GetRegionData (sysRgn, 0, null);
int [] lpRgnData = new int [nBytes / 4];
OS.GetRegionData (sysRgn, nBytes, lpRgnData);
- int /*long*/ newSysRgn = OS.ExtCreateRegion(new float [] {-1, 0, 0, 1, 0, 0}, nBytes, lpRgnData);
+ long /*int*/ newSysRgn = OS.ExtCreateRegion(new float [] {-1, 0, 0, 1, 0, 0}, nBytes, lpRgnData);
OS.DeleteObject(sysRgn);
sysRgn = newSysRgn;
}
@@ -3455,7 +3455,7 @@ int getCodePage () {
return lpCs[1];
}
-int /*long*/ getFgBrush() {
+long /*int*/ getFgBrush() {
return data.foregroundPattern != null ? data.foregroundPattern.handle : data.gdipFgBrush;
}
@@ -3790,10 +3790,10 @@ public void getTransform(Transform transform) {
if (handle == 0) SWT.error(SWT.ERROR_GRAPHIC_DISPOSED);
if (transform == null) SWT.error(SWT.ERROR_NULL_ARGUMENT);
if (transform.isDisposed()) SWT.error(SWT.ERROR_INVALID_ARGUMENT);
- int /*long*/ gdipGraphics = data.gdipGraphics;
+ long /*int*/ gdipGraphics = data.gdipGraphics;
if (gdipGraphics != 0) {
Gdip.Graphics_GetTransform(gdipGraphics, transform.handle);
- int /*long*/ identity = identity();
+ long /*int*/ identity = identity();
Gdip.Matrix_Invert(identity);
Gdip.Matrix_Multiply(transform.handle, identity, Gdip.MatrixOrderAppend);
Gdip.Matrix_delete(identity);
@@ -3830,7 +3830,7 @@ public boolean getXORMode() {
void initGdip() {
data.device.checkGDIP();
- int /*long*/ gdipGraphics = data.gdipGraphics;
+ long /*int*/ gdipGraphics = data.gdipGraphics;
if (gdipGraphics != 0) return;
/*
* Feature in GDI+. The GDI+ clipping set with Graphics->SetClip()
@@ -3839,7 +3839,7 @@ void initGdip() {
* cannot be reset. The fix is to clear the clipping before
* the GDI+ graphics is created and reset it afterwards.
*/
- int /*long*/ hRgn = OS.CreateRectRgn(0, 0, 0, 0);
+ long /*int*/ hRgn = OS.CreateRectRgn(0, 0, 0, 0);
int result = OS.GetClipRgn(handle, hRgn);
if (!OS.IsWinCE) {
POINT pt = new POINT ();
@@ -3864,7 +3864,7 @@ void initGdip() {
Gdip.Graphics_SetPageUnit(gdipGraphics, Gdip.UnitPixel);
Gdip.Graphics_SetPixelOffsetMode(gdipGraphics, Gdip.PixelOffsetModeHalf);
if ((data.style & SWT.MIRRORED) != 0) {
- int /*long*/ matrix = identity();
+ long /*int*/ matrix = identity();
Gdip.Graphics_SetTransform(gdipGraphics, matrix);
Gdip.Matrix_delete(matrix);
}
@@ -3883,7 +3883,7 @@ void initGdip() {
}
}
-int /*long*/ identity() {
+long /*int*/ identity() {
if ((data.style & SWT.MIRRORED) != 0) {
int width = 0;
int technology = OS.GetDeviceCaps(handle, OS.TECHNOLOGY);
@@ -3896,13 +3896,13 @@ int /*long*/ identity() {
OS.GetObject(image.handle, BITMAP.sizeof, bm);
width = bm.bmWidth;
} else {
- int /*long*/ hwnd = OS.IsWinCE ? data.hwnd : OS.WindowFromDC(handle);
+ long /*int*/ hwnd = OS.IsWinCE ? data.hwnd : OS.WindowFromDC(handle);
if (hwnd != 0) {
RECT rect = new RECT();
OS.GetClientRect(hwnd, rect);
width = rect.right - rect.left;
} else {
- int /*long*/ hBitmap = OS.GetCurrentObject(handle, OS.OBJ_BITMAP);
+ long /*int*/ hBitmap = OS.GetCurrentObject(handle, OS.OBJ_BITMAP);
BITMAP bm = new BITMAP();
OS.GetObject(hBitmap, BITMAP.sizeof, bm);
width = bm.bmWidth;
@@ -3916,7 +3916,7 @@ int /*long*/ identity() {
return Gdip.Matrix_new(1, 0, 0, 1, 0, 0);
}
-void init(Drawable drawable, GCData data, int /*long*/ hDC) {
+void init(Drawable drawable, GCData data, long /*int*/ hDC) {
int foreground = data.foreground;
if (foreground != -1) {
data.state &= ~(FOREGROUND | FOREGROUND_TEXT | PEN);
@@ -3936,7 +3936,7 @@ void init(Drawable drawable, GCData data, int /*long*/ hDC) {
} else {
data.font = Font.win32_new(device, OS.GetCurrentObject(hDC, OS.OBJ_FONT));
}
- int /*long*/ hPalette = data.device.hPalette;
+ long /*int*/ hPalette = data.device.hPalette;
if (hPalette != 0) {
OS.SelectPalette(hDC, hPalette, true);
OS.RealizePalette(hDC);
@@ -3996,15 +3996,15 @@ public int hashCode () {
*/
public boolean isClipped() {
if (handle == 0) SWT.error(SWT.ERROR_GRAPHIC_DISPOSED);
- int /*long*/ gdipGraphics = data.gdipGraphics;
+ long /*int*/ gdipGraphics = data.gdipGraphics;
if (gdipGraphics != 0) {
- int /*long*/ rgn = Gdip.Region_new();
+ long /*int*/ rgn = Gdip.Region_new();
Gdip.Graphics_GetClip(data.gdipGraphics, rgn);
boolean isInfinite = Gdip.Region_IsInfinite(rgn, gdipGraphics);
Gdip.Region_delete(rgn);
return !isInfinite;
}
- int /*long*/ region = OS.CreateRectRgn(0, 0, 0, 0);
+ long /*int*/ region = OS.CreateRectRgn(0, 0, 0, 0);
int result = OS.GetClipRgn(handle, region);
OS.DeleteObject(region);
return result > 0;
@@ -4024,7 +4024,7 @@ public boolean isDisposed() {
return handle == 0;
}
-float measureSpace(int /*long*/ font, int /*long*/ format) {
+float measureSpace(long /*int*/ font, long /*int*/ format) {
PointF pt = new PointF();
RectF bounds = new RectF();
Gdip.Graphics_MeasureString(data.gdipGraphics, new char[]{' '}, 1, font, pt, format, bounds);
@@ -4228,12 +4228,12 @@ public void setBackgroundPattern (Pattern pattern) {
data.state &= ~BACKGROUND;
}
-void setClipping(int /*long*/ clipRgn) {
- int /*long*/ hRgn = clipRgn;
- int /*long*/ gdipGraphics = data.gdipGraphics;
+void setClipping(long /*int*/ clipRgn) {
+ long /*int*/ hRgn = clipRgn;
+ long /*int*/ gdipGraphics = data.gdipGraphics;
if (gdipGraphics != 0) {
if (hRgn != 0) {
- int /*long*/ region = Gdip.Region_new(hRgn);
+ long /*int*/ region = Gdip.Region_new(hRgn);
Gdip.Graphics_SetClip(gdipGraphics, region, Gdip.CombineModeReplace);
Gdip.Region_delete(region);
} else {
@@ -4269,7 +4269,7 @@ void setClipping(int /*long*/ clipRgn) {
*/
public void setClipping (int x, int y, int width, int height) {
if (handle == 0) SWT.error(SWT.ERROR_GRAPHIC_DISPOSED);
- int /*long*/ hRgn = OS.CreateRectRgn(x, y, x + width, y + height);
+ long /*int*/ hRgn = OS.CreateRectRgn(x, y, x + width, y + height);
setClipping(hRgn);
OS.DeleteObject(hRgn);
}
@@ -4898,7 +4898,7 @@ public void setTransform(Transform transform) {
if (transform != null && transform.isDisposed()) SWT.error(SWT.ERROR_INVALID_ARGUMENT);
if (data.gdipGraphics == 0 && transform == null) return;
initGdip();
- int /*long*/ identity = identity();
+ long /*int*/ identity = identity();
if (transform != null) {
Gdip.Matrix_Multiply(identity, transform.handle, Gdip.MatrixOrderPrepend);
}
@@ -4931,7 +4931,7 @@ public Point stringExtent(String string) {
if (string == null) SWT.error (SWT.ERROR_NULL_ARGUMENT);
checkGC(FONT);
int length = string.length();
- int /*long*/ gdipGraphics = data.gdipGraphics;
+ long /*int*/ gdipGraphics = data.gdipGraphics;
if (gdipGraphics != 0) {
Point size = new Point(0, 0);
drawText(gdipGraphics, string, 0, 0, 0, size);
@@ -5009,7 +5009,7 @@ public Point textExtent(String string, int flags) {
if (handle == 0) SWT.error(SWT.ERROR_GRAPHIC_DISPOSED);
if (string == null) SWT.error (SWT.ERROR_NULL_ARGUMENT);
checkGC(FONT);
- int /*long*/ gdipGraphics = data.gdipGraphics;
+ long /*int*/ gdipGraphics = data.gdipGraphics;
if (gdipGraphics != 0) {
Point size = new Point(0, 0);
drawText(gdipGraphics, string, 0, 0, flags, size);
@@ -5061,7 +5061,7 @@ public String toString () {
*/
public static GC win32_new(Drawable drawable, GCData data) {
GC gc = new GC();
- int /*long*/ hDC = drawable.internal_new_GC(data);
+ long /*int*/ hDC = drawable.internal_new_GC(data);
gc.device = data.device;
gc.init(drawable, data, hDC);
return gc;
@@ -5084,7 +5084,7 @@ public static GC win32_new(Drawable drawable, GCData data) {
*
* @noreference This method is not intended to be referenced by clients.
*/
-public static GC win32_new(int /*long*/ hDC, GCData data) {
+public static GC win32_new(long /*int*/ hDC, GCData data) {
GC gc = new GC();
gc.device = data.device;
data.style |= SWT.LEFT_TO_RIGHT;
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/graphics/GCData.java b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/graphics/GCData.java
index 8ccb803401..fa4c631e4f 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/graphics/GCData.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/graphics/GCData.java
@@ -45,19 +45,19 @@ public final class GCData {
public int alpha = 0xFF;
public Image image;
- public int /*long*/ hPen, hOldPen;
- public int /*long*/ hBrush, hOldBrush;
- public int /*long*/ hNullBitmap;
- public int /*long*/ hwnd;
+ public long /*int*/ hPen, hOldPen;
+ public long /*int*/ hBrush, hOldBrush;
+ public long /*int*/ hNullBitmap;
+ public long /*int*/ hwnd;
public PAINTSTRUCT ps;
public int layout = -1;
- public int /*long*/ gdipGraphics;
- public int /*long*/ gdipPen;
- public int /*long*/ gdipBrush;
- public int /*long*/ gdipFgBrush;
- public int /*long*/ gdipBgBrush;
- public int /*long*/ gdipFont;
- public int /*long*/ hGDIFont;
+ public long /*int*/ gdipGraphics;
+ public long /*int*/ gdipPen;
+ public long /*int*/ gdipBrush;
+ public long /*int*/ gdipFgBrush;
+ public long /*int*/ gdipBgBrush;
+ public long /*int*/ gdipFont;
+ public long /*int*/ hGDIFont;
public float gdipXOffset, gdipYOffset;
public int uiState = 0;
public boolean focusDrawn;
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;
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/graphics/Path.java b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/graphics/Path.java
index 44c6bbb375..496a995d9b 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/graphics/Path.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/graphics/Path.java
@@ -49,7 +49,7 @@ public class Path extends Resource {
*
* @noreference This field is not intended to be referenced by clients.
*/
- public int /*long*/ handle;
+ public long /*int*/ handle;
PointF currentPoint = new PointF(), startPoint = new PointF();
@@ -199,9 +199,9 @@ public void addArc(float x, float y, float width, float height, float startAngle
if (width == height) {
Gdip.GraphicsPath_AddArc(handle, x, y, width, height, -startAngle, -arcAngle);
} else {
- int /*long*/ path = Gdip.GraphicsPath_new(Gdip.FillModeAlternate);
+ long /*int*/ path = Gdip.GraphicsPath_new(Gdip.FillModeAlternate);
if (path == 0) SWT.error(SWT.ERROR_NO_HANDLES);
- int /*long*/ matrix = Gdip.Matrix_new(width, 0, 0, height, x, y);
+ long /*int*/ matrix = Gdip.Matrix_new(width, 0, 0, height, x, y);
if (matrix == 0) SWT.error(SWT.ERROR_NO_HANDLES);
Gdip.GraphicsPath_AddArc(path, 0, 0, 1, 1, -startAngle, -arcAngle);
Gdip.GraphicsPath_Transform(path, matrix);
@@ -283,9 +283,9 @@ public void addString(String string, float x, float y, Font font) {
int length = string.length();
char[] buffer = new char[length];
string.getChars(0, length, buffer, 0);
- int /*long*/ hDC = device.internal_new_GC(null);
- int /*long*/ [] family = new int /*long*/ [1];
- int /*long*/ gdipFont = GC.createGdipFont(hDC, font.handle, 0, device.fontCollection, family, null);
+ long /*int*/ hDC = device.internal_new_GC(null);
+ long /*int*/ [] family = new long /*int*/ [1];
+ long /*int*/ gdipFont = GC.createGdipFont(hDC, font.handle, 0, device.fontCollection, family, null);
PointF point = new PointF();
point.X = x - (Gdip.Font_GetSize(gdipFont) / 6);
point.Y = y;
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/graphics/Pattern.java b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/graphics/Pattern.java
index 8c094dda81..f1178eeecd 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/graphics/Pattern.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/graphics/Pattern.java
@@ -47,7 +47,7 @@ public class Pattern extends Resource {
*
* @noreference This field is not intended to be referenced by clients.
*/
- public int /*long*/ handle;
+ public long /*int*/ handle;
/**
* Constructs a new Pattern given an image. Drawing with the resulting
@@ -79,14 +79,14 @@ public Pattern(Device device, Image image) {
if (image == null) SWT.error(SWT.ERROR_NULL_ARGUMENT);
if (image.isDisposed()) SWT.error(SWT.ERROR_INVALID_ARGUMENT);
this.device.checkGDIP();
- int /*long*/[] gdipImage = image.createGdipImage();
- int /*long*/ img = gdipImage[0];
+ long /*int*/[] gdipImage = image.createGdipImage();
+ long /*int*/ img = gdipImage[0];
int width = Gdip.Image_GetWidth(img);
int height = Gdip.Image_GetHeight(img);
handle = Gdip.TextureBrush_new(img, Gdip.WrapModeTile, 0, 0, width, height);
Gdip.Bitmap_delete(img);
if (gdipImage[1] != 0) {
- int /*long*/ hHeap = OS.GetProcessHeap ();
+ long /*int*/ hHeap = OS.GetProcessHeap ();
OS.HeapFree(hHeap, 0, gdipImage[1]);
}
if (handle == 0) SWT.error(SWT.ERROR_NO_HANDLES);
@@ -174,14 +174,14 @@ public Pattern(Device device, float x1, float y1, float x2, float y2, Color colo
this.device.checkGDIP();
int colorRef1 = color1.handle;
int rgb = ((colorRef1 >> 16) & 0xFF) | (colorRef1 & 0xFF00) | ((colorRef1 & 0xFF) << 16);
- int /*long*/ foreColor = Gdip.Color_new((alpha1 & 0xFF) << 24 | rgb);
+ long /*int*/ foreColor = Gdip.Color_new((alpha1 & 0xFF) << 24 | rgb);
if (x1 == x2 && y1 == y2) {
handle = Gdip.SolidBrush_new(foreColor);
if (handle == 0) SWT.error(SWT.ERROR_NO_HANDLES);
} else {
int colorRef2 = color2.handle;
rgb = ((colorRef2 >> 16) & 0xFF) | (colorRef2 & 0xFF00) | ((colorRef2 & 0xFF) << 16);
- int /*long*/ backColor = Gdip.Color_new((alpha2 & 0xFF) << 24 | rgb);
+ long /*int*/ backColor = Gdip.Color_new((alpha2 & 0xFF) << 24 | rgb);
PointF p1 = new PointF();
p1.X = x1;
p1.Y = y1;
@@ -195,8 +195,8 @@ public Pattern(Device device, float x1, float y1, float x2, float y2, Color colo
int r = (int)(((colorRef1 & 0xFF) >> 0) * 0.5f + ((colorRef2 & 0xFF) >> 0) * 0.5f);
int g = (int)(((colorRef1 & 0xFF00) >> 8) * 0.5f + ((colorRef2 & 0xFF00) >> 8) * 0.5f);
int b = (int)(((colorRef1 & 0xFF0000) >> 16) * 0.5f + ((colorRef2 & 0xFF0000) >> 16) * 0.5f);
- int /*long*/ midColor = Gdip.Color_new(a << 24 | r << 16 | g << 8 | b);
- Gdip.LinearGradientBrush_SetInterpolationColors(handle, new int /*long*/ []{foreColor, midColor, backColor}, new float[]{0, 0.5f, 1}, 3);
+ long /*int*/ midColor = Gdip.Color_new(a << 24 | r << 16 | g << 8 | b);
+ Gdip.LinearGradientBrush_SetInterpolationColors(handle, new long /*int*/ []{foreColor, midColor, backColor}, new float[]{0, 0.5f, 1}, 3);
Gdip.Color_delete(midColor);
}
Gdip.Color_delete(backColor);
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/graphics/Region.java b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/graphics/Region.java
index f1d7800e8a..4382821950 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/graphics/Region.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/graphics/Region.java
@@ -42,7 +42,7 @@ public final class Region extends Resource {
*
* @noreference This field is not intended to be referenced by clients.
*/
- public int /*long*/ handle;
+ public long /*int*/ handle;
/**
* Constructs a new empty region.
@@ -112,7 +112,7 @@ public void add (int[] pointArray) {
if (isDisposed()) SWT.error(SWT.ERROR_GRAPHIC_DISPOSED);
if (pointArray == null) SWT.error(SWT.ERROR_NULL_ARGUMENT);
if (OS.IsWinCE) SWT.error(SWT.ERROR_NOT_IMPLEMENTED);
- int /*long*/ polyRgn = OS.CreatePolygonRgn(pointArray, pointArray.length / 2, OS.ALTERNATE);
+ long /*int*/ polyRgn = OS.CreatePolygonRgn(pointArray, pointArray.length / 2, OS.ALTERNATE);
OS.CombineRgn (handle, handle, polyRgn, OS.RGN_OR);
OS.DeleteObject (polyRgn);
}
@@ -158,7 +158,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 /*long*/ rectRgn = OS.CreateRectRgn (x, y, x + width, y + height);
+ long /*int*/ rectRgn = OS.CreateRectRgn (x, y, x + width, y + height);
OS.CombineRgn (handle, handle, rectRgn, OS.RGN_OR);
OS.DeleteObject (rectRgn);
}
@@ -323,7 +323,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 /*long*/ rectRgn = OS.CreateRectRgn (x, y, x + width, y + height);
+ long /*int*/ rectRgn = OS.CreateRectRgn (x, y, x + width, y + height);
OS.CombineRgn (handle, handle, rectRgn, OS.RGN_AND);
OS.DeleteObject (rectRgn);
}
@@ -451,7 +451,7 @@ public void subtract (int[] pointArray) {
if (isDisposed()) SWT.error(SWT.ERROR_GRAPHIC_DISPOSED);
if (pointArray == null) SWT.error(SWT.ERROR_NULL_ARGUMENT);
if (OS.IsWinCE) SWT.error(SWT.ERROR_NOT_IMPLEMENTED);
- int /*long*/ polyRgn = OS.CreatePolygonRgn(pointArray, pointArray.length / 2, OS.ALTERNATE);
+ long /*int*/ polyRgn = OS.CreatePolygonRgn(pointArray, pointArray.length / 2, OS.ALTERNATE);
OS.CombineRgn (handle, handle, polyRgn, OS.RGN_DIFF);
OS.DeleteObject (polyRgn);
}
@@ -499,7 +499,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 /*long*/ rectRgn = OS.CreateRectRgn (x, y, x + width, y + height);
+ long /*int*/ rectRgn = OS.CreateRectRgn (x, y, x + width, y + height);
OS.CombineRgn (handle, handle, rectRgn, OS.RGN_DIFF);
OS.DeleteObject (rectRgn);
}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/graphics/TextLayout.java b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/graphics/TextLayout.java
index 3816b1273a..0896598a92 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/graphics/TextLayout.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/graphics/TextLayout.java
@@ -54,7 +54,7 @@ public final class TextLayout extends Resource {
StyleItem[] allRuns;
StyleItem[][] runs;
int[] lineOffset, lineY, lineWidth;
- int /*long*/ mLangFontLink2;
+ long /*int*/ mLangFontLink2;
static final char LTR_MARK = '\u200E', RTL_MARK = '\u200F';
static final int SCRIPT_VISATTR_SIZEOF = 2;
@@ -81,17 +81,17 @@ public final class TextLayout extends Resource {
/*Script cache and analysis */
SCRIPT_ANALYSIS analysis;
- int /*long*/ psc = 0;
+ long /*int*/ psc = 0;
/*Shape info (malloc when the run is shaped) */
- int /*long*/ glyphs;
+ long /*int*/ glyphs;
int glyphCount;
- int /*long*/ clusters;
- int /*long*/ visAttrs;
+ long /*int*/ clusters;
+ long /*int*/ visAttrs;
/*Place info (malloc when the run is placed) */
- int /*long*/ advances;
- int /*long*/ goffsets;
+ long /*int*/ advances;
+ long /*int*/ goffsets;
int width;
int ascent;
int descent;
@@ -101,15 +101,15 @@ public final class TextLayout extends Resource {
int strikeoutPos, strikeoutThickness;
/* Justify info (malloc during computeRuns) */
- int /*long*/ justify;
+ long /*int*/ justify;
/* ScriptBreak */
- int /*long*/ psla;
+ long /*int*/ psla;
- int /*long*/ fallbackFont;
+ long /*int*/ fallbackFont;
void free() {
- int /*long*/ hHeap = OS.GetProcessHeap();
+ long /*int*/ hHeap = OS.GetProcessHeap();
if (psc != 0) {
OS.ScriptFreeCache (psc);
OS.HeapFree(hHeap, 0, psc);
@@ -180,7 +180,7 @@ public TextLayout (Device device) {
styles[1] = new StyleItem();
stylesCount = 2;
text = ""; //$NON-NLS-1$
- int /*long*/[] ppv = new int /*long*/[1];
+ long /*int*/[] ppv = new long /*int*/[1];
OS.OleInitialize(0);
if (OS.CoCreateInstance(CLSID_CMultiLanguage, 0, OS.CLSCTX_INPROC_SERVER, IID_IMLangFontLink2, ppv) == OS.S_OK) {
mLangFontLink2 = ppv[0];
@@ -217,7 +217,7 @@ void breakRun(StyleItem run) {
if (run.psla != 0) return;
char[] chars = new char[run.length];
segmentsText.getChars(run.start, run.start + run.length, chars, 0);
- int /*long*/ hHeap = OS.GetProcessHeap();
+ long /*int*/ hHeap = OS.GetProcessHeap();
run.psla = OS.HeapAlloc(hHeap, OS.HEAP_ZERO_MEMORY, SCRIPT_LOGATTR.sizeof * chars.length);
if (run.psla == 0) SWT.error(SWT.ERROR_NO_HANDLES);
OS.ScriptBreak(chars, chars.length, run.analysis, run.psla);
@@ -233,8 +233,8 @@ void checkLayout () {
*/
void computeRuns (GC gc) {
if (runs != null) return;
- int /*long*/ hDC = gc != null ? gc.handle : device.internal_new_GC(null);
- int /*long*/ srcHdc = OS.CreateCompatibleDC(hDC);
+ long /*int*/ hDC = gc != null ? gc.handle : device.internal_new_GC(null);
+ long /*int*/ srcHdc = OS.CreateCompatibleDC(hDC);
allRuns = itemize();
for (int i=0; i<allRuns.length - 1; i++) {
StyleItem run = allRuns[i];
@@ -419,7 +419,7 @@ void computeRuns (GC gc) {
}
}
lineWidth += lineIndent;
- int /*long*/ hHeap = OS.GetProcessHeap();
+ long /*int*/ hHeap = OS.GetProcessHeap();
int newLineWidth = 0;
for (int j = 0; j < runs[line].length; j++) {
StyleItem item = runs[line][j];
@@ -530,15 +530,15 @@ int[] computePolyline(int left, int top, int right, int bottom) {
return coordinates;
}
-int /*long*/ createGdipBrush(int pixel, int alpha) {
+long /*int*/ createGdipBrush(int pixel, int alpha) {
int argb = ((alpha & 0xFF) << 24) | ((pixel >> 16) & 0xFF) | (pixel & 0xFF00) | ((pixel & 0xFF) << 16);
- int /*long*/ gdiColor = Gdip.Color_new(argb);
- int /*long*/ brush = Gdip.SolidBrush_new(gdiColor);
+ long /*int*/ gdiColor = Gdip.Color_new(argb);
+ long /*int*/ brush = Gdip.SolidBrush_new(gdiColor);
Gdip.Color_delete(gdiColor);
return brush;
}
-int /*long*/ createGdipBrush(Color color, int alpha) {
+long /*int*/ createGdipBrush(Color color, int alpha) {
return createGdipBrush(color.handle, alpha);
}
@@ -620,16 +620,16 @@ public void draw (GC gc, int x, int y, int selectionStart, int selectionEnd, Col
if (selectionBackground != null && selectionBackground.isDisposed()) SWT.error(SWT.ERROR_INVALID_ARGUMENT);
int length = text.length();
if (length == 0 && flags == 0) return;
- int /*long*/ hdc = gc.handle;
+ long /*int*/ hdc = gc.handle;
Rectangle clip = gc.getClipping();
GCData data = gc.data;
- int /*long*/ gdipGraphics = data.gdipGraphics;
+ long /*int*/ gdipGraphics = data.gdipGraphics;
int foreground = data.foreground;
int linkColor = OS.GetSysColor (OS.COLOR_HOTLIGHT);
int alpha = data.alpha;
boolean gdip = gdipGraphics != 0;
- int /*long*/ gdipForeground = 0;
- int /*long*/ gdipLinkColor = 0;
+ long /*int*/ gdipForeground = 0;
+ long /*int*/ gdipLinkColor = 0;
int state = 0;
if (gdip) {
gc.checkGC(GC.FOREGROUND);
@@ -641,8 +641,8 @@ public void draw (GC gc, int x, int y, int selectionStart, int selectionEnd, Col
}
}
boolean hasSelection = selectionStart <= selectionEnd && selectionStart != -1 && selectionEnd != -1;
- int /*long*/ gdipSelBackground = 0, gdipSelForeground = 0, gdipFont = 0, lastHFont = 0;
- int /*long*/ selBackground = 0;
+ long /*int*/ gdipSelBackground = 0, gdipSelForeground = 0, gdipFont = 0, lastHFont = 0;
+ long /*int*/ selBackground = 0;
int selForeground = 0;
if (hasSelection || ((flags & SWT.LAST_LINE_SELECTION) != 0 && (flags & (SWT.FULL_SELECTION | SWT.DELIMITER_SELECTION)) != 0)) {
int fgSel = selectionForeground != null ? selectionForeground.handle : OS.GetSysColor (OS.COLOR_HIGHLIGHTTEXT);
@@ -740,11 +740,11 @@ public void draw (GC gc, int x, int y, int selectionStart, int selectionEnd, Col
if (!skipTab && (!run.lineBreak || run.softBreak) && !(style != null && style.metrics != null)) {
OS.SetRect(rect, drawX, drawY, drawX + run.width, drawY + lineHeight);
if (gdip) {
- int /*long*/ hFont = getItemFont(run);
+ long /*int*/ hFont = getItemFont(run);
if (hFont != lastHFont) {
lastHFont = hFont;
if (gdipFont != 0) Gdip.Font_delete(gdipFont);
- int /*long*/ oldFont = OS.SelectObject(hdc, hFont);
+ long /*int*/ oldFont = OS.SelectObject(hdc, hFont);
gdipFont = Gdip.Font_new(hdc, hFont);
OS.SelectObject(hdc, oldFont);
if (gdipFont == 0) SWT.error(SWT.ERROR_NO_HANDLES);
@@ -753,7 +753,7 @@ public void draw (GC gc, int x, int y, int selectionStart, int selectionEnd, Col
gdipFont = 0;
}
}
- int /*long*/ gdipFg = gdipForeground;
+ long /*int*/ gdipFg = gdipForeground;
if (style != null && style.underline && style.underlineStyle == SWT.UNDERLINE_LINK) {
if (gdipLinkColor == 0) gdipLinkColor = createGdipBrush(linkColor, alpha);
gdipFg = gdipLinkColor;
@@ -787,7 +787,7 @@ public void draw (GC gc, int x, int y, int selectionStart, int selectionEnd, Col
if (selBackground != 0) OS.DeleteObject (selBackground);
}
-RECT drawBorder(int /*long*/ hdc, int x, int y, int lineHeight, StyleItem[] line, int index, int color, int selectionColor, RECT clipRect, RECT pRect, int selectionStart, int selectionEnd, Rectangle drawClip) {
+RECT drawBorder(long /*int*/ hdc, int x, int y, int lineHeight, StyleItem[] line, int index, int color, int selectionColor, RECT clipRect, RECT pRect, int selectionStart, int selectionEnd, Rectangle drawClip) {
StyleItem run = line[index];
TextStyle style = run.style;
if (style == null) return null;
@@ -834,12 +834,12 @@ RECT drawBorder(int /*long*/ hdc, int x, int y, int lineHeight, StyleItem[] line
break;
}
}
- int /*long*/ oldBrush = OS.SelectObject(hdc, OS.GetStockObject(OS.NULL_BRUSH));
+ long /*int*/ oldBrush = OS.SelectObject(hdc, OS.GetStockObject(OS.NULL_BRUSH));
LOGBRUSH logBrush = new LOGBRUSH();
logBrush.lbStyle = OS.BS_SOLID;
logBrush.lbColor = /*64*/(int)color;
- int /*long*/ newPen = OS.ExtCreatePen(lineStyle | OS.PS_GEOMETRIC, lineWidth, logBrush, 0, null);
- int /*long*/ oldPen = OS.SelectObject(hdc, newPen);
+ long /*int*/ newPen = OS.ExtCreatePen(lineStyle | OS.PS_GEOMETRIC, lineWidth, logBrush, 0, null);
+ long /*int*/ oldPen = OS.SelectObject(hdc, newPen);
RECT drawRect = new RECT();
OS.SetRect(drawRect, x + left, y, x + run.x + run.width, y + lineHeight);
if (drawClip != null) {
@@ -861,7 +861,7 @@ RECT drawBorder(int /*long*/ hdc, int x, int y, int lineHeight, StyleItem[] line
if (clipRect.right == -1) clipRect.right = 0x7ffff;
OS.IntersectClipRect(hdc, clipRect.left, clipRect.top, clipRect.right, clipRect.bottom);
logBrush.lbColor = /*64*/(int)selectionColor;
- int /*long*/ selPen = OS.ExtCreatePen (lineStyle | OS.PS_GEOMETRIC, lineWidth, logBrush, 0, null);
+ long /*int*/ selPen = OS.ExtCreatePen (lineStyle | OS.PS_GEOMETRIC, lineWidth, logBrush, 0, null);
oldPen = OS.SelectObject(hdc, selPen);
OS.Rectangle(hdc, drawRect.left, drawRect.top, drawRect.right, drawRect.bottom);
OS.RestoreDC(hdc, state);
@@ -874,7 +874,7 @@ RECT drawBorder(int /*long*/ hdc, int x, int y, int lineHeight, StyleItem[] line
return clipRect;
}
-RECT drawBorderGDIP(int /*long*/ graphics, int x, int y, int lineHeight, StyleItem[] line, int index, int /*long*/ color, int /*long*/ selectionColor, RECT clipRect, RECT pRect, int selectionStart, int selectionEnd, int alpha, Rectangle drawClip) {
+RECT drawBorderGDIP(long /*int*/ graphics, int x, int y, int lineHeight, StyleItem[] line, int index, long /*int*/ color, long /*int*/ selectionColor, RECT clipRect, RECT pRect, int selectionStart, int selectionEnd, int alpha, Rectangle drawClip) {
StyleItem run = line[index];
TextStyle style = run.style;
if (style == null) return null;
@@ -892,7 +892,7 @@ RECT drawBorderGDIP(int /*long*/ graphics, int x, int y, int lineHeight, StyleIt
}
boolean hasSelection = selectionStart <= selectionEnd && selectionStart != -1 && selectionEnd != -1;
boolean fullSelection = hasSelection && selectionStart <= start && end <= selectionEnd;
- int /*long*/ brush = color;
+ long /*int*/ brush = color;
if (style.borderColor != null) {
brush = createGdipBrush(style.borderColor, alpha);
clipRect = null;
@@ -913,7 +913,7 @@ RECT drawBorderGDIP(int /*long*/ graphics, int x, int y, int lineHeight, StyleIt
case SWT.BORDER_DASH: lineStyle = Gdip.DashStyleDash; break;
case SWT.BORDER_DOT: lineStyle = Gdip.DashStyleDot; break;
}
- int /*long*/ pen = Gdip.Pen_new(brush, lineWidth);
+ long /*int*/ pen = Gdip.Pen_new(brush, lineWidth);
Gdip.Pen_SetDashStyle(pen, lineStyle);
Gdip.Graphics_SetPixelOffsetMode(graphics, Gdip.PixelOffsetModeNone);
int smoothingMode = Gdip.Graphics_GetSmoothingMode(graphics);
@@ -932,7 +932,7 @@ RECT drawBorderGDIP(int /*long*/ graphics, int x, int y, int lineHeight, StyleIt
Gdip.Graphics_Restore(graphics, gstate);
gstate = Gdip.Graphics_Save(graphics);
Gdip.Graphics_SetClip(graphics, gdipRect, Gdip.CombineModeIntersect);
- int /*long*/ selPen = Gdip.Pen_new(selectionColor, lineWidth);
+ long /*int*/ selPen = Gdip.Pen_new(selectionColor, lineWidth);
Gdip.Pen_SetDashStyle(selPen, lineStyle);
Gdip.Graphics_DrawRectangle(graphics, selPen, x + left, y, run.x + run.width - left - 1, lineHeight - 1);
Gdip.Pen_delete(selPen);
@@ -949,7 +949,7 @@ RECT drawBorderGDIP(int /*long*/ graphics, int x, int y, int lineHeight, StyleIt
return clipRect;
}
-void drawRunBackground(StyleItem run, int /*long*/ hdc, RECT rect, int selectionStart, int selectionEnd, int /*long*/ selBrush, boolean hasSelection) {
+void drawRunBackground(StyleItem run, long /*int*/ hdc, RECT rect, int selectionStart, int selectionEnd, long /*int*/ selBrush, boolean hasSelection) {
int end = run.start + run.length - 1;
boolean fullSelection = hasSelection && selectionStart <= run.start && selectionEnd >= end;
if (fullSelection) {
@@ -958,8 +958,8 @@ void drawRunBackground(StyleItem run, int /*long*/ hdc, RECT rect, int selection
} else {
if (run.style != null && run.style.background != null) {
int bg = run.style.background.handle;
- int /*long*/ hBrush = OS.CreateSolidBrush (bg);
- int /*long*/ oldBrush = OS.SelectObject(hdc, hBrush);
+ long /*int*/ hBrush = OS.CreateSolidBrush (bg);
+ long /*int*/ oldBrush = OS.SelectObject(hdc, hBrush);
OS.PatBlt(hdc, rect.left, rect.top, rect.right - rect.left, rect.bottom - rect.top, OS.PATCOPY);
OS.SelectObject(hdc, oldBrush);
OS.DeleteObject(hBrush);
@@ -973,14 +973,14 @@ void drawRunBackground(StyleItem run, int /*long*/ hdc, RECT rect, int selection
}
}
-void drawRunBackgroundGDIP(StyleItem run, int /*long*/ graphics, RECT rect, int selectionStart, int selectionEnd, int alpha, int /*long*/ selBrush, boolean hasSelection) {
+void drawRunBackgroundGDIP(StyleItem run, long /*int*/ graphics, RECT rect, int selectionStart, int selectionEnd, int alpha, long /*int*/ selBrush, boolean hasSelection) {
int end = run.start + run.length - 1;
boolean fullSelection = hasSelection && selectionStart <= run.start && selectionEnd >= end;
if (fullSelection) {
Gdip.Graphics_FillRectangle(graphics, selBrush, rect.left, rect.top, rect.right - rect.left, rect.bottom - rect.top);
} else {
if (run.style != null && run.style.background != null) {
- int /*long*/ brush = createGdipBrush(run.style.background, alpha);
+ long /*int*/ brush = createGdipBrush(run.style.background, alpha);
Gdip.Graphics_FillRectangle(graphics, brush, rect.left, rect.top, rect.right - rect.left, rect.bottom - rect.top);
Gdip.SolidBrush_delete(brush);
}
@@ -997,7 +997,7 @@ void drawRunBackgroundGDIP(StyleItem run, int /*long*/ graphics, RECT rect, int
}
}
-RECT drawRunText(int /*long*/ hdc, StyleItem run, RECT rect, int baseline, int color, int selectionColor, int selectionStart, int selectionEnd) {
+RECT drawRunText(long /*int*/ hdc, StyleItem run, RECT rect, int baseline, int color, int selectionColor, int selectionStart, int selectionEnd) {
int end = run.start + run.length - 1;
boolean hasSelection = selectionStart <= selectionEnd && selectionStart != -1 && selectionEnd != -1;
boolean fullSelection = hasSelection && selectionStart <= run.start && selectionEnd >= end;
@@ -1005,7 +1005,7 @@ RECT drawRunText(int /*long*/ hdc, StyleItem run, RECT rect, int baseline, int c
int offset = (orientation & SWT.RIGHT_TO_LEFT) != 0 ? -1 : 0;
int x = rect.left + offset;
int y = rect.top + (baseline - run.ascent);
- int /*long*/ hFont = getItemFont(run);
+ long /*int*/ hFont = getItemFont(run);
OS.SelectObject(hdc, hFont);
if (fullSelection) {
color = selectionColor;
@@ -1024,7 +1024,7 @@ RECT drawRunText(int /*long*/ hdc, StyleItem run, RECT rect, int baseline, int c
return fullSelection || partialSelection ? rect : null;
}
-RECT drawRunTextGDIP(int /*long*/ graphics, StyleItem run, RECT rect, int /*long*/ gdipFont, int baseline, int /*long*/ color, int /*long*/ selectionColor, int selectionStart, int selectionEnd, int alpha) {
+RECT drawRunTextGDIP(long /*int*/ graphics, StyleItem run, RECT rect, long /*int*/ gdipFont, int baseline, long /*int*/ color, long /*int*/ selectionColor, int selectionStart, int selectionEnd, int alpha) {
int end = run.start + run.length - 1;
boolean hasSelection = selectionStart <= selectionEnd && selectionStart != -1 && selectionEnd != -1;
boolean fullSelection = hasSelection && selectionStart <= run.start && selectionEnd >= end;
@@ -1032,7 +1032,7 @@ RECT drawRunTextGDIP(int /*long*/ graphics, StyleItem run, RECT rect, int /*long
int drawY = rect.top + baseline;
if (run.style != null && run.style.rise != 0) drawY -= run.style.rise;
int drawX = rect.left;
- int /*long*/ brush = color;
+ long /*int*/ brush = color;
if (fullSelection) {
brush = selectionColor;
} else {
@@ -1109,10 +1109,10 @@ RECT drawRunTextGDIP(int /*long*/ graphics, StyleItem run, RECT rect, int /*long
return fullSelection || partialSelection ? rect : null;
}
-RECT drawRunTextGDIPRaster(int /*long*/ graphics, StyleItem run, RECT rect, int baseline, int color, int selectionColor, int selectionStart, int selectionEnd) {
- int /*long*/ clipRgn = 0;
+RECT drawRunTextGDIPRaster(long /*int*/ graphics, StyleItem run, RECT rect, int baseline, int color, int selectionColor, int selectionStart, int selectionEnd) {
+ long /*int*/ clipRgn = 0;
Gdip.Graphics_SetPixelOffsetMode(graphics, Gdip.PixelOffsetModeNone);
- int /*long*/ rgn = Gdip.Region_new();
+ long /*int*/ rgn = Gdip.Region_new();
if (rgn == 0) SWT.error(SWT.ERROR_NO_HANDLES);
Gdip.Graphics_GetClip(graphics, rgn);
if (!Gdip.Region_IsInfinite(rgn, graphics)) {
@@ -1121,7 +1121,7 @@ RECT drawRunTextGDIPRaster(int /*long*/ graphics, StyleItem run, RECT rect, int
Gdip.Region_delete(rgn);
Gdip.Graphics_SetPixelOffsetMode(graphics, Gdip.PixelOffsetModeHalf);
float[] lpXform = null;
- int /*long*/ matrix = Gdip.Matrix_new(1, 0, 0, 1, 0, 0);
+ long /*int*/ matrix = Gdip.Matrix_new(1, 0, 0, 1, 0, 0);
if (matrix == 0) SWT.error(SWT.ERROR_NO_HANDLES);
Gdip.Graphics_GetTransform(graphics, matrix);
if (!Gdip.Matrix_IsIdentity(matrix)) {
@@ -1129,7 +1129,7 @@ RECT drawRunTextGDIPRaster(int /*long*/ graphics, StyleItem run, RECT rect, int
Gdip.Matrix_GetElements(matrix, lpXform);
}
Gdip.Matrix_delete(matrix);
- int /*long*/ hdc = Gdip.Graphics_GetHDC(graphics);
+ long /*int*/ hdc = Gdip.Graphics_GetHDC(graphics);
int state = OS.SaveDC(hdc);
if (lpXform != null) {
OS.SetGraphicsMode(hdc, OS.GM_ADVANCED);
@@ -1149,7 +1149,7 @@ RECT drawRunTextGDIPRaster(int /*long*/ graphics, StyleItem run, RECT rect, int
return pRect;
}
-RECT drawStrikeout(int /*long*/ hdc, int x, int baseline, StyleItem[] line, int index, int color, int selectionColor, RECT clipRect, RECT pRect, int selectionStart, int selectionEnd, Rectangle drawClip) {
+RECT drawStrikeout(long /*int*/ hdc, int x, int baseline, StyleItem[] line, int index, int color, int selectionColor, RECT clipRect, RECT pRect, int selectionStart, int selectionEnd, Rectangle drawClip) {
StyleItem run = line[index];
TextStyle style = run.style;
if (style == null) return null;
@@ -1182,11 +1182,11 @@ RECT drawStrikeout(int /*long*/ hdc, int x, int baseline, StyleItem[] line, int
}
RECT rect = new RECT();
OS.SetRect(rect, x + left, baseline - run.strikeoutPos - style.rise, x + run.x + run.width, baseline - run.strikeoutPos + run.strikeoutThickness - style.rise);
- int /*long*/ brush = OS.CreateSolidBrush(color);
+ long /*int*/ brush = OS.CreateSolidBrush(color);
OS.FillRect(hdc, rect, brush);
OS.DeleteObject(brush);
if (clipRect != null) {
- int /*long*/ selBrush = OS.CreateSolidBrush(selectionColor);
+ long /*int*/ selBrush = OS.CreateSolidBrush(selectionColor);
if (clipRect.left == -1) clipRect.left = 0;
if (clipRect.right == -1) clipRect.right = 0x7ffff;
OS.SetRect(clipRect, Math.max(rect.left, clipRect.left), rect.top, Math.min(rect.right, clipRect.right), rect.bottom);
@@ -1198,7 +1198,7 @@ RECT drawStrikeout(int /*long*/ hdc, int x, int baseline, StyleItem[] line, int
return clipRect;
}
-RECT drawStrikeoutGDIP(int /*long*/ graphics, int x, int baseline, StyleItem[] line, int index, int /*long*/ color, int /*long*/ selectionColor, RECT clipRect, RECT pRect, int selectionStart, int selectionEnd, int alpha, Rectangle drawClip) {
+RECT drawStrikeoutGDIP(long /*int*/ graphics, int x, int baseline, StyleItem[] line, int index, long /*int*/ color, long /*int*/ selectionColor, RECT clipRect, RECT pRect, int selectionStart, int selectionEnd, int alpha, Rectangle drawClip) {
StyleItem run = line[index];
TextStyle style = run.style;
if (style == null) return null;
@@ -1216,7 +1216,7 @@ RECT drawStrikeoutGDIP(int /*long*/ graphics, int x, int baseline, StyleItem[] l
}
boolean hasSelection = selectionStart <= selectionEnd && selectionStart != -1 && selectionEnd != -1;
boolean fullSelection = hasSelection && selectionStart <= start && end <= selectionEnd;
- int /*long*/ brush = color;
+ long /*int*/ brush = color;
if (style.strikeoutColor != null) {
brush = createGdipBrush(style.strikeoutColor, alpha);
clipRect = null;
@@ -1255,7 +1255,7 @@ RECT drawStrikeoutGDIP(int /*long*/ graphics, int x, int baseline, StyleItem[] l
return clipRect;
}
-RECT drawUnderline(int /*long*/ hdc, int x, int baseline, int lineUnderlinePos, int lineBottom, StyleItem[] line, int index, int color, int selectionColor, RECT clipRect, RECT pRect, int selectionStart, int selectionEnd, Rectangle drawClip) {
+RECT drawUnderline(long /*int*/ hdc, int x, int baseline, int lineUnderlinePos, int lineBottom, StyleItem[] line, int index, int color, int selectionColor, RECT clipRect, RECT pRect, int selectionStart, int selectionEnd, Rectangle drawClip) {
StyleItem run = line[index];
TextStyle style = run.style;
if (style == null) return null;
@@ -1300,8 +1300,8 @@ RECT drawUnderline(int /*long*/ hdc, int x, int baseline, int lineUnderlinePos,
int squigglyHeight = 2 * squigglyThickness;
int squigglyY = Math.min(rect.top - squigglyHeight / 2, lineBottom - squigglyHeight - 1);
int[] points = computePolyline(rect.left, squigglyY, rect.right, squigglyY + squigglyHeight);
- int /*long*/ pen = OS.CreatePen(OS.PS_SOLID, squigglyThickness, color);
- int /*long*/ oldPen = OS.SelectObject(hdc, pen);
+ long /*int*/ pen = OS.CreatePen(OS.PS_SOLID, squigglyThickness, color);
+ long /*int*/ oldPen = OS.SelectObject(hdc, pen);
int state = OS.SaveDC(hdc);
OS.IntersectClipRect(hdc, rect.left, squigglyY, rect.right + 1, squigglyY + squigglyHeight + 1);
OS.Polyline(hdc, points, points.length / 2);
@@ -1340,7 +1340,7 @@ RECT drawUnderline(int /*long*/ hdc, int x, int baseline, int lineUnderlinePos,
OS.OffsetRect(rect, 0, lineBottom - bottom);
if (clipRect != null) OS.OffsetRect(clipRect, 0, lineBottom - bottom);
}
- int /*long*/ brush = OS.CreateSolidBrush(color);
+ long /*int*/ brush = OS.CreateSolidBrush(color);
OS.FillRect(hdc, rect, brush);
if (style.underlineStyle == SWT.UNDERLINE_DOUBLE) {
OS.SetRect(rect, rect.left, rect.top + run.underlineThickness * 2, rect.right, rect.bottom + run.underlineThickness * 2);
@@ -1348,7 +1348,7 @@ RECT drawUnderline(int /*long*/ hdc, int x, int baseline, int lineUnderlinePos,
}
OS.DeleteObject(brush);
if (clipRect != null) {
- int /*long*/ selBrush = OS.CreateSolidBrush(selectionColor);
+ long /*int*/ selBrush = OS.CreateSolidBrush(selectionColor);
OS.FillRect(hdc, clipRect, selBrush);
if (style.underlineStyle == SWT.UNDERLINE_DOUBLE) {
OS.SetRect(clipRect, clipRect.left, rect.top, clipRect.right, rect.bottom);
@@ -1360,8 +1360,8 @@ RECT drawUnderline(int /*long*/ hdc, int x, int baseline, int lineUnderlinePos,
case UNDERLINE_IME_DASH:
case UNDERLINE_IME_DOT: {
int penStyle = style.underlineStyle == UNDERLINE_IME_DASH ? OS.PS_DASH : OS.PS_DOT;
- int /*long*/ pen = OS.CreatePen(penStyle, 1, color);
- int /*long*/ oldPen = OS.SelectObject(hdc, pen);
+ long /*int*/ pen = OS.CreatePen(penStyle, 1, color);
+ long /*int*/ oldPen = OS.SelectObject(hdc, pen);
OS.SetRect(rect, rect.left, baseline + run.descent, rect.right, baseline + run.descent + run.underlineThickness);
OS.MoveToEx(hdc, rect.left, rect.top, 0);
OS.LineTo(hdc, rect.right, rect.top);
@@ -1384,7 +1384,7 @@ RECT drawUnderline(int /*long*/ hdc, int x, int baseline, int lineUnderlinePos,
return clipRect;
}
-RECT drawUnderlineGDIP (int /*long*/ graphics, int x, int baseline, int lineUnderlinePos, int lineBottom, StyleItem[] line, int index, int /*long*/ color, int /*long*/ selectionColor, RECT clipRect, RECT pRect, int selectionStart, int selectionEnd, int alpha, Rectangle drawClip) {
+RECT drawUnderlineGDIP (long /*int*/ graphics, int x, int baseline, int lineUnderlinePos, int lineBottom, StyleItem[] line, int index, long /*int*/ color, long /*int*/ selectionColor, RECT clipRect, RECT pRect, int selectionStart, int selectionEnd, int alpha, Rectangle drawClip) {
StyleItem run = line[index];
TextStyle style = run.style;
if (style == null) return null;
@@ -1402,7 +1402,7 @@ RECT drawUnderlineGDIP (int /*long*/ graphics, int x, int baseline, int lineUnde
}
boolean hasSelection = selectionStart <= selectionEnd && selectionStart != -1 && selectionEnd != -1;
boolean fullSelection = hasSelection && selectionStart <= start && end <= selectionEnd;
- int /*long*/ brush = color;
+ long /*int*/ brush = color;
if (style.underlineColor != null) {
brush = createGdipBrush(style.underlineColor, alpha);
clipRect = null;
@@ -1440,7 +1440,7 @@ RECT drawUnderlineGDIP (int /*long*/ graphics, int x, int baseline, int lineUnde
int squigglyHeight = 2 * squigglyThickness;
int squigglyY = Math.min(rect.top - squigglyHeight / 2, lineBottom - squigglyHeight - 1);
int[] points = computePolyline(rect.left, squigglyY, rect.right, squigglyY + squigglyHeight);
- int /*long*/ pen = Gdip.Pen_new(brush, squigglyThickness);
+ long /*int*/ pen = Gdip.Pen_new(brush, squigglyThickness);
gstate = Gdip.Graphics_Save(graphics);
if (gdipRect != null) {
Gdip.Graphics_SetClip(graphics, gdipRect, Gdip.CombineModeExclude);
@@ -1454,7 +1454,7 @@ RECT drawUnderlineGDIP (int /*long*/ graphics, int x, int baseline, int lineUnde
}
Gdip.Graphics_DrawLines(graphics, pen, points, points.length / 2);
if (gdipRect != null) {
- int /*long*/ selPen = Gdip.Pen_new(selectionColor, squigglyThickness);
+ long /*int*/ selPen = Gdip.Pen_new(selectionColor, squigglyThickness);
Gdip.Graphics_Restore(graphics, gstate);
gstate = Gdip.Graphics_Save(graphics);
Gdip.Graphics_SetClip(graphics, gdipRect, Gdip.CombineModeIntersect);
@@ -1505,7 +1505,7 @@ RECT drawUnderlineGDIP (int /*long*/ graphics, int x, int baseline, int lineUnde
break;
case UNDERLINE_IME_DOT:
case UNDERLINE_IME_DASH: {
- int /*long*/ pen = Gdip.Pen_new(brush, 1);
+ long /*int*/ pen = Gdip.Pen_new(brush, 1);
int dashStyle = style.underlineStyle == UNDERLINE_IME_DOT ? Gdip.DashStyleDot : Gdip.DashStyleDash;
Gdip.Pen_SetDashStyle(pen, dashStyle);
if (gdipRect != null) {
@@ -1517,7 +1517,7 @@ RECT drawUnderlineGDIP (int /*long*/ graphics, int x, int baseline, int lineUnde
Gdip.Graphics_Restore(graphics, gstate);
gstate = Gdip.Graphics_Save(graphics);
Gdip.Graphics_SetClip(graphics, gdipRect, Gdip.CombineModeIntersect);
- int /*long*/ selPen = Gdip.Pen_new(brush, 1);
+ long /*int*/ selPen = Gdip.Pen_new(brush, 1);
Gdip.Pen_SetDashStyle(selPen, dashStyle);
Gdip.Graphics_DrawLine(graphics, selPen, rect.left, baseline + run.descent, run.width - run.length, baseline + run.descent);
Gdip.Graphics_Restore(graphics, gstate);
@@ -1670,7 +1670,7 @@ public Rectangle getBounds (int start, int end) {
cx = metrics.width * (start - run.start);
} else if (!run.tab) {
int[] piX = new int[1];
- int /*long*/ advances = run.justify != 0 ? run.justify : run.advances;
+ long /*int*/ advances = run.justify != 0 ? run.justify : run.advances;
OS.ScriptCPtoX(start - run.start, false, run.length, run.glyphCount, run.clusters, run.visAttrs, advances, run.analysis, piX);
cx = isRTL ? run.width - piX[0] : piX[0];
}
@@ -1687,7 +1687,7 @@ public Rectangle getBounds (int start, int end) {
cx = metrics.width * (end - run.start + 1);
} else if (!run.tab) {
int[] piX = new int[1];
- int /*long*/ advances = run.justify != 0 ? run.justify : run.advances;
+ long /*int*/ advances = run.justify != 0 ? run.justify : run.advances;
OS.ScriptCPtoX(end - run.start, true, run.length, run.glyphCount, run.clusters, run.visAttrs, advances, run.analysis, piX);
cx = isRTL ? run.width - piX[0] : piX[0];
}
@@ -1775,7 +1775,7 @@ public boolean getJustify () {
return justify;
}
-int /*long*/ getItemFont (StyleItem item) {
+long /*int*/ getItemFont (StyleItem item) {
if (item.fallbackFont != 0) return item.fallbackFont;
if (item.style != null && item.style.font != null) {
return item.style.font.handle;
@@ -1929,8 +1929,8 @@ public FontMetrics getLineMetrics (int lineIndex) {
checkLayout();
computeRuns(null);
if (!(0 <= lineIndex && lineIndex < runs.length)) SWT.error(SWT.ERROR_INVALID_RANGE);
- int /*long*/ hDC = device.internal_new_GC(null);
- int /*long*/ srcHdc = OS.CreateCompatibleDC(hDC);
+ long /*int*/ hDC = device.internal_new_GC(null);
+ long /*int*/ srcHdc = OS.CreateCompatibleDC(hDC);
TEXTMETRIC lptm = OS.IsUnicode ? (TEXTMETRIC)new TEXTMETRICW() : new TEXTMETRICA();
OS.SelectObject(srcHdc, font != null ? font.handle : device.systemFont.handle);
OS.GetTextMetrics(srcHdc, lptm);
@@ -2053,7 +2053,7 @@ public Point getLocation (int offset, boolean trailing) {
int cChars = run.length;
int gGlyphs = run.glyphCount;
int[] piX = new int[1];
- int /*long*/ advances = run.justify != 0 ? run.justify : run.advances;
+ long /*int*/ advances = run.justify != 0 ? run.justify : run.advances;
OS.ScriptCPtoX(runOffset, trailing, cChars, gGlyphs, run.clusters, run.visAttrs, advances, run.analysis, piX);
width = (orientation & SWT.RIGHT_TO_LEFT) != 0 ? run.width - piX[0] : piX[0];
}
@@ -2263,7 +2263,7 @@ public int getOffset (int x, int y, int[] trailing) {
if ((orientation & SWT.RIGHT_TO_LEFT) != 0) {
xRun = run.width - xRun;
}
- int /*long*/ advances = run.justify != 0 ? run.justify : run.advances;
+ long /*int*/ advances = run.justify != 0 ? run.justify : run.advances;
OS.ScriptXtoCP(xRun, cChars, cGlyphs, run.clusters, run.visAttrs, advances, run.analysis, piCP, piTrailing);
int offset = run.start + piCP[0];
int length = segmentsText.length();
@@ -2319,7 +2319,7 @@ void getPartialSelection(StyleItem run, int selectionStart, int selectionEnd, RE
int gGlyphs = run.glyphCount;
int[] piX = new int[1];
int x = rect.left;
- int /*long*/ advances = run.justify != 0 ? run.justify : run.advances;
+ long /*int*/ advances = run.justify != 0 ? run.justify : run.advances;
OS.ScriptCPtoX(selStart, false, cChars, gGlyphs, run.clusters, run.visAttrs, advances, run.analysis, piX);
int runX = (orientation & SWT.RIGHT_TO_LEFT) != 0 ? run.width - piX[0] : piX[0];
rect.left = x + runX;
@@ -2621,8 +2621,8 @@ StyleItem[] itemize () {
OS.ScriptApplyDigitSubstitution(null, scriptControl, scriptState);
- int /*long*/ hHeap = OS.GetProcessHeap();
- int /*long*/ pItems = OS.HeapAlloc(hHeap, OS.HEAP_ZERO_MEMORY, MAX_ITEM * SCRIPT_ITEM.sizeof);
+ long /*int*/ hHeap = OS.GetProcessHeap();
+ long /*int*/ pItems = OS.HeapAlloc(hHeap, OS.HEAP_ZERO_MEMORY, MAX_ITEM * SCRIPT_ITEM.sizeof);
if (pItems == 0) SWT.error(SWT.ERROR_NO_HANDLES);
int[] pcItems = new int[1];
char[] chars = new char[length];
@@ -2638,7 +2638,7 @@ StyleItem[] itemize () {
/*
* Merge styles ranges and script items
*/
-StyleItem[] merge (int /*long*/ items, int itemCount) {
+StyleItem[] merge (long /*int*/ items, int itemCount) {
if (styles.length > stylesCount) {
StyleItem[] newStyles = new StyleItem[stylesCount];
System.arraycopy(styles, 0, newStyles, 0, stylesCount);
@@ -3233,7 +3233,7 @@ public void setWrapIndent (int wrapIndent) {
this.wrapIndent = wrapIndent;
}
-boolean shape (int /*long*/ hdc, StyleItem run, char[] chars, int[] glyphCount, int maxGlyphs, SCRIPT_PROPERTIES sp) {
+boolean shape (long /*int*/ hdc, StyleItem run, char[] chars, int[] glyphCount, int maxGlyphs, SCRIPT_PROPERTIES sp) {
boolean useCMAPcheck = !sp.fComplex && !run.analysis.fNoGlyphIndex;
if (useCMAPcheck) {
short[] glyphs = new short[chars.length];
@@ -3241,7 +3241,7 @@ boolean shape (int /*long*/ hdc, StyleItem run, char[] chars, int[] glyphCount,
if (run.psc != 0) {
OS.ScriptFreeCache(run.psc);
glyphCount[0] = 0;
- OS.MoveMemory(run.psc, new int /*long*/ [1], OS.PTR_SIZEOF);
+ OS.MoveMemory(run.psc, new long /*int*/ [1], OS.PTR_SIZEOF);
}
return false;
}
@@ -3266,7 +3266,7 @@ boolean shape (int /*long*/ hdc, StyleItem run, char[] chars, int[] glyphCount,
if (run.psc != 0) {
OS.ScriptFreeCache(run.psc);
glyphCount[0] = 0;
- OS.MoveMemory(run.psc, new int /*long*/ [1], OS.PTR_SIZEOF);
+ OS.MoveMemory(run.psc, new long /*int*/ [1], OS.PTR_SIZEOF);
}
run.glyphCount = 0;
return false;
@@ -3275,7 +3275,7 @@ boolean shape (int /*long*/ hdc, StyleItem run, char[] chars, int[] glyphCount,
/*
* Generate glyphs for one Run.
*/
-void shape (final int /*long*/ hdc, final StyleItem run) {
+void shape (final long /*int*/ hdc, final StyleItem run) {
if (run.tab || run.lineBreak) return;
if (run.glyphs != 0) return;
final int[] buffer = new int[1];
@@ -3283,7 +3283,7 @@ void shape (final int /*long*/ hdc, final StyleItem run) {
segmentsText.getChars(run.start, run.start + run.length, chars, 0);
final int maxGlyphs = (chars.length * 3 / 2) + 16;
- int /*long*/ hHeap = OS.GetProcessHeap();
+ long /*int*/ hHeap = OS.GetProcessHeap();
run.glyphs = OS.HeapAlloc(hHeap, OS.HEAP_ZERO_MEMORY, maxGlyphs * 2);
if (run.glyphs == 0) SWT.error(SWT.ERROR_NO_HANDLES);
run.clusters = OS.HeapAlloc(hHeap, OS.HEAP_ZERO_MEMORY, maxGlyphs * 2);
@@ -3303,8 +3303,8 @@ void shape (final int /*long*/ hdc, final StyleItem run) {
}
}
if (!shapeSucceed) {
- int /*long*/ hFont = OS.GetCurrentObject(hdc, OS.OBJ_FONT);
- int /*long*/ newFont = 0;
+ long /*int*/ hFont = OS.GetCurrentObject(hdc, OS.OBJ_FONT);
+ long /*int*/ newFont = 0;
/*
* Bug in Uniscribe. In some version of Uniscribe, ScriptStringAnalyse crashes
* when the character array is too long. The fix is to limit the size of character
@@ -3323,9 +3323,9 @@ void shape (final int /*long*/ hdc, final StyleItem run) {
}
}
if (count > 0) {
- int /*long*/ ssa = OS.HeapAlloc(hHeap, OS.HEAP_ZERO_MEMORY, OS.SCRIPT_STRING_ANALYSIS_sizeof());
- int /*long*/ metaFileDc = OS.CreateEnhMetaFile(hdc, null, null, null);
- int /*long*/ oldMetaFont = OS.SelectObject(metaFileDc, hFont);
+ long /*int*/ ssa = OS.HeapAlloc(hHeap, OS.HEAP_ZERO_MEMORY, OS.SCRIPT_STRING_ANALYSIS_sizeof());
+ long /*int*/ metaFileDc = OS.CreateEnhMetaFile(hdc, null, null, null);
+ long /*int*/ oldMetaFont = OS.SelectObject(metaFileDc, hFont);
int flags = OS.SSA_METAFILE | OS.SSA_FALLBACK | OS.SSA_GLYPHS | OS.SSA_LINK;
if (OS.ScriptStringAnalyse(metaFileDc, sampleChars, count, 0, -1, flags, 0, null, null, 0, 0, 0, ssa) == OS.S_OK) {
OS.ScriptStringOut(ssa, 0, 0, 0, null, 0, 0, false);
@@ -3333,10 +3333,10 @@ void shape (final int /*long*/ hdc, final StyleItem run) {
}
OS.HeapFree(hHeap, 0, ssa);
OS.SelectObject(metaFileDc, oldMetaFont);
- int /*long*/ metaFile = OS.CloseEnhMetaFile(metaFileDc);
+ long /*int*/ metaFile = OS.CloseEnhMetaFile(metaFileDc);
final EMREXTCREATEFONTINDIRECTW emr = new EMREXTCREATEFONTINDIRECTW();
class MetaFileEnumProc {
- int /*long*/ metaFileEnumProc (int /*long*/ hDC, int /*long*/ table, int /*long*/ record, int /*long*/ nObj, int /*long*/ lpData) {
+ long /*int*/ metaFileEnumProc (long /*int*/ hDC, long /*int*/ table, long /*int*/ record, long /*int*/ nObj, long /*int*/ lpData) {
OS.MoveMemory(emr.emr, record, EMR.sizeof);
switch (emr.emr.iType) {
case OS.EMR_EXTCREATEFONTINDIRECTW:
@@ -3353,7 +3353,7 @@ void shape (final int /*long*/ hdc, final StyleItem run) {
boolean compilerWarningWorkaround = false;
if (compilerWarningWorkaround) object.metaFileEnumProc(0, 0, 0, 0, 0);
Callback callback = new Callback(object, "metaFileEnumProc", 5);
- int /*long*/ address = callback.getAddress();
+ long /*int*/ address = callback.getAddress();
if (address == 0) SWT.error(SWT.ERROR_NO_MORE_CALLBACKS);
OS.EnumEnhMetaFile(0, metaFile, address, 0, null);
OS.DeleteEnhMetaFile(metaFile);
@@ -3372,7 +3372,7 @@ void shape (final int /*long*/ hdc, final StyleItem run) {
if (index > 0) {
StyleItem pRun = allRuns[index - 1];
if (pRun.analysis.eScript == run.analysis.eScript) {
- int /*long*/ pFont = getItemFont(pRun);
+ long /*int*/ pFont = getItemFont(pRun);
LOGFONT logFont = OS.IsUnicode ? (LOGFONT)new LOGFONTW() : new LOGFONTA();
OS.GetObject(pFont, LOGFONT.sizeof, logFont);
newFont = OS.CreateFontIndirect(logFont);
@@ -3384,7 +3384,7 @@ void shape (final int /*long*/ hdc, final StyleItem run) {
if (nRun.analysis.eScript == run.analysis.eScript) {
OS.SelectObject(hdc, getItemFont(nRun));
shape(hdc, nRun);
- int /*long*/ nFont = getItemFont(nRun);
+ long /*int*/ nFont = getItemFont(nRun);
LOGFONT logFont = OS.IsUnicode ? (LOGFONT)new LOGFONTW() : new LOGFONTA();
OS.GetObject(nFont, LOGFONT.sizeof, logFont);
newFont = OS.CreateFontIndirect(logFont);
@@ -3414,7 +3414,7 @@ void shape (final int /*long*/ hdc, final StyleItem run) {
}
if (!shapeSucceed) {
if (mLangFontLink2 != 0) {
- int /*long*/[] hNewFont = new int /*long*/[1];
+ long /*int*/[] hNewFont = new long /*int*/[1];
int[] dwCodePages = new int[1], cchCodePages = new int[1];
/* GetStrCodePages() */
OS.VtblCall(4, mLangFontLink2, chars, chars.length, 0, dwCodePages, cchCodePages);
@@ -3424,8 +3424,8 @@ void shape (final int /*long*/ hdc, final StyleItem run) {
OS.GetObject(hNewFont[0], LOGFONT.sizeof, logFont);
/* ReleaseFont() */
OS.VtblCall(8, mLangFontLink2, hNewFont[0]);
- int /*long*/ mLangFont = OS.CreateFontIndirect(logFont);
- int /*long*/ oldFont = OS.SelectObject(hdc, mLangFont);
+ long /*int*/ mLangFont = OS.CreateFontIndirect(logFont);
+ long /*int*/ oldFont = OS.SelectObject(hdc, mLangFont);
if (shapeSucceed = shape(hdc, run, chars, buffer, maxGlyphs, sp)) {
run.fallbackFont = mLangFont;
} else {
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/graphics/Transform.java b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/graphics/Transform.java
index 41fa940be6..7e3b953985 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/graphics/Transform.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/graphics/Transform.java
@@ -45,7 +45,7 @@ public class Transform extends Resource {
*
* @noreference This field is not intended to be referenced by clients.
*/
- public int /*long*/ handle;
+ public long /*int*/ handle;
/**
* Constructs a new identity Transform.