Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'bundles/org.eclipse.swt/Eclipse SWT/win32/org')
-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
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/internal/BidiUtil.java48
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/internal/ImageList.java76
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Button.java72
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Canvas.java28
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Caret.java34
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/ColorDialog.java10
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Combo.java190
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Composite.java86
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Control.java398
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/CoolBar.java30
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/CoolItem.java26
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/DateTime.java40
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Decorations.java54
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/DirectoryDialog.java14
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Display.java212
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/ExpandBar.java50
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/ExpandItem.java26
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/FileDialog.java24
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/FontDialog.java16
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Group.java46
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/IME.java38
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Label.java26
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Link.java60
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/List.java42
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Menu.java34
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/MenuItem.java52
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/MessageBox.java2
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/ProgressBar.java20
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Sash.java36
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Scale.java28
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/ScrollBar.java32
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Scrollable.java36
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Shell.java138
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Slider.java20
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Spinner.java72
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/TabFolder.java52
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/TabItem.java8
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Table.java408
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/TableColumn.java48
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/TableItem.java36
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/TaskBar.java56
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/TaskItem.java50
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Text.java104
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/ToolBar.java76
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/ToolItem.java40
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/ToolTip.java16
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Tracker.java30
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/TrayItem.java4
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Tree.java480
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/TreeColumn.java38
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/TreeItem.java114
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Widget.java104
65 files changed, 2301 insertions, 2301 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.
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/internal/BidiUtil.java b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/internal/BidiUtil.java
index 54cba35304..b2b09bd730 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/internal/BidiUtil.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/internal/BidiUtil.java
@@ -106,7 +106,7 @@ public class BidiUtil {
* @param runnable the code that should be executed when a keyboard language change
* occurs
*/
-public static void addLanguageListener (int /*long*/ hwnd, Runnable runnable) {
+public static void addLanguageListener (long /*int*/ hwnd, Runnable runnable) {
languageMap.put(new LONG(hwnd), runnable);
subclass(hwnd);
}
@@ -116,7 +116,7 @@ public static void addLanguageListener (Control control, Runnable runnable) {
/**
* Proc used for OS.EnumSystemLanguageGroups call during isBidiPlatform test.
*/
-static int /*long*/ EnumSystemLanguageGroupsProc(int /*long*/ lpLangGrpId, int /*long*/ lpLangGrpIdString, int /*long*/ lpLangGrpName, int /*long*/ options, int /*long*/ lParam) {
+static long /*int*/ EnumSystemLanguageGroupsProc(long /*int*/ lpLangGrpId, long /*int*/ lpLangGrpIdString, long /*int*/ lpLangGrpName, long /*int*/ options, long /*int*/ lParam) {
if ((int)/*64*/lpLangGrpId == OS.LGRPID_HEBREW) {
isBidiPlatform = 1;
return 0;
@@ -172,7 +172,7 @@ public static void drawGlyphs(GC gc, char[] renderBuffer, int[] renderDx, int x,
*/
public static char[] getRenderInfo(GC gc, String text, int[] order, byte[] classBuffer, int[] dx, int flags, int [] offsets) {
int fontLanguageInfo = OS.GetFontLanguageInfo(gc.handle);
- int /*long*/ hHeap = OS.GetProcessHeap();
+ long /*int*/ hHeap = OS.GetProcessHeap();
int[] lpCs = new int[8];
int cs = OS.GetTextCharset(gc.handle);
boolean isRightOriented = false;
@@ -188,10 +188,10 @@ public static char[] getRenderInfo(GC gc, String text, int[] order, byte[] class
GCP_RESULTS result = new GCP_RESULTS();
result.lStructSize = GCP_RESULTS.sizeof;
result.nGlyphs = byteCount;
- int /*long*/ lpOrder = result.lpOrder = OS.HeapAlloc(hHeap, OS.HEAP_ZERO_MEMORY, byteCount * 4);
- int /*long*/ lpDx = result.lpDx = OS.HeapAlloc(hHeap, OS.HEAP_ZERO_MEMORY, byteCount * 4);
- int /*long*/ lpClass = result.lpClass = OS.HeapAlloc(hHeap, OS.HEAP_ZERO_MEMORY, byteCount);
- int /*long*/ lpGlyphs = result.lpGlyphs = OS.HeapAlloc(hHeap, OS.HEAP_ZERO_MEMORY, byteCount * 2);
+ long /*int*/ lpOrder = result.lpOrder = OS.HeapAlloc(hHeap, OS.HEAP_ZERO_MEMORY, byteCount * 4);
+ long /*int*/ lpDx = result.lpDx = OS.HeapAlloc(hHeap, OS.HEAP_ZERO_MEMORY, byteCount * 4);
+ long /*int*/ lpClass = result.lpClass = OS.HeapAlloc(hHeap, OS.HEAP_ZERO_MEMORY, byteCount);
+ long /*int*/ lpGlyphs = result.lpGlyphs = OS.HeapAlloc(hHeap, OS.HEAP_ZERO_MEMORY, byteCount * 2);
// set required dwFlags
int dwFlags = 0;
@@ -305,7 +305,7 @@ public static char[] getRenderInfo(GC gc, String text, int[] order, byte[] class
*/
public static void getOrderInfo(GC gc, String text, int[] order, byte[] classBuffer, int flags, int [] offsets) {
int fontLanguageInfo = OS.GetFontLanguageInfo(gc.handle);
- int /*long*/ hHeap = OS.GetProcessHeap();
+ long /*int*/ hHeap = OS.GetProcessHeap();
int[] lpCs = new int[8];
int cs = OS.GetTextCharset(gc.handle);
OS.TranslateCharsetInfo(cs, lpCs, OS.TCI_SRCCHARSET);
@@ -319,8 +319,8 @@ public static void getOrderInfo(GC gc, String text, int[] order, byte[] classBuf
GCP_RESULTS result = new GCP_RESULTS();
result.lStructSize = GCP_RESULTS.sizeof;
result.nGlyphs = byteCount;
- int /*long*/ lpOrder = result.lpOrder = OS.HeapAlloc(hHeap, OS.HEAP_ZERO_MEMORY, byteCount * 4);
- int /*long*/ lpClass = result.lpClass = OS.HeapAlloc(hHeap, OS.HEAP_ZERO_MEMORY, byteCount);
+ long /*int*/ lpOrder = result.lpOrder = OS.HeapAlloc(hHeap, OS.HEAP_ZERO_MEMORY, byteCount * 4);
+ long /*int*/ lpClass = result.lpClass = OS.HeapAlloc(hHeap, OS.HEAP_ZERO_MEMORY, byteCount);
// set required dwFlags, these values will affect how the text gets rendered and
// ordered
@@ -407,7 +407,7 @@ public static int getFontBidiAttributes(GC gc) {
* KEYBOARD_NON_BIDI)
*/
public static int getKeyboardLanguage() {
- int /*long*/ layout = OS.GetKeyboardLayout(0);
+ long /*int*/ layout = OS.GetKeyboardLayout(0);
return isBidiLang(layout) ? KEYBOARD_BIDI : KEYBOARD_NON_BIDI;
}
/**
@@ -416,15 +416,15 @@ public static int getKeyboardLanguage() {
*
* @return integer array with an entry for each installed language
*/
-static int /*long*/[] getKeyboardLanguageList() {
+static long /*int*/[] getKeyboardLanguageList() {
int maxSize = 10;
- int /*long*/[] tempList = new int /*long*/[maxSize];
+ long /*int*/[] tempList = new long /*int*/[maxSize];
int size = OS.GetKeyboardLayoutList(maxSize, tempList);
- int /*long*/[] list = new int /*long*/[size];
+ long /*int*/[] list = new long /*int*/[size];
System.arraycopy(tempList, 0, list, 0, size);
return list;
}
-static boolean isBidiLang(int /*long*/ lang) {
+static boolean isBidiLang(long /*int*/ lang) {
int id = OS.PRIMARYLANGID(OS.LOWORD(lang));
return id == LANG_ARABIC || id == LANG_HEBREW || id == LANG_FARSI;
}
@@ -455,7 +455,7 @@ public static boolean isBidiPlatform() {
Callback callback = null;
try {
callback = new Callback (Class.forName (CLASS_NAME), "EnumSystemLanguageGroupsProc", 5); //$NON-NLS-1$
- int /*long*/ lpEnumSystemLanguageGroupsProc = callback.getAddress ();
+ long /*int*/ lpEnumSystemLanguageGroupsProc = callback.getAddress ();
if (lpEnumSystemLanguageGroupsProc == 0) SWT.error(SWT.ERROR_NO_MORE_CALLBACKS);
OS.EnumSystemLanguageGroups(lpEnumSystemLanguageGroupsProc, OS.LGRPID_INSTALLED, 0);
callback.dispose ();
@@ -479,7 +479,7 @@ public static boolean isBidiPlatform() {
* @return true if bidi is supported, false otherwise.
*/
public static boolean isKeyboardBidi() {
- int /*long*/[] list = getKeyboardLanguageList();
+ long /*int*/[] list = getKeyboardLanguageList();
for (int i=0; i<list.length; i++) {
if (isBidiLang(list[i])) {
return true;
@@ -493,7 +493,7 @@ public static boolean isKeyboardBidi() {
*
* @param hwnd the handle of the Control that is listening for keyboard language changes
*/
-public static void removeLanguageListener (int /*long*/ hwnd) {
+public static void removeLanguageListener (long /*int*/ hwnd) {
languageMap.remove(new LONG(hwnd));
unsubclass(hwnd);
}
@@ -512,7 +512,7 @@ public static void removeLanguageListener (Control control) {
public static void setKeyboardLanguage(int language) {
if (language == getKeyboardLanguage()) return;
boolean bidi = language == KEYBOARD_BIDI;
- int /*long*/[] list = getKeyboardLanguageList();
+ long /*int*/[] list = getKeyboardLanguageList();
for (int i=0; i<list.length; i++) {
if (bidi == isBidiLang(list[i])) {
OS.ActivateKeyboardLayout(list[i], 0);
@@ -530,7 +530,7 @@ public static void setKeyboardLanguage(int language) {
* @return true if the orientation was changed, false if the orientation
* could not be changed
*/
-public static boolean setOrientation (int /*long*/ hwnd, int orientation) {
+public static boolean setOrientation (long /*int*/ hwnd, int orientation) {
if (OS.IsWinCE) return false;
if (OS.WIN32_VERSION < OS.VERSION(4, 10)) return false;
int bits = OS.GetWindowLong (hwnd, OS.GWL_EXSTYLE);
@@ -550,10 +550,10 @@ public static boolean setOrientation (Control control, int orientation) {
*
* @param hwnd control to override the window proc of
*/
-static void subclass(int /*long*/ hwnd) {
+static void subclass(long /*int*/ hwnd) {
LONG key = new LONG(hwnd);
if (oldProcMap.get(key) == null) {
- int /*long*/ oldProc = OS.GetWindowLongPtr(hwnd, OS.GWLP_WNDPROC);
+ long /*int*/ oldProc = OS.GetWindowLongPtr(hwnd, OS.GWLP_WNDPROC);
oldProcMap.put(key, new LONG(oldProc));
OS.SetWindowLongPtr(hwnd, OS.GWLP_WNDPROC, callback.getAddress());
}
@@ -610,7 +610,7 @@ static void translateOrder(int[] orderArray, int glyphCount, boolean isRightOrie
*
* @param hwnd control to remove the window proc override for
*/
-static void unsubclass(int /*long*/ hwnd) {
+static void unsubclass(long /*int*/ hwnd) {
LONG key = new LONG(hwnd);
if (languageMap.get(key) == null && keyMap.get(key) == null) {
LONG proc = (LONG) oldProcMap.remove(key);
@@ -627,7 +627,7 @@ static void unsubclass(int /*long*/ hwnd) {
* change event
* @param msg window message
*/
-static int /*long*/ windowProc (int /*long*/ hwnd, int /*long*/ msg, int /*long*/ wParam, int /*long*/ lParam) {
+static long /*int*/ windowProc (long /*int*/ hwnd, long /*int*/ msg, long /*int*/ wParam, long /*int*/ lParam) {
LONG key = new LONG (hwnd);
switch ((int)/*64*/msg) {
case OS.WM_INPUTLANGCHANGE:
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/internal/ImageList.java b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/internal/ImageList.java
index 3f66cf741d..674137b967 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/internal/ImageList.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/internal/ImageList.java
@@ -16,7 +16,7 @@ import org.eclipse.swt.*;
import org.eclipse.swt.graphics.*;
public class ImageList {
- int /*long*/ handle;
+ long /*int*/ handle;
int style, refCount;
Image [] images;
@@ -33,7 +33,7 @@ public ImageList (int style, int width, int height) {
if (OS.COMCTL32_MAJOR >= 6) {
flags |= OS.ILC_COLOR32;
} else {
- int /*long*/ hDC = OS.GetDC (0);
+ long /*int*/ hDC = OS.GetDC (0);
int bits = OS.GetDeviceCaps (hDC, OS.BITSPIXEL);
int planes = OS.GetDeviceCaps (hDC, OS.PLANES);
OS.ReleaseDC (0, hDC);
@@ -81,13 +81,13 @@ public int addRef() {
return ++refCount;
}
-int /*long*/ copyBitmap (int /*long*/ hImage, int width, int height) {
+long /*int*/ copyBitmap (long /*int*/ hImage, int width, int height) {
BITMAP bm = new BITMAP ();
OS.GetObject (hImage, BITMAP.sizeof, bm);
- int /*long*/ hDC = OS.GetDC (0);
- int /*long*/ hdc1 = OS.CreateCompatibleDC (hDC);
+ long /*int*/ hDC = OS.GetDC (0);
+ long /*int*/ hdc1 = OS.CreateCompatibleDC (hDC);
OS.SelectObject (hdc1, hImage);
- int /*long*/ hdc2 = OS.CreateCompatibleDC (hDC);
+ long /*int*/ hdc2 = OS.CreateCompatibleDC (hDC);
/*
* Feature in Windows. If a bitmap has a 32-bit depth and any
* pixel has an alpha value different than zero, common controls
@@ -98,7 +98,7 @@ int /*long*/ copyBitmap (int /*long*/ hImage, int width, int height) {
* remove the alpha channel of opaque images by down sampling
* it to 24-bit depth.
*/
- int /*long*/ hBitmap;
+ long /*int*/ hBitmap;
if (bm.bmBitsPixel == 32 && OS.COMCTL32_MAJOR >= 6) {
BITMAPINFOHEADER bmiHeader = new BITMAPINFOHEADER();
bmiHeader.biSize = BITMAPINFOHEADER.sizeof;
@@ -130,7 +130,7 @@ int /*long*/ copyBitmap (int /*long*/ hImage, int width, int height) {
bmi[offset + 10] = (byte)((blueMask & 0xFF00) >> 8);
bmi[offset + 11] = (byte)((blueMask & 0xFF) >> 0);
}
- int /*long*/[] pBits = new int /*long*/[1];
+ long /*int*/[] pBits = new long /*int*/[1];
hBitmap = OS.CreateDIBSection(0, bmi, OS.DIB_RGB_COLORS, pBits, 0, 0);
} else {
hBitmap = OS.CreateCompatibleBitmap (hDC, width, height);
@@ -148,23 +148,23 @@ int /*long*/ copyBitmap (int /*long*/ hImage, int width, int height) {
return hBitmap;
}
-int /*long*/ copyIcon (int /*long*/ hImage, int width, int height) {
+long /*int*/ copyIcon (long /*int*/ hImage, int width, int height) {
if (OS.IsWinCE) SWT.error(SWT.ERROR_NOT_IMPLEMENTED);
- int /*long*/ hIcon = OS.CopyImage (hImage, OS.IMAGE_ICON, width, height, 0);
+ long /*int*/ hIcon = OS.CopyImage (hImage, OS.IMAGE_ICON, width, height, 0);
return hIcon != 0 ? hIcon : hImage;
}
-int /*long*/ copyWithAlpha (int /*long*/ hBitmap, int background, byte[] alphaData, int destWidth, int destHeight) {
+long /*int*/ copyWithAlpha (long /*int*/ hBitmap, int background, byte[] alphaData, int destWidth, int destHeight) {
BITMAP bm = new BITMAP ();
OS.GetObject (hBitmap, BITMAP.sizeof, bm);
int srcWidth = bm.bmWidth;
int srcHeight = bm.bmHeight;
/* Create resources */
- int /*long*/ hdc = OS.GetDC (0);
- int /*long*/ srcHdc = OS.CreateCompatibleDC (hdc);
- int /*long*/ oldSrcBitmap = OS.SelectObject (srcHdc, hBitmap);
- int /*long*/ memHdc = OS.CreateCompatibleDC (hdc);
+ long /*int*/ hdc = OS.GetDC (0);
+ long /*int*/ srcHdc = OS.CreateCompatibleDC (hdc);
+ long /*int*/ oldSrcBitmap = OS.SelectObject (srcHdc, hBitmap);
+ long /*int*/ memHdc = OS.CreateCompatibleDC (hdc);
BITMAPINFOHEADER bmiHeader = new BITMAPINFOHEADER ();
bmiHeader.biSize = BITMAPINFOHEADER.sizeof;
bmiHeader.biWidth = srcWidth;
@@ -174,10 +174,10 @@ int /*long*/ copyWithAlpha (int /*long*/ hBitmap, int background, byte[] alphaDa
bmiHeader.biCompression = OS.BI_RGB;
byte [] bmi = new byte[BITMAPINFOHEADER.sizeof];
OS.MoveMemory (bmi, bmiHeader, BITMAPINFOHEADER.sizeof);
- int /*long*/ [] pBits = new int /*long*/ [1];
- int /*long*/ memDib = OS.CreateDIBSection (0, bmi, OS.DIB_RGB_COLORS, pBits, 0, 0);
+ long /*int*/ [] pBits = new long /*int*/ [1];
+ long /*int*/ memDib = OS.CreateDIBSection (0, bmi, OS.DIB_RGB_COLORS, pBits, 0, 0);
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);
@@ -226,10 +226,10 @@ int /*long*/ copyWithAlpha (int /*long*/ hBitmap, int background, byte[] alphaDa
bmiHeader2.biCompression = OS.BI_RGB;
byte [] bmi2 = new byte[BITMAPINFOHEADER.sizeof];
OS.MoveMemory (bmi2, bmiHeader2, BITMAPINFOHEADER.sizeof);
- int /*long*/ [] pBits2 = new int /*long*/ [1];
- int /*long*/ memDib2 = OS.CreateDIBSection (0, bmi2, OS.DIB_RGB_COLORS, pBits2, 0, 0);
- int /*long*/ memHdc2 = OS.CreateCompatibleDC (hdc);
- int /*long*/ oldMemBitmap2 = OS.SelectObject (memHdc2, memDib2);
+ long /*int*/ [] pBits2 = new long /*int*/ [1];
+ long /*int*/ memDib2 = OS.CreateDIBSection (0, bmi2, OS.DIB_RGB_COLORS, pBits2, 0, 0);
+ long /*int*/ memHdc2 = OS.CreateCompatibleDC (hdc);
+ long /*int*/ oldMemBitmap2 = OS.SelectObject (memHdc2, memDib2);
if (!OS.IsWinCE) OS.SetStretchBltMode(memHdc2, OS.COLORONCOLOR);
OS.StretchBlt (memHdc2, 0, 0, destWidth, destHeight, memHdc, 0, 0, srcWidth, srcHeight, OS.SRCCOPY);
OS.SelectObject (memHdc2, oldMemBitmap2);
@@ -248,7 +248,7 @@ int /*long*/ copyWithAlpha (int /*long*/ hBitmap, int background, byte[] alphaDa
return memDib;
}
-int /*long*/ createMaskFromAlpha (ImageData data, int destWidth, int destHeight) {
+long /*int*/ createMaskFromAlpha (ImageData data, int destWidth, int destHeight) {
int srcWidth = data.width;
int srcHeight = data.height;
ImageData mask = ImageData.internal_new (srcWidth, srcHeight, 1,
@@ -260,13 +260,13 @@ int /*long*/ createMaskFromAlpha (ImageData data, int destWidth, int destHeight)
mask.setPixel (x, y, (data.alphaData [ap++] & 0xff) <= 127 ? 1 : 0);
}
}
- int /*long*/ hMask = OS.CreateBitmap (srcWidth, srcHeight, 1, 1, mask.data);
+ long /*int*/ hMask = OS.CreateBitmap (srcWidth, srcHeight, 1, 1, mask.data);
if (srcWidth != destWidth || srcHeight != destHeight) {
- int /*long*/ hdc = OS.GetDC (0);
- int /*long*/ hdc1 = OS.CreateCompatibleDC (hdc);
+ long /*int*/ hdc = OS.GetDC (0);
+ long /*int*/ hdc1 = OS.CreateCompatibleDC (hdc);
OS.SelectObject (hdc1, hMask);
- int /*long*/ hdc2 = OS.CreateCompatibleDC (hdc);
- int /*long*/ hMask2 = OS.CreateBitmap (destWidth, destHeight, 1, 1, null);
+ long /*int*/ hdc2 = OS.CreateCompatibleDC (hdc);
+ long /*int*/ hMask2 = OS.CreateBitmap (destWidth, destHeight, 1, 1, null);
OS.SelectObject (hdc2, hMask2);
if (!OS.IsWinCE) OS.SetStretchBltMode(hdc2, OS.COLORONCOLOR);
OS.StretchBlt (hdc2, 0, 0, destWidth, destHeight, hdc1, 0, 0, srcWidth, srcHeight, OS.SRCCOPY);
@@ -279,14 +279,14 @@ int /*long*/ createMaskFromAlpha (ImageData data, int destWidth, int destHeight)
return hMask;
}
-int /*long*/ createMask (int /*long*/ hBitmap, int destWidth, int destHeight, int background, int transparentPixel) {
+long /*int*/ createMask (long /*int*/ hBitmap, int destWidth, int destHeight, int background, int transparentPixel) {
BITMAP bm = new BITMAP ();
OS.GetObject (hBitmap, BITMAP.sizeof, bm);
int srcWidth = bm.bmWidth;
int srcHeight = bm.bmHeight;
- int /*long*/ hMask = OS.CreateBitmap (destWidth, destHeight, 1, 1, null);
- int /*long*/ hDC = OS.GetDC (0);
- int /*long*/ hdc1 = OS.CreateCompatibleDC (hDC);
+ long /*int*/ hMask = OS.CreateBitmap (destWidth, destHeight, 1, 1, null);
+ long /*int*/ hDC = OS.GetDC (0);
+ long /*int*/ hdc1 = OS.CreateCompatibleDC (hDC);
if (background != -1) {
OS.SelectObject (hdc1, hBitmap);
@@ -316,7 +316,7 @@ int /*long*/ createMask (int /*long*/ hBitmap, int destWidth, int destHeight, in
OS.SetBkColor (hdc1, background);
}
- int /*long*/ hdc2 = OS.CreateCompatibleDC (hDC);
+ long /*int*/ hdc2 = OS.CreateCompatibleDC (hDC);
OS.SelectObject (hdc2, hMask);
if (destWidth != srcWidth || destHeight != srcHeight) {
if (!OS.IsWinCE) OS.SetStretchBltMode (hdc2, OS.COLORONCOLOR);
@@ -329,7 +329,7 @@ int /*long*/ createMask (int /*long*/ hBitmap, int destWidth, int destHeight, in
/* Put back the original palette */
if (originalColors != null) OS.SetDIBColorTable(hdc1, 0, 1 << bm.bmBitsPixel, originalColors);
} else {
- int /*long*/ hOldBitmap = OS.SelectObject (hdc1, hMask);
+ long /*int*/ hOldBitmap = OS.SelectObject (hdc1, hMask);
OS.PatBlt (hdc1, 0, 0, destWidth, destHeight, OS.BLACKNESS);
OS.SelectObject (hdc1, hOldBitmap);
}
@@ -352,7 +352,7 @@ public int getStyle () {
return style;
}
-public int /*long*/ getHandle () {
+public long /*int*/ getHandle () {
return handle;
}
@@ -393,7 +393,7 @@ public int removeRef() {
}
void set (int index, Image image, int count) {
- int /*long*/ hImage = image.handle;
+ long /*int*/ hImage = image.handle;
int [] cx = new int [1], cy = new int [1];
OS.ImageList_GetIconSize (handle, cx, cy);
switch (image.type) {
@@ -401,7 +401,7 @@ void set (int index, Image image, int count) {
/*
* Note that the image size has to match the image list icon size.
*/
- int /*long*/ hBitmap = 0, hMask = 0;
+ long /*int*/ hBitmap = 0, hMask = 0;
ImageData data = image.getImageData ();
switch (data.getTransparencyType ()) {
case SWT.TRANSPARENCY_ALPHA:
@@ -439,7 +439,7 @@ void set (int index, Image image, int count) {
if (OS.IsWinCE) {
OS.ImageList_ReplaceIcon (handle, index == count ? -1 : index, hImage);
} else {
- int /*long*/ hIcon = copyIcon (hImage, cx [0], cy [0]);
+ long /*int*/ hIcon = copyIcon (hImage, cx [0], cy [0]);
OS.ImageList_ReplaceIcon (handle, index == count ? -1 : index, hIcon);
OS.DestroyIcon (hIcon);
}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Button.java b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Button.java
index 4b44a64e42..04b29fb7e6 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Button.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Button.java
@@ -54,10 +54,10 @@ public class Button extends Control {
static final int CHECK_WIDTH, CHECK_HEIGHT;
static final int ICON_WIDTH = 128, ICON_HEIGHT = 128;
static /*final*/ boolean COMMAND_LINK = false;
- static final int /*long*/ ButtonProc;
+ static final long /*int*/ ButtonProc;
static final TCHAR ButtonClass = new TCHAR (0, "BUTTON", true);
static {
- int /*long*/ hBitmap = OS.LoadBitmap (0, OS.OBM_CHECKBOXES);
+ long /*int*/ hBitmap = OS.LoadBitmap (0, OS.OBM_CHECKBOXES);
if (hBitmap == 0) {
CHECK_WIDTH = OS.GetSystemMetrics (OS.IsWinCE ? OS.SM_CXSMICON : OS.SM_CXVSCROLL);
CHECK_HEIGHT = OS.GetSystemMetrics (OS.IsWinCE ? OS.SM_CYSMICON : OS.SM_CYVSCROLL);
@@ -164,7 +164,7 @@ void _setImage (Image image) {
} else {
if (image2 != null) image2.dispose ();
image2 = null;
- int /*long*/ hImage = 0;
+ long /*int*/ hImage = 0;
int imageBits = 0, fImageType = 0;
if (image != null) {
switch (image.type) {
@@ -215,14 +215,14 @@ void _setImage (Image image) {
if ((style & SWT.RIGHT_TO_LEFT) != 0) {
if (!OS.IsWinCE && OS.WIN32_VERSION >= OS.VERSION (4, 10)) {
Rectangle rect = image.getBounds ();
- int /*long*/ hDC = OS.GetDC (handle);
- int /*long*/ dstHdc = OS.CreateCompatibleDC (hDC);
- int /*long*/ hBitmap = OS.CreateCompatibleBitmap (hDC, rect.width, rect.height);
- int /*long*/ oldBitmap = OS.SelectObject (dstHdc, hBitmap);
+ long /*int*/ hDC = OS.GetDC (handle);
+ long /*int*/ dstHdc = OS.CreateCompatibleDC (hDC);
+ long /*int*/ hBitmap = OS.CreateCompatibleBitmap (hDC, rect.width, rect.height);
+ long /*int*/ oldBitmap = OS.SelectObject (dstHdc, hBitmap);
OS.SetLayout (dstHdc, OS.LAYOUT_RTL);
if (fImageType == OS.IMAGE_BITMAP) {
- int /*long*/ srcHdc = OS.CreateCompatibleDC (hDC);
- int /*long*/ oldSrcBitmap = OS.SelectObject (srcHdc, hImage);
+ long /*int*/ srcHdc = OS.CreateCompatibleDC (hDC);
+ long /*int*/ oldSrcBitmap = OS.SelectObject (srcHdc, hImage);
OS.SetLayout (dstHdc, 0);
OS.BitBlt (dstHdc, 0, 0, rect.width, rect.height, srcHdc, 0, 0, OS.SRCCOPY);
OS.SelectObject (srcHdc, oldSrcBitmap);
@@ -230,8 +230,8 @@ void _setImage (Image image) {
} else {
Control control = findBackgroundControl ();
if (control == null) control = this;
- int /*long*/ newBrush = OS.CreateSolidBrush (control.getBackgroundPixel ());
- int /*long*/ oldBrush = OS.SelectObject (dstHdc, newBrush);
+ long /*int*/ newBrush = OS.CreateSolidBrush (control.getBackgroundPixel ());
+ long /*int*/ oldBrush = OS.SelectObject (dstHdc, newBrush);
OS.PatBlt (dstHdc, 0, 0, rect.width, rect.height, OS.PATCOPY);
OS.DrawIconEx (dstHdc, 0, 0, hImage, 0, 0, 0, 0, OS.DI_NORMAL);
OS.SelectObject (dstHdc, oldBrush);
@@ -338,7 +338,7 @@ public void addSelectionListener (SelectionListener listener) {
addListener (SWT.DefaultSelection,typedListener);
}
-int /*long*/ callWindowProc (int /*long*/ hwnd, int msg, int /*long*/ wParam, int /*long*/ lParam) {
+long /*int*/ callWindowProc (long /*int*/ hwnd, int msg, long /*int*/ wParam, long /*int*/ lParam) {
if (handle == 0) return 0;
return OS.CallWindowProc (ButtonProc, hwnd, msg, wParam, lParam);
}
@@ -377,9 +377,9 @@ int computeLeftMargin () {
if (image != null && text.length () != 0) {
Rectangle bounds = image.getBounds ();
margin += bounds.width + MARGIN * 2;
- int /*long*/ oldFont = 0;
- int /*long*/ hDC = OS.GetDC (handle);
- int /*long*/ newFont = OS.SendMessage (handle, OS.WM_GETFONT, 0, 0);
+ long /*int*/ oldFont = 0;
+ long /*int*/ hDC = OS.GetDC (handle);
+ long /*int*/ newFont = OS.SendMessage (handle, OS.WM_GETFONT, 0, 0);
if (newFont != 0) oldFont = OS.SelectObject (hDC, newFont);
TCHAR buffer = new TCHAR (getCodePage (), text, true);
RECT rect = new RECT ();
@@ -446,9 +446,9 @@ public Point computeSize (int wHint, int hHint, boolean changed) {
}
}
if (hasText) {
- int /*long*/ oldFont = 0;
- int /*long*/ hDC = OS.GetDC (handle);
- int /*long*/ newFont = OS.SendMessage (handle, OS.WM_GETFONT, 0, 0);
+ long /*int*/ oldFont = 0;
+ long /*int*/ hDC = OS.GetDC (handle);
+ long /*int*/ newFont = OS.SendMessage (handle, OS.WM_GETFONT, 0, 0);
if (newFont != 0) oldFont = OS.SelectObject (hDC, newFont);
TEXTMETRIC lptm = OS.IsUnicode ? (TEXTMETRIC) new TEXTMETRICW () : new TEXTMETRICA ();
OS.GetTextMetrics (hDC, lptm);
@@ -720,7 +720,7 @@ String getNameText () {
public boolean getSelection () {
checkWidget ();
if ((style & (SWT.CHECK | SWT.RADIO | SWT.TOGGLE)) == 0) return false;
- int /*long*/ flags = OS.SendMessage (handle, OS.BM_GETCHECK, 0, 0);
+ long /*int*/ flags = OS.SendMessage (handle, OS.BM_GETCHECK, 0, 0);
return flags != OS.BST_UNCHECKED;
}
@@ -886,7 +886,7 @@ public void setAlignment (int alignment) {
void setDefault (boolean value) {
if ((style & SWT.PUSH) == 0) return;
- int /*long*/ hwndShell = menuShell ().handle;
+ long /*int*/ hwndShell = menuShell ().handle;
int bits = OS.GetWindowLong (handle, OS.GWL_STYLE);
if (value) {
bits |= OS.BS_DEFPUSHBUTTON;
@@ -961,7 +961,7 @@ public void setGrayed (boolean grayed) {
checkWidget ();
if ((style & SWT.CHECK) == 0) return;
this.grayed = grayed;
- int /*long*/ flags = OS.SendMessage (handle, OS.BM_GETCHECK, 0, 0);
+ long /*int*/ flags = OS.SendMessage (handle, OS.BM_GETCHECK, 0, 0);
if (grayed) {
if (flags == OS.BST_CHECKED) updateSelection (OS.BST_INDETERMINATE);
} else {
@@ -1179,12 +1179,12 @@ TCHAR windowClass () {
return ButtonClass;
}
-int /*long*/ windowProc () {
+long /*int*/ windowProc () {
return ButtonProc;
}
-LRESULT WM_ERASEBKGND (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT WM_ERASEBKGND (long /*int*/ wParam, long /*int*/ lParam) {
LRESULT result = super.WM_ERASEBKGND (wParam, lParam);
if (result != null) return result;
/*
@@ -1206,7 +1206,7 @@ LRESULT WM_ERASEBKGND (int /*long*/ wParam, int /*long*/ lParam) {
return result;
}
-LRESULT WM_GETDLGCODE (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT WM_GETDLGCODE (long /*int*/ wParam, long /*int*/ lParam) {
LRESULT result = super.WM_GETDLGCODE (wParam, lParam);
if (result != null) return result;
if ((style & SWT.ARROW) != 0) {
@@ -1215,7 +1215,7 @@ LRESULT WM_GETDLGCODE (int /*long*/ wParam, int /*long*/ lParam) {
return result;
}
-LRESULT WM_GETOBJECT (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT WM_GETOBJECT (long /*int*/ wParam, long /*int*/ lParam) {
/*
* Ensure that there is an accessible object created for this
* control because support for radio button position in group
@@ -1227,7 +1227,7 @@ LRESULT WM_GETOBJECT (int /*long*/ wParam, int /*long*/ lParam) {
return super.WM_GETOBJECT (wParam, lParam);
}
-LRESULT WM_KILLFOCUS (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT WM_KILLFOCUS (long /*int*/ wParam, long /*int*/ lParam) {
LRESULT result = super.WM_KILLFOCUS (wParam, lParam);
if ((style & SWT.PUSH) != 0 && getDefault ()) {
menuShell ().setDefaultButton (null, false);
@@ -1235,17 +1235,17 @@ LRESULT WM_KILLFOCUS (int /*long*/ wParam, int /*long*/ lParam) {
return result;
}
-LRESULT WM_LBUTTONDOWN (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT WM_LBUTTONDOWN (long /*int*/ wParam, long /*int*/ lParam) {
if (ignoreMouse) return null;
return super.WM_LBUTTONDOWN (wParam, lParam);
}
-LRESULT WM_LBUTTONUP (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT WM_LBUTTONUP (long /*int*/ wParam, long /*int*/ lParam) {
if (ignoreMouse) return null;
return super.WM_LBUTTONUP (wParam, lParam);
}
-LRESULT WM_SETFOCUS (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT WM_SETFOCUS (long /*int*/ wParam, long /*int*/ lParam) {
/*
* Feature in Windows. When Windows sets focus to
* a radio button, it sets the WS_TABSTOP style.
@@ -1266,7 +1266,7 @@ LRESULT WM_SETFOCUS (int /*long*/ wParam, int /*long*/ lParam) {
return result;
}
-LRESULT WM_SIZE (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT WM_SIZE (long /*int*/ wParam, long /*int*/ lParam) {
LRESULT result = super.WM_SIZE (wParam, lParam);
if (result != null) return result;
if (OS.COMCTL32_MAJOR >= 6) {
@@ -1284,14 +1284,14 @@ LRESULT WM_SIZE (int /*long*/ wParam, int /*long*/ lParam) {
return result;
}
-LRESULT WM_SYSCOLORCHANGE (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT WM_SYSCOLORCHANGE (long /*int*/ wParam, long /*int*/ lParam) {
LRESULT result = super.WM_SYSCOLORCHANGE (wParam, lParam);
if (result != null) return result;
if (image2 != null) _setImage (image);
return result;
}
-LRESULT WM_UPDATEUISTATE (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT WM_UPDATEUISTATE (long /*int*/ wParam, long /*int*/ lParam) {
LRESULT result = super.WM_UPDATEUISTATE (wParam, lParam);
if (result != null) return result;
/*
@@ -1318,7 +1318,7 @@ LRESULT WM_UPDATEUISTATE (int /*long*/ wParam, int /*long*/ lParam) {
}
if (redraw) {
OS.InvalidateRect (handle, null, false);
- int /*long*/ code = OS.DefWindowProc (handle, OS.WM_UPDATEUISTATE, wParam, lParam);
+ long /*int*/ code = OS.DefWindowProc (handle, OS.WM_UPDATEUISTATE, wParam, lParam);
return new LRESULT (code);
}
}
@@ -1336,7 +1336,7 @@ LRESULT WM_UPDATEUISTATE (int /*long*/ wParam, int /*long*/ lParam) {
return result;
}
-LRESULT wmCommandChild (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT wmCommandChild (long /*int*/ wParam, long /*int*/ lParam) {
int code = OS.HIWORD (wParam);
switch (code) {
case OS.BN_CLICKED:
@@ -1357,7 +1357,7 @@ LRESULT wmCommandChild (int /*long*/ wParam, int /*long*/ lParam) {
return super.wmCommandChild (wParam, lParam);
}
-LRESULT wmColorChild (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT wmColorChild (long /*int*/ wParam, long /*int*/ lParam) {
/*
* Bug in Windows. For some reason, the HBRUSH that
* is returned from WM_CTRLCOLOR is misaligned when
@@ -1378,7 +1378,7 @@ LRESULT wmColorChild (int /*long*/ wParam, int /*long*/ lParam) {
return result;
}
-LRESULT wmDrawChild (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT wmDrawChild (long /*int*/ wParam, long /*int*/ lParam) {
if ((style & SWT.ARROW) == 0) return super.wmDrawChild (wParam, lParam);
DRAWITEMSTRUCT struct = new DRAWITEMSTRUCT ();
OS.MoveMemory (struct, lParam, DRAWITEMSTRUCT.sizeof);
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Canvas.java b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Canvas.java
index 6e50f11203..5391eaccbd 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Canvas.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Canvas.java
@@ -84,7 +84,7 @@ void clearArea (int x, int y, int width, int height) {
if (OS.IsWindowVisible (handle)) {
RECT rect = new RECT ();
OS.SetRect (rect, x, y, x + width, y + height);
- int /*long*/ hDC = OS.GetDCEx (handle, 0, OS.DCX_CACHE | OS.DCX_CLIPCHILDREN | OS.DCX_CLIPSIBLINGS);
+ long /*int*/ hDC = OS.GetDCEx (handle, 0, OS.DCX_CACHE | OS.DCX_CLIPCHILDREN | OS.DCX_CLIPSIBLINGS);
drawBackground (hDC, rect);
OS.ReleaseDC (handle, hDC);
}
@@ -328,7 +328,7 @@ TCHAR windowClass () {
return super.windowClass ();
}
-int /*long*/ windowProc (int /*long*/ hwnd, int msg, int /*long*/ wParam, int /*long*/ lParam) {
+long /*int*/ windowProc (long /*int*/ hwnd, int msg, long /*int*/ wParam, long /*int*/ lParam) {
if (msg == Display.SWT_RESTORECARET) {
if ((state & CANVAS) != 0) {
if (caret != null) {
@@ -341,7 +341,7 @@ int /*long*/ windowProc (int /*long*/ hwnd, int msg, int /*long*/ wParam, int /*
return super.windowProc (hwnd, msg, wParam, lParam);
}
-LRESULT WM_CHAR (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT WM_CHAR (long /*int*/ wParam, long /*int*/ lParam) {
LRESULT result = super.WM_CHAR (wParam, lParam);
if (result != null) return result;
if (caret != null) {
@@ -363,7 +363,7 @@ LRESULT WM_CHAR (int /*long*/ wParam, int /*long*/ lParam) {
return result;
}
-LRESULT WM_IME_COMPOSITION (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT WM_IME_COMPOSITION (long /*int*/ wParam, long /*int*/ lParam) {
if (ime != null) {
LRESULT result = ime.WM_IME_COMPOSITION (wParam, lParam);
if (result != null) return result;
@@ -389,7 +389,7 @@ LRESULT WM_IME_COMPOSITION (int /*long*/ wParam, int /*long*/ lParam) {
lpCompForm.dwStyle = OS.CFS_POINT;
lpCompForm.x = ptCurrentPos.x;
lpCompForm.y = ptCurrentPos.y;
- int /*long*/ hIMC = OS.ImmGetContext (handle);
+ long /*int*/ hIMC = OS.ImmGetContext (handle);
OS.ImmSetCompositionWindow (hIMC, lpCompForm);
OS.ImmReleaseContext (handle, hIMC);
}
@@ -400,7 +400,7 @@ LRESULT WM_IME_COMPOSITION (int /*long*/ wParam, int /*long*/ lParam) {
return super.WM_IME_COMPOSITION (wParam, lParam);
}
-LRESULT WM_IME_COMPOSITION_START (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT WM_IME_COMPOSITION_START (long /*int*/ wParam, long /*int*/ lParam) {
if (ime != null) {
LRESULT result = ime.WM_IME_COMPOSITION_START (wParam, lParam);
if (result != null) return result;
@@ -408,7 +408,7 @@ LRESULT WM_IME_COMPOSITION_START (int /*long*/ wParam, int /*long*/ lParam) {
return super.WM_IME_COMPOSITION_START (wParam, lParam);
}
-LRESULT WM_IME_ENDCOMPOSITION (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT WM_IME_ENDCOMPOSITION (long /*int*/ wParam, long /*int*/ lParam) {
if (ime != null) {
LRESULT result = ime.WM_IME_ENDCOMPOSITION (wParam, lParam);
if (result != null) return result;
@@ -416,7 +416,7 @@ LRESULT WM_IME_ENDCOMPOSITION (int /*long*/ wParam, int /*long*/ lParam) {
return super.WM_IME_ENDCOMPOSITION (wParam, lParam);
}
-LRESULT WM_INPUTLANGCHANGE (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT WM_INPUTLANGCHANGE (long /*int*/ wParam, long /*int*/ lParam) {
LRESULT result = super.WM_INPUTLANGCHANGE (wParam, lParam);
if (caret != null && caret.isFocusCaret ()) {
caret.setIMEFont ();
@@ -425,7 +425,7 @@ LRESULT WM_INPUTLANGCHANGE (int /*long*/ wParam, int /*long*/ lParam) {
return result;
}
-LRESULT WM_KILLFOCUS (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT WM_KILLFOCUS (long /*int*/ wParam, long /*int*/ lParam) {
if (ime != null) {
LRESULT result = ime.WM_KILLFOCUS (wParam, lParam);
if (result != null) return result;
@@ -436,7 +436,7 @@ LRESULT WM_KILLFOCUS (int /*long*/ wParam, int /*long*/ lParam) {
return result;
}
-LRESULT WM_LBUTTONDOWN (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT WM_LBUTTONDOWN (long /*int*/ wParam, long /*int*/ lParam) {
if (ime != null) {
LRESULT result = ime.WM_LBUTTONDOWN (wParam, lParam);
if (result != null) return result;
@@ -444,19 +444,19 @@ LRESULT WM_LBUTTONDOWN (int /*long*/ wParam, int /*long*/ lParam) {
return super.WM_LBUTTONDOWN (wParam, lParam);
}
-LRESULT WM_SETFOCUS (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT WM_SETFOCUS (long /*int*/ wParam, long /*int*/ lParam) {
LRESULT result = super.WM_SETFOCUS (wParam, lParam);
if (caret != null && caret.isFocusCaret ()) caret.setFocus ();
return result;
}
-LRESULT WM_SIZE (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT WM_SIZE (long /*int*/ wParam, long /*int*/ lParam) {
LRESULT result = super.WM_SIZE (wParam, lParam);
if (caret != null && caret.isFocusCaret ()) caret.resizeIME ();
return result;
}
-LRESULT WM_WINDOWPOSCHANGED (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT WM_WINDOWPOSCHANGED (long /*int*/ wParam, long /*int*/ lParam) {
LRESULT result = super.WM_WINDOWPOSCHANGED (wParam, lParam);
//if (result != null) return result;
/*
@@ -471,7 +471,7 @@ LRESULT WM_WINDOWPOSCHANGED (int /*long*/ wParam, int /*long*/ lParam) {
return result;
}
-LRESULT WM_WINDOWPOSCHANGING (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT WM_WINDOWPOSCHANGING (long /*int*/ wParam, long /*int*/ lParam) {
LRESULT result = super.WM_WINDOWPOSCHANGING (wParam, lParam);
if (result != null) return result;
/*
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Caret.java b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Caret.java
index 890eee4bc1..60f497a1d3 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Caret.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Caret.java
@@ -84,10 +84,10 @@ void createWidget () {
}
}
-int /*long*/ defaultFont () {
- int /*long*/ hwnd = parent.handle;
- int /*long*/ hwndIME = OS.ImmGetDefaultIMEWnd (hwnd);
- int /*long*/ hFont = 0;
+long /*int*/ defaultFont () {
+ long /*int*/ hwnd = parent.handle;
+ long /*int*/ hwndIME = OS.ImmGetDefaultIMEWnd (hwnd);
+ long /*int*/ hFont = 0;
if (hwndIME != 0) {
hFont = OS.SendMessage (hwndIME, OS.WM_GETFONT, 0, 0);
}
@@ -138,7 +138,7 @@ public Rectangle getBounds () {
public Font getFont () {
checkWidget();
if (font == null) {
- int /*long*/ hFont = defaultFont ();
+ long /*int*/ hFont = defaultFont ();
return Font.win32_new (display, hFont);
}
return font;
@@ -280,8 +280,8 @@ void resizeIME () {
if (!OS.IsDBLocale) return;
POINT ptCurrentPos = new POINT ();
if (!OS.GetCaretPos (ptCurrentPos)) return;
- int /*long*/ hwnd = parent.handle;
- int /*long*/ hIMC = OS.ImmGetContext (hwnd);
+ long /*int*/ hwnd = parent.handle;
+ long /*int*/ hIMC = OS.ImmGetContext (hwnd);
IME ime = parent.getIME ();
if (ime != null && ime.isInlineEnabled ()) {
Point size = getSize ();
@@ -322,9 +322,9 @@ void releaseWidget () {
void resize () {
resized = false;
- int /*long*/ hwnd = parent.handle;
+ long /*int*/ hwnd = parent.handle;
OS.DestroyCaret ();
- int /*long*/ hBitmap = image != null ? image.handle : 0;
+ long /*int*/ hBitmap = image != null ? image.handle : 0;
int width = this.width;
if (!OS.IsWinCE && image == null && width == 0) {
int [] buffer = new int [1];
@@ -341,8 +341,8 @@ void resize () {
void restoreIMEFont () {
if (!OS.IsDBLocale) return;
if (oldFont == null) return;
- int /*long*/ hwnd = parent.handle;
- int /*long*/ hIMC = OS.ImmGetContext (hwnd);
+ long /*int*/ hwnd = parent.handle;
+ long /*int*/ hIMC = OS.ImmGetContext (hwnd);
OS.ImmSetCompositionFont (hIMC, oldFont);
OS.ImmReleaseContext (hwnd, hIMC);
oldFont = null;
@@ -401,8 +401,8 @@ public void setBounds (Rectangle rect) {
}
void setFocus () {
- int /*long*/ hwnd = parent.handle;
- int /*long*/ hBitmap = 0;
+ long /*int*/ hwnd = parent.handle;
+ long /*int*/ hBitmap = 0;
if (image != null) hBitmap = image.handle;
int width = this.width;
if (!OS.IsWinCE && image == null && width == 0) {
@@ -467,11 +467,11 @@ public void setImage (Image image) {
void setIMEFont () {
if (!OS.IsDBLocale) return;
- int /*long*/ hFont = 0;
+ long /*int*/ hFont = 0;
if (font != null) hFont = font.handle;
if (hFont == 0) hFont = defaultFont ();
- int /*long*/ hwnd = parent.handle;
- int /*long*/ hIMC = OS.ImmGetContext (hwnd);
+ long /*int*/ hwnd = parent.handle;
+ long /*int*/ hIMC = OS.ImmGetContext (hwnd);
/* Save the current IME font */
if (oldFont == null) {
oldFont = OS.IsUnicode ? (LOGFONT) new LOGFONTW () : new LOGFONTA ();
@@ -582,7 +582,7 @@ public void setVisible (boolean visible) {
checkWidget();
if (visible == isVisible) return;
isVisible = visible;
- int /*long*/ hwnd = parent.handle;
+ long /*int*/ hwnd = parent.handle;
if (OS.GetFocus () != hwnd) return;
if (!isVisible) {
OS.HideCaret (hwnd);
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/ColorDialog.java b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/ColorDialog.java
index 42b641ab22..f98d0c32d6 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/ColorDialog.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/ColorDialog.java
@@ -96,7 +96,7 @@ public ColorDialog (Shell parent, int style) {
checkSubclass ();
}
-int /*long*/ CCHookProc (int /*long*/ hdlg, int /*long*/ uiMsg, int /*long*/ lParam, int /*long*/ lpData) {
+long /*int*/ CCHookProc (long /*int*/ hdlg, long /*int*/ uiMsg, long /*int*/ lParam, long /*int*/ lpData) {
switch ((int)/*64*/uiMsg) {
case OS.WM_INITDIALOG: {
RECT rect = new RECT ();
@@ -168,8 +168,8 @@ public RGB[] getRGBs() {
public RGB open () {
/* Get the owner HWND for the dialog */
- int /*long*/ hwndOwner = parent.handle;
- int /*long*/ hwndParent = parent.handle;
+ long /*int*/ hwndOwner = parent.handle;
+ long /*int*/ hwndParent = parent.handle;
/*
* Feature in Windows. There is no API to set the orientation of a
@@ -201,13 +201,13 @@ public RGB open () {
/* Create the CCHookProc */
Callback callback = new Callback (this, "CCHookProc", 4); //$NON-NLS-1$
- int /*long*/ lpfnHook = callback.getAddress ();
+ long /*int*/ lpfnHook = callback.getAddress ();
if (lpfnHook == 0) error(SWT.ERROR_NO_MORE_CALLBACKS);
/* Allocate the Custom Colors and initialize to white */
display = parent.display;
if (display.lpCustColors == 0) {
- int /*long*/ hHeap = OS.GetProcessHeap ();
+ long /*int*/ hHeap = OS.GetProcessHeap ();
display.lpCustColors = OS.HeapAlloc (hHeap, OS.HEAP_ZERO_MEMORY, CUSTOM_COLOR_COUNT * 4);
for (int i=0; i < CUSTOM_COLOR_COUNT; i++) {
colors[i] = 0x00FFFFFF;
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Combo.java b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Combo.java
index 151a99a213..b4260ccfd1 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Combo.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Combo.java
@@ -60,7 +60,7 @@ import org.eclipse.swt.events.*;
public class Combo extends Composite {
boolean noSelection, ignoreDefaultSelection, ignoreCharacter, ignoreModify, ignoreResize, lockText;
int scrollWidth, visibleCount;
- int /*long*/ cbtHook;
+ long /*int*/ cbtHook;
static final int VISIBLE_COUNT = 5;
@@ -87,9 +87,9 @@ public class Combo extends Composite {
*/
static final int CBID_LIST = 1000;
static final int CBID_EDIT = 1001;
- static /*final*/ int /*long*/ EditProc, ListProc;
+ static /*final*/ long /*int*/ EditProc, ListProc;
- static final int /*long*/ ComboProc;
+ static final long /*int*/ ComboProc;
static final TCHAR ComboClass = new TCHAR (0, "COMBOBOX", true);
static {
WNDCLASS lpWndClass = new WNDCLASS ();
@@ -283,7 +283,7 @@ public void addVerifyListener (VerifyListener listener) {
addListener (SWT.Verify, typedListener);
}
-int /*long*/ callWindowProc (int /*long*/ hwnd, int msg, int /*long*/ wParam, int /*long*/ lParam) {
+long /*int*/ callWindowProc (long /*int*/ hwnd, int msg, long /*int*/ wParam, long /*int*/ lParam) {
if (handle == 0) return 0;
if (hwnd == handle) {
switch (msg) {
@@ -291,7 +291,7 @@ int /*long*/ callWindowProc (int /*long*/ hwnd, int msg, int /*long*/ wParam, in
ignoreResize = true;
boolean oldLockText = lockText;
if ((style & SWT.READ_ONLY) == 0) lockText = true;
- int /*long*/ result = OS.CallWindowProc (ComboProc, hwnd, msg, wParam, lParam);
+ long /*int*/ result = OS.CallWindowProc (ComboProc, hwnd, msg, wParam, lParam);
if ((style & SWT.READ_ONLY) == 0) lockText = oldLockText;
ignoreResize = false;
return result;
@@ -299,30 +299,30 @@ int /*long*/ callWindowProc (int /*long*/ hwnd, int msg, int /*long*/ wParam, in
}
return OS.CallWindowProc (ComboProc, hwnd, msg, wParam, lParam);
}
- int /*long*/ hwndText = OS.GetDlgItem (handle, CBID_EDIT);
+ long /*int*/ hwndText = OS.GetDlgItem (handle, CBID_EDIT);
if (hwnd == hwndText) {
if (lockText && msg == OS.WM_SETTEXT) {
- int /*long*/ hHeap = OS.GetProcessHeap ();
+ long /*int*/ hHeap = OS.GetProcessHeap ();
int length = OS.GetWindowTextLength (handle);
TCHAR buffer = new TCHAR (getCodePage (), length + 1);
OS.GetWindowText (handle, buffer, length + 1);
int byteCount = buffer.length () * TCHAR.sizeof;
- int /*long*/ pszText = OS.HeapAlloc (hHeap, OS.HEAP_ZERO_MEMORY, byteCount);
+ long /*int*/ pszText = OS.HeapAlloc (hHeap, OS.HEAP_ZERO_MEMORY, byteCount);
OS.MoveMemory (pszText, buffer, byteCount);
- int /*long*/ code = OS.CallWindowProc (EditProc, hwndText, msg, wParam, pszText);
+ long /*int*/ code = OS.CallWindowProc (EditProc, hwndText, msg, wParam, pszText);
OS.HeapFree (hHeap, 0, pszText);
return code;
}
return OS.CallWindowProc (EditProc, hwnd, msg, wParam, lParam);
}
- int /*long*/ hwndList = OS.GetDlgItem (handle, CBID_LIST);
+ long /*int*/ hwndList = OS.GetDlgItem (handle, CBID_LIST);
if (hwnd == hwndList) {
return OS.CallWindowProc (ListProc, hwnd, msg, wParam, lParam);
}
return OS.DefWindowProc (hwnd, msg, wParam, lParam);
}
-int /*long*/ CBTProc (int /*long*/ nCode, int /*long*/ wParam, int /*long*/ lParam) {
+long /*int*/ CBTProc (long /*int*/ nCode, long /*int*/ wParam, long /*int*/ lParam) {
if ((int)/*64*/nCode == OS.HCBT_CREATEWND) {
TCHAR buffer = new TCHAR (0, 128);
OS.GetClassName (wParam, buffer, buffer.length ());
@@ -335,7 +335,7 @@ int /*long*/ CBTProc (int /*long*/ nCode, int /*long*/ wParam, int /*long*/ lPar
return OS.CallNextHookEx (cbtHook, (int)/*64*/nCode, wParam, lParam);
}
-boolean checkHandle (int /*long*/ hwnd) {
+boolean checkHandle (long /*int*/ hwnd) {
return hwnd == handle || hwnd == OS.GetDlgItem (handle, CBID_EDIT) || hwnd == OS.GetDlgItem (handle, CBID_LIST);
}
@@ -397,8 +397,8 @@ public Point computeSize (int wHint, int hHint, boolean changed) {
checkWidget ();
int width = 0, height = 0;
if (wHint == SWT.DEFAULT) {
- int /*long*/ newFont, oldFont = 0;
- int /*long*/ hDC = OS.GetDC (handle);
+ long /*int*/ newFont, oldFont = 0;
+ long /*int*/ hDC = OS.GetDC (handle);
newFont = OS.SendMessage (handle, OS.WM_GETFONT, 0, 0);
if (newFont != 0) oldFont = OS.SelectObject (hDC, newFont);
int count = (int)/*64*/OS.SendMessage (handle, OS.CB_GETCOUNT, 0, 0);
@@ -443,9 +443,9 @@ public Point computeSize (int wHint, int hHint, boolean changed) {
if ((style & SWT.READ_ONLY) != 0) {
width += 8;
} else {
- int /*long*/ hwndText = OS.GetDlgItem (handle, CBID_EDIT);
+ long /*int*/ hwndText = OS.GetDlgItem (handle, CBID_EDIT);
if (hwndText != 0) {
- int /*long*/ margins = OS.SendMessage (hwndText, OS.EM_GETMARGINS, 0, 0);
+ long /*int*/ margins = OS.SendMessage (hwndText, OS.EM_GETMARGINS, 0, 0);
int marginWidth = OS.LOWORD (margins) + OS.HIWORD (margins);
width += marginWidth + 3;
}
@@ -505,7 +505,7 @@ void createHandle () {
} else {
int threadId = OS.GetCurrentThreadId ();
Callback cbtCallback = new Callback (this, "CBTProc", 3); //$NON-NLS-1$
- int /*long*/ cbtProc = cbtCallback.getAddress ();
+ long /*int*/ cbtProc = cbtCallback.getAddress ();
if (cbtProc == 0) error (SWT.ERROR_NO_MORE_CALLBACKS);
cbtHook = OS.SetWindowsHookEx (OS.WH_CBT, cbtProc, 0, threadId);
super.createHandle ();
@@ -516,11 +516,11 @@ void createHandle () {
state &= ~(CANVAS | THEME_BACKGROUND);
/* Get the text and list window procs */
- int /*long*/ hwndText = OS.GetDlgItem (handle, CBID_EDIT);
+ long /*int*/ hwndText = OS.GetDlgItem (handle, CBID_EDIT);
if (hwndText != 0 && EditProc == 0) {
EditProc = OS.GetWindowLongPtr (hwndText, OS.GWLP_WNDPROC);
}
- int /*long*/ hwndList = OS.GetDlgItem (handle, CBID_LIST);
+ long /*int*/ hwndList = OS.GetDlgItem (handle, CBID_LIST);
if (hwndList != 0 && ListProc == 0) {
ListProc = OS.GetWindowLongPtr (hwndList, OS.GWLP_WNDPROC);
}
@@ -550,7 +550,7 @@ void createWidget() {
OS.SystemParametersInfo (OS.SPI_GETWORKAREA, 0, rect, 0);
maxHeight = (rect.bottom - rect.top) / 3;
} else {
- int /*long*/ hmonitor = OS.MonitorFromWindow (handle, OS.MONITOR_DEFAULTTONEAREST);
+ long /*int*/ hmonitor = OS.MonitorFromWindow (handle, OS.MONITOR_DEFAULTTONEAREST);
MONITORINFO lpmi = new MONITORINFO ();
lpmi.cbSize = MONITORINFO.sizeof;
OS.GetMonitorInfo (hmonitor, lpmi);
@@ -587,9 +587,9 @@ int defaultBackground () {
void deregister () {
super.deregister ();
- int /*long*/ hwndText = OS.GetDlgItem (handle, CBID_EDIT);
+ long /*int*/ hwndText = OS.GetDlgItem (handle, CBID_EDIT);
if (hwndText != 0) display.removeControl (hwndText);
- int /*long*/ hwndList = OS.GetDlgItem (handle, CBID_LIST);
+ long /*int*/ hwndList = OS.GetDlgItem (handle, CBID_LIST);
if (hwndList != 0) display.removeControl (hwndList);
}
@@ -635,14 +635,14 @@ public void deselectAll () {
// widget could be disposed at this point
}
-boolean dragDetect (int /*long*/ hwnd, int x, int y, boolean filter, boolean [] detect, boolean [] consume) {
+boolean dragDetect (long /*int*/ hwnd, int x, int y, boolean filter, boolean [] detect, boolean [] consume) {
if (filter && (style & SWT.READ_ONLY) == 0) {
- int /*long*/ hwndText = OS.GetDlgItem (handle, CBID_EDIT);
+ long /*int*/ hwndText = OS.GetDlgItem (handle, CBID_EDIT);
if (hwndText != 0) {
int [] start = new int [1], end = new int [1];
OS.SendMessage (handle, OS.CB_GETEDITSEL, start, end);
if (start [0] != end [0]) {
- int /*long*/ lParam = OS.MAKELPARAM (x, y);
+ long /*int*/ lParam = OS.MAKELPARAM (x, y);
int position = OS.LOWORD (OS.SendMessage (hwndText, OS.EM_CHARFROMPOS, 0, lParam));
if (start [0] <= position && position < end [0]) {
if (super.dragDetect (hwnd, x, y, filter, detect, consume)) {
@@ -684,8 +684,8 @@ public Point getCaretLocation () {
* pixel coordinates (0,0).
*/
int position = getCaretPosition ();
- int /*long*/ hwndText = OS.GetDlgItem (handle, CBID_EDIT);
- int /*long*/ caretPos = OS.SendMessage (hwndText, OS.EM_POSFROMCHAR, position, 0);
+ long /*int*/ hwndText = OS.GetDlgItem (handle, CBID_EDIT);
+ long /*int*/ caretPos = OS.SendMessage (hwndText, OS.EM_POSFROMCHAR, position, 0);
if (caretPos == -1) {
caretPos = 0;
if (position >= OS.GetWindowTextLength (hwndText)) {
@@ -739,7 +739,7 @@ public Point getCaretLocation () {
public int getCaretPosition () {
checkWidget ();
int [] start = new int [1], end = new int [1];
- int /*long*/ hwndText = OS.GetDlgItem (handle, CBID_EDIT);
+ long /*int*/ hwndText = OS.GetDlgItem (handle, CBID_EDIT);
OS.SendMessage (hwndText, OS.EM_GETSEL, start, end);
/*
* In Windows, there is no API to get the position of the caret
@@ -761,9 +761,9 @@ public int getCaretPosition () {
if (lpgui.hwndCaret == hwndText || lpgui.hwndCaret == 0) {
POINT ptCurrentPos = new POINT ();
if (OS.GetCaretPos (ptCurrentPos)) {
- int /*long*/ endPos = OS.SendMessage (hwndText, OS.EM_POSFROMCHAR, end [0], 0);
+ long /*int*/ endPos = OS.SendMessage (hwndText, OS.EM_POSFROMCHAR, end [0], 0);
if (endPos == -1) {
- int /*long*/ startPos = OS.SendMessage (hwndText, OS.EM_POSFROMCHAR, start [0], 0);
+ long /*int*/ startPos = OS.SendMessage (hwndText, OS.EM_POSFROMCHAR, start [0], 0);
int startX = OS.GET_X_LPARAM (startPos);
if (ptCurrentPos.x > startX) caret = end [0];
} else {
@@ -1050,7 +1050,7 @@ public int getTextHeight () {
*/
public int getTextLimit () {
checkWidget ();
- int /*long*/ hwndText = OS.GetDlgItem (handle, CBID_EDIT);
+ long /*int*/ hwndText = OS.GetDlgItem (handle, CBID_EDIT);
if (hwndText == 0) return LIMIT;
return (int)/*64*/OS.SendMessage (hwndText, OS.EM_GETLIMITTEXT, 0, 0) & 0x7FFFFFFF;
}
@@ -1078,12 +1078,12 @@ public int getVisibleItemCount () {
}
boolean hasFocus () {
- int /*long*/ hwndFocus = OS.GetFocus ();
+ long /*int*/ hwndFocus = OS.GetFocus ();
if (hwndFocus == handle) return true;
if (hwndFocus == 0) return false;
- int /*long*/ hwndText = OS.GetDlgItem (handle, CBID_EDIT);
+ long /*int*/ hwndText = OS.GetDlgItem (handle, CBID_EDIT);
if (hwndFocus == hwndText) return true;
- int /*long*/ hwndList = OS.GetDlgItem (handle, CBID_LIST);
+ long /*int*/ hwndList = OS.GetDlgItem (handle, CBID_LIST);
if (hwndFocus == hwndList) return true;
return false;
}
@@ -1161,7 +1161,7 @@ public int indexOf (String string, int start) {
int mbcsToWcsPos (int mbcsPos) {
if (mbcsPos <= 0) return 0;
if (OS.IsUnicode) return mbcsPos;
- int /*long*/ hwndText = OS.GetDlgItem (handle, CBID_EDIT);
+ long /*int*/ hwndText = OS.GetDlgItem (handle, CBID_EDIT);
if (hwndText == 0) return mbcsPos;
int mbcsSize = OS.GetWindowTextLengthA (hwndText);
if (mbcsSize == 0) return 0;
@@ -1193,9 +1193,9 @@ public void paste () {
void register () {
super.register ();
- int /*long*/ hwndText = OS.GetDlgItem (handle, CBID_EDIT);
+ long /*int*/ hwndText = OS.GetDlgItem (handle, CBID_EDIT);
if (hwndText != 0) display.addControl (hwndText, this);
- int /*long*/ hwndList = OS.GetDlgItem (handle, CBID_LIST);
+ long /*int*/ hwndList = OS.GetDlgItem (handle, CBID_LIST);
if (hwndList != 0) display.addControl (hwndList, this);
}
@@ -1285,7 +1285,7 @@ public void remove (int start, int end) {
}
int textLength = OS.GetWindowTextLength (handle);
RECT rect = null;
- int /*long*/ hDC = 0, oldFont = 0, newFont = 0;
+ long /*int*/ hDC = 0, oldFont = 0, newFont = 0;
int newWidth = 0;
if ((style & SWT.H_SCROLL) != 0) {
rect = new RECT ();
@@ -1449,7 +1449,7 @@ public void removeVerifyListener (VerifyListener listener) {
eventTable.unhook (SWT.Verify, listener);
}
-boolean sendKeyEvent (int type, int msg, int /*long*/ wParam, int /*long*/ lParam, Event event) {
+boolean sendKeyEvent (int type, int msg, long /*int*/ wParam, long /*int*/ lParam, Event event) {
if (!super.sendKeyEvent (type, msg, wParam, lParam, event)) {
return false;
}
@@ -1490,7 +1490,7 @@ boolean sendKeyEvent (int type, int msg, int /*long*/ wParam, int /*long*/ lPara
/* Verify the character */
String oldText = "";
int [] start = new int [1], end = new int [1];
- int /*long*/ hwndText = OS.GetDlgItem (handle, CBID_EDIT);
+ long /*int*/ hwndText = OS.GetDlgItem (handle, CBID_EDIT);
if (hwndText == 0) return true;
OS.SendMessage (hwndText, OS.EM_GETSEL, start, end);
switch (key) {
@@ -1562,19 +1562,19 @@ public void select (int index) {
}
}
-void setBackgroundImage (int /*long*/ hBitmap) {
+void setBackgroundImage (long /*int*/ hBitmap) {
super.setBackgroundImage (hBitmap);
- int /*long*/ hwndText = OS.GetDlgItem (handle, CBID_EDIT);
+ long /*int*/ hwndText = OS.GetDlgItem (handle, CBID_EDIT);
if (hwndText != 0) OS.InvalidateRect (hwndText, null, true);
- int /*long*/ hwndList = OS.GetDlgItem (handle, CBID_LIST);
+ long /*int*/ hwndList = OS.GetDlgItem (handle, CBID_LIST);
if (hwndList != 0) OS.InvalidateRect (hwndList, null, true);
}
void setBackgroundPixel (int pixel) {
super.setBackgroundPixel (pixel);
- int /*long*/ hwndText = OS.GetDlgItem (handle, CBID_EDIT);
+ long /*int*/ hwndText = OS.GetDlgItem (handle, CBID_EDIT);
if (hwndText != 0) OS.InvalidateRect (hwndText, null, true);
- int /*long*/ hwndList = OS.GetDlgItem (handle, CBID_LIST);
+ long /*int*/ hwndList = OS.GetDlgItem (handle, CBID_LIST);
if (hwndList != 0) OS.InvalidateRect (hwndList, null, true);
}
@@ -1647,9 +1647,9 @@ public void setFont (Font font) {
void setForegroundPixel (int pixel) {
super.setForegroundPixel (pixel);
- int /*long*/ hwndText = OS.GetDlgItem (handle, CBID_EDIT);
+ long /*int*/ hwndText = OS.GetDlgItem (handle, CBID_EDIT);
if (hwndText != 0) OS.InvalidateRect (hwndText, null, true);
- int /*long*/ hwndList = OS.GetDlgItem (handle, CBID_LIST);
+ long /*int*/ hwndList = OS.GetDlgItem (handle, CBID_LIST);
if (hwndList != 0) OS.InvalidateRect (hwndList, null, true);
}
@@ -1700,7 +1700,7 @@ public void setItems (String [] items) {
if (items [i] == null) error (SWT.ERROR_INVALID_ARGUMENT);
}
RECT rect = null;
- int /*long*/ hDC = 0, oldFont = 0, newFont = 0;
+ long /*int*/ hDC = 0, oldFont = 0, newFont = 0;
int newWidth = 0;
if ((style & SWT.H_SCROLL) != 0) {
rect = new RECT ();
@@ -1753,8 +1753,8 @@ public void setOrientation (int orientation) {
void setScrollWidth () {
int newWidth = 0;
RECT rect = new RECT ();
- int /*long*/ newFont, oldFont = 0;
- int /*long*/ hDC = OS.GetDC (handle);
+ long /*int*/ newFont, oldFont = 0;
+ long /*int*/ hDC = OS.GetDC (handle);
newFont = OS.SendMessage (handle, OS.WM_GETFONT, 0, 0);
if (newFont != 0) oldFont = OS.SelectObject (hDC, newFont);
int cp = getCodePage ();
@@ -1791,7 +1791,7 @@ void setScrollWidth (int scrollWidth) {
OS.SystemParametersInfo (OS.SPI_GETWORKAREA, 0, rect, 0);
maxWidth = (rect.right - rect.left) / 4;
} else {
- int /*long*/ hmonitor = OS.MonitorFromWindow (handle, OS.MONITOR_DEFAULTTONEAREST);
+ long /*int*/ hmonitor = OS.MonitorFromWindow (handle, OS.MONITOR_DEFAULTTONEAREST);
MONITORINFO lpmi = new MONITORINFO ();
lpmi.cbSize = MONITORINFO.sizeof;
OS.GetMonitorInfo (hmonitor, lpmi);
@@ -1823,8 +1823,8 @@ void setScrollWidth (int scrollWidth) {
void setScrollWidth (TCHAR buffer, boolean grow) {
RECT rect = new RECT ();
- int /*long*/ newFont, oldFont = 0;
- int /*long*/ hDC = OS.GetDC (handle);
+ long /*int*/ newFont, oldFont = 0;
+ long /*int*/ hDC = OS.GetDC (handle);
newFont = OS.SendMessage (handle, OS.WM_GETFONT, 0, 0);
if (newFont != 0) oldFont = OS.SelectObject (hDC, newFont);
int flags = OS.DT_CALCRECT | OS.DT_SINGLELINE | OS.DT_NOPREFIX;
@@ -1868,7 +1868,7 @@ public void setSelection (Point selection) {
start = wcsToMbcsPos (start);
end = wcsToMbcsPos (end);
}
- int /*long*/ bits = OS.MAKELPARAM (start, end);
+ long /*int*/ bits = OS.MAKELPARAM (start, end);
OS.SendMessage (handle, OS.CB_SETEDITSEL, 0, bits);
}
@@ -1906,7 +1906,7 @@ public void setText (String string) {
return;
}
int limit = LIMIT;
- int /*long*/ hwndText = OS.GetDlgItem (handle, CBID_EDIT);
+ long /*int*/ hwndText = OS.GetDlgItem (handle, CBID_EDIT);
if (hwndText != 0) {
limit = (int)/*64*/OS.SendMessage (hwndText, OS.EM_GETLIMITTEXT, 0, 0) & 0x7FFFFFFF;
}
@@ -1945,8 +1945,8 @@ public void setTextLimit (int limit) {
}
void setToolTipText (Shell shell, String string) {
- int /*long*/ hwndText = OS.GetDlgItem (handle, CBID_EDIT);
- int /*long*/ hwndList = OS.GetDlgItem (handle, CBID_LIST);
+ long /*int*/ hwndText = OS.GetDlgItem (handle, CBID_EDIT);
+ long /*int*/ hwndList = OS.GetDlgItem (handle, CBID_LIST);
if (hwndText != 0) shell.setToolTipText (hwndText, string);
if (hwndList != 0) shell.setToolTipText (hwndList, string);
shell.setToolTipText (handle, string);
@@ -1978,12 +1978,12 @@ public void setVisibleItemCount (int count) {
void subclass () {
super.subclass ();
- int /*long*/ newProc = display.windowProc;
- int /*long*/ hwndText = OS.GetDlgItem (handle, CBID_EDIT);
+ long /*int*/ newProc = display.windowProc;
+ long /*int*/ hwndText = OS.GetDlgItem (handle, CBID_EDIT);
if (hwndText != 0) {
OS.SetWindowLongPtr (hwndText, OS.GWLP_WNDPROC, newProc);
}
- int /*long*/ hwndList = OS.GetDlgItem (handle, CBID_LIST);
+ long /*int*/ hwndList = OS.GetDlgItem (handle, CBID_LIST);
if (hwndList != 0) {
OS.SetWindowLongPtr (hwndList, OS.GWLP_WNDPROC, newProc);
}
@@ -2029,11 +2029,11 @@ boolean traverseReturn () {
void unsubclass () {
super.unsubclass ();
- int /*long*/ hwndText = OS.GetDlgItem (handle, CBID_EDIT);
+ long /*int*/ hwndText = OS.GetDlgItem (handle, CBID_EDIT);
if (hwndText != 0 && EditProc != 0) {
OS.SetWindowLongPtr (hwndText, OS.GWLP_WNDPROC, EditProc);
}
- int /*long*/ hwndList = OS.GetDlgItem (handle, CBID_LIST);
+ long /*int*/ hwndList = OS.GetDlgItem (handle, CBID_LIST);
if (hwndList != 0 && ListProc != 0) {
OS.SetWindowLongPtr (hwndList, OS.GWLP_WNDPROC, ListProc);
}
@@ -2068,7 +2068,7 @@ void updateOrientation () {
bits &= ~OS.WS_EX_LAYOUTRTL;
}
OS.SetWindowLong (handle, OS.GWL_EXSTYLE, bits);
- int /*long*/ hwndText = 0, hwndList = 0;
+ long /*int*/ hwndText = 0, hwndList = 0;
COMBOBOXINFO pcbi = new COMBOBOXINFO ();
pcbi.cbSize = COMBOBOXINFO.sizeof;
if (OS.GetComboBoxInfo (handle, pcbi)) {
@@ -2145,7 +2145,7 @@ String verifyText (String string, int start, int end, Event keyEvent) {
int wcsToMbcsPos (int wcsPos) {
if (wcsPos <= 0) return 0;
if (OS.IsUnicode) return wcsPos;
- int /*long*/ hwndText = OS.GetDlgItem (handle, CBID_EDIT);
+ long /*int*/ hwndText = OS.GetDlgItem (handle, CBID_EDIT);
if (hwndText == 0) return wcsPos;
int mbcsSize = OS.GetWindowTextLengthA (hwndText);
if (mbcsSize == 0) return 0;
@@ -2175,15 +2175,15 @@ TCHAR windowClass () {
return ComboClass;
}
-int /*long*/ windowProc () {
+long /*int*/ windowProc () {
return ComboProc;
}
-int /*long*/ windowProc (int /*long*/ hwnd, int msg, int /*long*/ wParam, int /*long*/ lParam) {
+long /*int*/ windowProc (long /*int*/ hwnd, int msg, long /*int*/ wParam, long /*int*/ lParam) {
if (handle == 0) return 0;
if (hwnd != handle) {
- int /*long*/ hwndText = OS.GetDlgItem (handle, CBID_EDIT);
- int /*long*/ hwndList = OS.GetDlgItem (handle, CBID_LIST);
+ long /*int*/ hwndText = OS.GetDlgItem (handle, CBID_EDIT);
+ long /*int*/ hwndList = OS.GetDlgItem (handle, CBID_LIST);
if ((hwndText != 0 && hwnd == hwndText) || (hwndList != 0 && hwnd == hwndList)) {
LRESULT result = null;
switch (msg) {
@@ -2266,16 +2266,16 @@ int /*long*/ windowProc (int /*long*/ hwnd, int msg, int /*long*/ wParam, int /*
return super.windowProc (hwnd, msg, wParam, lParam);
}
-LRESULT WM_CTLCOLOR (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT WM_CTLCOLOR (long /*int*/ wParam, long /*int*/ lParam) {
return wmColorChild (wParam, lParam);
}
-LRESULT WM_GETDLGCODE (int /*long*/ wParam, int /*long*/ lParam) {
- int /*long*/ code = callWindowProc (handle, OS.WM_GETDLGCODE, wParam, lParam);
+LRESULT WM_GETDLGCODE (long /*int*/ wParam, long /*int*/ lParam) {
+ long /*int*/ code = callWindowProc (handle, OS.WM_GETDLGCODE, wParam, lParam);
return new LRESULT (code | OS.DLGC_WANTARROWS);
}
-LRESULT WM_KILLFOCUS (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT WM_KILLFOCUS (long /*int*/ wParam, long /*int*/ lParam) {
/*
* Bug in Windows. When a combo box that is read only
* is disposed in CBN_KILLFOCUS, Windows segment faults.
@@ -2295,7 +2295,7 @@ LRESULT WM_KILLFOCUS (int /*long*/ wParam, int /*long*/ lParam) {
return null;
}
-LRESULT WM_LBUTTONDOWN (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT WM_LBUTTONDOWN (long /*int*/ wParam, long /*int*/ lParam) {
/*
* Feature in Windows. When an editable combo box is dropped
* down and the text in the entry field partially matches an
@@ -2318,7 +2318,7 @@ LRESULT WM_LBUTTONDOWN (int /*long*/ wParam, int /*long*/ lParam) {
return result;
}
-LRESULT WM_SETFOCUS (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT WM_SETFOCUS (long /*int*/ wParam, long /*int*/ lParam) {
/*
* Return NULL - Focus notification is
* done by WM_COMMAND with CBN_SETFOCUS.
@@ -2326,7 +2326,7 @@ LRESULT WM_SETFOCUS (int /*long*/ wParam, int /*long*/ lParam) {
return null;
}
-LRESULT WM_SIZE (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT WM_SIZE (long /*int*/ wParam, long /*int*/ lParam) {
/*
* Feature in Windows. When a combo box is resized,
* the size of the drop down rectangle is specified
@@ -2347,9 +2347,9 @@ LRESULT WM_SIZE (int /*long*/ wParam, int /*long*/ lParam) {
LRESULT result = super.WM_SIZE (wParam, lParam);
if (OS.IsWindowVisible (handle)) {
if (OS.IsWinCE) {
- int /*long*/ hwndText = OS.GetDlgItem (handle, CBID_EDIT);
+ long /*int*/ hwndText = OS.GetDlgItem (handle, CBID_EDIT);
if (hwndText != 0) OS.InvalidateRect (hwndText, null, true);
- int /*long*/ hwndList = OS.GetDlgItem (handle, CBID_LIST);
+ long /*int*/ hwndList = OS.GetDlgItem (handle, CBID_LIST);
if (hwndList != 0) OS.InvalidateRect (hwndList, null, true);
} else {
int uFlags = OS.RDW_ERASE | OS.RDW_INVALIDATE | OS.RDW_ALLCHILDREN;
@@ -2381,14 +2381,14 @@ LRESULT WM_SIZE (int /*long*/ wParam, int /*long*/ lParam) {
return result;
}
-LRESULT WM_UPDATEUISTATE (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT WM_UPDATEUISTATE (long /*int*/ wParam, long /*int*/ lParam) {
LRESULT result = super.WM_UPDATEUISTATE (wParam, lParam);
if (result != null) return result;
OS.InvalidateRect (handle, null, true);
return result;
}
-LRESULT WM_WINDOWPOSCHANGING (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT WM_WINDOWPOSCHANGING (long /*int*/ wParam, long /*int*/ lParam) {
LRESULT result = super.WM_WINDOWPOSCHANGING (wParam, lParam);
if (result != null) return result;
/*
@@ -2417,15 +2417,15 @@ LRESULT WM_WINDOWPOSCHANGING (int /*long*/ wParam, int /*long*/ lParam) {
int width = rect.right - rect.left;
int height = rect.bottom - rect.top;
if (width != 0 && height != 0) {
- int /*long*/ hwndParent = parent.handle;
- int /*long*/ hwndChild = OS.GetWindow (hwndParent, OS.GW_CHILD);
+ long /*int*/ hwndParent = parent.handle;
+ long /*int*/ hwndChild = OS.GetWindow (hwndParent, OS.GW_CHILD);
OS.MapWindowPoints (0, hwndParent, rect, 2);
- int /*long*/ rgn1 = OS.CreateRectRgn (rect.left, rect.top, rect.right, rect.bottom);
+ long /*int*/ rgn1 = OS.CreateRectRgn (rect.left, rect.top, rect.right, rect.bottom);
while (hwndChild != 0) {
if (hwndChild != handle) {
OS.GetWindowRect (hwndChild, rect);
OS.MapWindowPoints (0, hwndParent, rect, 2);
- int /*long*/ rgn2 = OS.CreateRectRgn (rect.left, rect.top, rect.right, rect.bottom);
+ long /*int*/ rgn2 = OS.CreateRectRgn (rect.left, rect.top, rect.right, rect.bottom);
OS.CombineRgn (rgn1, rgn1, rgn2, OS.RGN_DIFF);
OS.DeleteObject (rgn2);
}
@@ -2440,7 +2440,7 @@ LRESULT WM_WINDOWPOSCHANGING (int /*long*/ wParam, int /*long*/ lParam) {
return result;
}
-LRESULT wmChar (int /*long*/ hwnd, int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT wmChar (long /*int*/ hwnd, long /*int*/ wParam, long /*int*/ lParam) {
if (ignoreCharacter) return null;
LRESULT result = super.wmChar (hwnd, wParam, lParam);
if (result != null) return result;
@@ -2470,7 +2470,7 @@ LRESULT wmChar (int /*long*/ hwnd, int /*long*/ wParam, int /*long*/ lParam) {
return result;
}
-LRESULT wmClipboard (int /*long*/ hwndText, int msg, int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT wmClipboard (long /*int*/ hwndText, int msg, long /*int*/ wParam, long /*int*/ lParam) {
if ((style & SWT.READ_ONLY) != 0) return null;
if (!hooks (SWT.Verify) && !filters (SWT.Verify)) return null;
boolean call = false;
@@ -2529,11 +2529,11 @@ LRESULT wmClipboard (int /*long*/ hwndText, int msg, int /*long*/ wParam, int /*
}
TCHAR buffer = new TCHAR (getCodePage (), newText, true);
if (msg == OS.WM_SETTEXT) {
- int /*long*/ hHeap = OS.GetProcessHeap ();
+ long /*int*/ hHeap = OS.GetProcessHeap ();
int byteCount = buffer.length () * TCHAR.sizeof;
- int /*long*/ pszText = OS.HeapAlloc (hHeap, OS.HEAP_ZERO_MEMORY, byteCount);
+ long /*int*/ pszText = OS.HeapAlloc (hHeap, OS.HEAP_ZERO_MEMORY, byteCount);
OS.MoveMemory (pszText, buffer, byteCount);
- int /*long*/ code = OS.CallWindowProc (EditProc, hwndText, msg, wParam, pszText);
+ long /*int*/ code = OS.CallWindowProc (EditProc, hwndText, msg, wParam, pszText);
OS.HeapFree (hHeap, 0, pszText);
return new LRESULT (code);
} else {
@@ -2545,7 +2545,7 @@ LRESULT wmClipboard (int /*long*/ hwndText, int msg, int /*long*/ wParam, int /*
return null;
}
-LRESULT wmCommandChild (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT wmCommandChild (long /*int*/ wParam, long /*int*/ lParam) {
int code = OS.HIWORD (wParam);
switch (code) {
case OS.CBN_EDITCHANGE:
@@ -2616,7 +2616,7 @@ LRESULT wmCommandChild (int /*long*/ wParam, int /*long*/ lParam) {
event.doit = true;
sendEvent (SWT.OrientationChange, event);
if (!event.doit) {
- int /*long*/ hwnd = lParam;
+ long /*int*/ hwnd = lParam;
int bits1 = OS.GetWindowLong (hwnd, OS.GWL_EXSTYLE);
int bits2 = OS.GetWindowLong (hwnd, OS.GWL_STYLE);
if (code == OS.EN_ALIGN_LTR_EC) {
@@ -2634,7 +2634,7 @@ LRESULT wmCommandChild (int /*long*/ wParam, int /*long*/ lParam) {
return super.wmCommandChild (wParam, lParam);
}
-LRESULT wmIMEChar (int /*long*/ hwnd, int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT wmIMEChar (long /*int*/ hwnd, long /*int*/ wParam, long /*int*/ lParam) {
/* Process a DBCS character */
Display display = this.display;
@@ -2653,7 +2653,7 @@ LRESULT wmIMEChar (int /*long*/ hwnd, int /*long*/ wParam, int /*long*/ lParam)
* them to the application.
*/
ignoreCharacter = true;
- int /*long*/ result = callWindowProc (hwnd, OS.WM_IME_CHAR, wParam, lParam);
+ long /*int*/ result = callWindowProc (hwnd, OS.WM_IME_CHAR, wParam, lParam);
MSG msg = new MSG ();
int flags = OS.PM_REMOVE | OS.PM_NOYIELD | OS.PM_QS_INPUT | OS.PM_QS_POSTMESSAGE;
while (OS.PeekMessage (msg, hwnd, OS.WM_CHAR, OS.WM_CHAR, flags)) {
@@ -2668,7 +2668,7 @@ LRESULT wmIMEChar (int /*long*/ hwnd, int /*long*/ wParam, int /*long*/ lParam)
return new LRESULT (result);
}
-LRESULT wmKeyDown (int /*long*/ hwnd, int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT wmKeyDown (long /*int*/ hwnd, long /*int*/ wParam, long /*int*/ lParam) {
if (ignoreCharacter) return null;
LRESULT result = super.wmKeyDown (hwnd, wParam, lParam);
if (result != null) return result;
@@ -2683,7 +2683,7 @@ LRESULT wmKeyDown (int /*long*/ hwnd, int /*long*/ wParam, int /*long*/ lParam)
return result;
}
-LRESULT wmSysKeyDown (int /*long*/ hwnd, int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT wmSysKeyDown (long /*int*/ hwnd, long /*int*/ wParam, long /*int*/ lParam) {
/*
* Feature in Windows. When an editable combo box is dropped
* down using Alt+Down and the text in the entry field partially
@@ -2696,7 +2696,7 @@ LRESULT wmSysKeyDown (int /*long*/ hwnd, int /*long*/ wParam, int /*long*/ lPara
if (result != null) return result;
if ((style & SWT.READ_ONLY) == 0) {
if (wParam == OS.VK_DOWN) {
- int /*long*/ code = callWindowProc (hwnd, OS.WM_SYSKEYDOWN, wParam, lParam);
+ long /*int*/ code = callWindowProc (hwnd, OS.WM_SYSKEYDOWN, wParam, lParam);
int newSelection = (int)/*64*/OS.SendMessage (handle, OS.CB_GETCURSEL, 0, 0);
if (oldSelection != newSelection) {
sendEvent (SWT.Modify);
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Composite.java b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Composite.java
index 746b0ab655..1f91f9e7f2 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Composite.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Composite.java
@@ -97,7 +97,7 @@ public Composite (Composite parent, int style) {
Control [] _getChildren () {
int count = 0;
- int /*long*/ hwndChild = OS.GetWindow (handle, OS.GW_CHILD);
+ long /*int*/ hwndChild = OS.GetWindow (handle, OS.GW_CHILD);
if (hwndChild == 0) return new Control [0];
while (hwndChild != 0) {
count++;
@@ -193,7 +193,7 @@ void checkBuffered () {
void checkComposited () {
if ((state & CANVAS) != 0) {
if ((style & SWT.TRANSPARENT) != 0) {
- int /*long*/ hwndParent = parent.handle;
+ long /*int*/ hwndParent = parent.handle;
int bits = OS.GetWindowLong (hwndParent, OS.GWL_EXSTYLE);
bits |= OS.WS_EX_COMPOSITED;
OS.SetWindowLong (hwndParent, OS.GWL_EXSTYLE, bits);
@@ -273,13 +273,13 @@ public Point computeSize (int wHint, int hHint, boolean changed) {
//#define PW_CLIENTONLY 0x00000001
//DCOrg() wrong
//topHandle wrong for Tree?
- int /*long*/ hDC = gc.handle;
+ long /*int*/ hDC = gc.handle;
int nSavedDC = OS.SaveDC (hDC);
OS.IntersectClipRect (hDC, 0, 0, width, height);
//WRONG PARENT
POINT lpPoint = new POINT ();
- int /*long*/ hwndParent = OS.GetParent (handle);
+ long /*int*/ hwndParent = OS.GetParent (handle);
OS.MapWindowPoints (handle, hwndParent, lpPoint, 1);
RECT rect = new RECT ();
OS.GetWindowRect (handle, rect);
@@ -347,7 +347,7 @@ public void drawBackground(GC gc, int x, int y, int width, int height, int offse
if (gc.isDisposed ()) error (SWT.ERROR_INVALID_ARGUMENT);
RECT rect = new RECT ();
OS.SetRect (rect, x, y, x + width, y + height);
- int /*long*/ hDC = gc.handle;
+ long /*int*/ hDC = gc.handle;
int pixel = background == -1 ? gc.getBackground ().handle : -1;
drawBackground (hDC, rect, pixel, offsetX, offsetY);
}
@@ -457,7 +457,7 @@ int getChildrenCount () {
* non-registered children.
*/
int count = 0;
- int /*long*/ hwndChild = OS.GetWindow (handle, OS.GW_CHILD);
+ long /*int*/ hwndChild = OS.GetWindow (handle, OS.GW_CHILD);
while (hwndChild != 0) {
count++;
hwndChild = OS.GetWindow (hwndChild, OS.GW_HWNDNEXT);
@@ -849,8 +849,8 @@ void releaseParent () {
super.releaseParent ();
if ((state & CANVAS) != 0) {
if ((style & SWT.TRANSPARENT) != 0) {
- int /*long*/ hwndParent = parent.handle;
- int /*long*/ hwndChild = OS.GetWindow (hwndParent, OS.GW_CHILD);
+ long /*int*/ hwndParent = parent.handle;
+ long /*int*/ hwndChild = OS.GetWindow (hwndParent, OS.GW_CHILD);
while (hwndChild != 0) {
if (hwndChild != handle) {
int bits = OS.GetWindowLong (hwndParent, OS.GWL_EXSTYLE);
@@ -879,7 +879,7 @@ void releaseChildren (boolean destroy) {
void releaseWidget () {
super.releaseWidget ();
if ((state & CANVAS) != 0 && (style & SWT.EMBEDDED) != 0) {
- int /*long*/ hwndChild = OS.GetWindow (handle, OS.GW_CHILD);
+ long /*int*/ hwndChild = OS.GetWindow (handle, OS.GW_CHILD);
if (hwndChild != 0) {
int threadId = OS.GetWindowThreadProcessId (hwndChild, null);
if (threadId != OS.GetCurrentThreadId ()) {
@@ -920,7 +920,7 @@ void resizeChildren () {
boolean resizeChildren (boolean defer, WINDOWPOS [] pwp) {
if (pwp == null) return true;
- int /*long*/ hdwp = 0;
+ long /*int*/ hdwp = 0;
if (defer) {
hdwp = OS.BeginDeferWindowPos (pwp.length);
if (hdwp == 0) return false;
@@ -950,7 +950,7 @@ boolean resizeChildren (boolean defer, WINDOWPOS [] pwp) {
return true;
}
-void resizeEmbeddedHandle(int /*long*/ embeddedHandle, int width, int height) {
+void resizeEmbeddedHandle(long /*int*/ embeddedHandle, int width, int height) {
if (embeddedHandle == 0) return;
int [] processID = new int [1];
int threadId = OS.GetWindowThreadProcessId (embeddedHandle, processID);
@@ -1294,7 +1294,7 @@ void updateOrientation () {
}
void updateUIState () {
- int /*long*/ hwndShell = getShell ().handle;
+ long /*int*/ hwndShell = getShell ().handle;
int uiState = /*64*/(int)OS.SendMessage (hwndShell, OS.WM_QUERYUISTATE, 0, 0);
if ((uiState & OS.UISF_HIDEFOCUS) != 0) {
OS.SendMessage (hwndShell, OS.WM_CHANGEUISTATE, OS.MAKEWPARAM (OS.UIS_CLEAR, OS.UISF_HIDEFOCUS), 0);
@@ -1306,7 +1306,7 @@ int widgetStyle () {
return super.widgetStyle () | OS.WS_CLIPCHILDREN;
}
-LRESULT WM_ERASEBKGND (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT WM_ERASEBKGND (long /*int*/ wParam, long /*int*/ lParam) {
LRESULT result = super.WM_ERASEBKGND (wParam, lParam);
if (result != null) return result;
if ((state & CANVAS) != 0) {
@@ -1318,7 +1318,7 @@ LRESULT WM_ERASEBKGND (int /*long*/ wParam, int /*long*/ lParam) {
return result;
}
-LRESULT WM_GETDLGCODE (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT WM_GETDLGCODE (long /*int*/ wParam, long /*int*/ lParam) {
LRESULT result = super.WM_GETDLGCODE (wParam, lParam);
if (result != null) return result;
if ((state & CANVAS) != 0) {
@@ -1333,15 +1333,15 @@ LRESULT WM_GETDLGCODE (int /*long*/ wParam, int /*long*/ lParam) {
return result;
}
-LRESULT WM_GETFONT (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT WM_GETFONT (long /*int*/ wParam, long /*int*/ lParam) {
LRESULT result = super.WM_GETFONT (wParam, lParam);
if (result != null) return result;
- int /*long*/ code = callWindowProc (handle, OS.WM_GETFONT, wParam, lParam);
+ long /*int*/ code = callWindowProc (handle, OS.WM_GETFONT, wParam, lParam);
if (code != 0) return new LRESULT (code);
return new LRESULT (font != null ? font.handle : defaultFont ());
}
-LRESULT WM_LBUTTONDOWN (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT WM_LBUTTONDOWN (long /*int*/ wParam, long /*int*/ lParam) {
LRESULT result = super.WM_LBUTTONDOWN (wParam, lParam);
if (result == LRESULT.ZERO) return result;
@@ -1354,7 +1354,7 @@ LRESULT WM_LBUTTONDOWN (int /*long*/ wParam, int /*long*/ lParam) {
return result;
}
-LRESULT WM_NCHITTEST (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT WM_NCHITTEST (long /*int*/ wParam, long /*int*/ lParam) {
LRESULT result = super.WM_NCHITTEST (wParam, lParam);
if (result != null) return result;
/*
@@ -1371,7 +1371,7 @@ LRESULT WM_NCHITTEST (int /*long*/ wParam, int /*long*/ lParam) {
*/
if (!OS.IsWinCE && OS.COMCTL32_MAJOR >= 6 && OS.IsAppThemed ()) {
if ((state & CANVAS)!= 0) {
- int /*long*/ code = callWindowProc (handle, OS.WM_NCHITTEST, wParam, lParam);
+ long /*int*/ code = callWindowProc (handle, OS.WM_NCHITTEST, wParam, lParam);
if (code == OS.HTCLIENT) {
RECT rect = new RECT ();
OS.GetClientRect (handle, rect);
@@ -1390,7 +1390,7 @@ LRESULT WM_NCHITTEST (int /*long*/ wParam, int /*long*/ lParam) {
return result;
}
-LRESULT WM_PARENTNOTIFY (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT WM_PARENTNOTIFY (long /*int*/ wParam, long /*int*/ lParam) {
if ((state & CANVAS) != 0 && (style & SWT.EMBEDDED) != 0) {
if (OS.LOWORD (wParam) == OS.WM_CREATE) {
RECT rect = new RECT ();
@@ -1401,7 +1401,7 @@ LRESULT WM_PARENTNOTIFY (int /*long*/ wParam, int /*long*/ lParam) {
return super.WM_PARENTNOTIFY (wParam, lParam);
}
-LRESULT WM_PAINT (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT WM_PAINT (long /*int*/ wParam, long /*int*/ lParam) {
if ((state & CANVAS) == 0 || (state & FOREIGN_HANDLE) != 0) {
return super.WM_PAINT (wParam, lParam);
}
@@ -1428,15 +1428,15 @@ LRESULT WM_PAINT (int /*long*/ wParam, int /*long*/ lParam) {
}
}
if (bufferedPaint) {
- int /*long*/ hDC = OS.BeginPaint (handle, ps);
+ long /*int*/ hDC = OS.BeginPaint (handle, ps);
int width = ps.right - ps.left;
int height = ps.bottom - ps.top;
if (width != 0 && height != 0) {
- int /*long*/ [] phdc = new int /*long*/ [1];
+ long /*int*/ [] phdc = new long /*int*/ [1];
int flags = OS.BPBF_COMPATIBLEBITMAP;
RECT prcTarget = new RECT ();
OS.SetRect (prcTarget, ps.left, ps.top, ps.right, ps.bottom);
- int /*long*/ hBufferedPaint = OS.BeginBufferedPaint (hDC, prcTarget, flags, null, phdc);
+ long /*int*/ hBufferedPaint = OS.BeginBufferedPaint (hDC, prcTarget, flags, null, phdc);
GCData data = new GCData ();
data.device = display;
data.foreground = getForegroundPixel ();
@@ -1475,7 +1475,7 @@ LRESULT WM_PAINT (int /*long*/ wParam, int /*long*/ lParam) {
GC gc = GC.win32_new (this, data);
/* Get the system region for the paint HDC */
- int /*long*/ sysRgn = 0;
+ long /*int*/ sysRgn = 0;
if ((style & (SWT.DOUBLE_BUFFERED | SWT.TRANSPARENT)) != 0 || (style & SWT.NO_MERGE_PAINTS) != 0) {
sysRgn = OS.CreateRectRgn (0, 0, 0, 0);
if (OS.GetRandomRgn (gc.handle, sysRgn, OS.SYSRGN) == 1) {
@@ -1484,7 +1484,7 @@ LRESULT WM_PAINT (int /*long*/ wParam, int /*long*/ lParam) {
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;
}
@@ -1583,7 +1583,7 @@ LRESULT WM_PAINT (int /*long*/ wParam, int /*long*/ lParam) {
gc.dispose ();
}
} else {
- int /*long*/ hDC = OS.BeginPaint (handle, ps);
+ long /*int*/ hDC = OS.BeginPaint (handle, ps);
if ((style & (SWT.NO_BACKGROUND | SWT.TRANSPARENT)) == 0) {
RECT rect = new RECT ();
OS.SetRect (rect, ps.left, ps.top, ps.right, ps.bottom);
@@ -1609,7 +1609,7 @@ LRESULT WM_PAINT (int /*long*/ wParam, int /*long*/ lParam) {
return LRESULT.ZERO;
}
-LRESULT WM_PRINTCLIENT (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT WM_PRINTCLIENT (long /*int*/ wParam, long /*int*/ lParam) {
LRESULT result = super.WM_PRINTCLIENT (wParam, lParam);
if (result != null) return result;
if ((state & CANVAS) != 0) {
@@ -1645,12 +1645,12 @@ LRESULT WM_PRINTCLIENT (int /*long*/ wParam, int /*long*/ lParam) {
return result;
}
-LRESULT WM_SETFONT (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT WM_SETFONT (long /*int*/ wParam, long /*int*/ lParam) {
if (lParam != 0) OS.InvalidateRect (handle, null, true);
return super.WM_SETFONT (wParam, lParam);
}
-LRESULT WM_SIZE (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT WM_SIZE (long /*int*/ wParam, long /*int*/ lParam) {
LRESULT result = null;
if ((state & RESIZE_DEFERRED) != 0) {
result = super.WM_SIZE (wParam, lParam);
@@ -1698,10 +1698,10 @@ LRESULT WM_SIZE (int /*long*/ wParam, int /*long*/ lParam) {
return result;
}
-LRESULT WM_SYSCOLORCHANGE (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT WM_SYSCOLORCHANGE (long /*int*/ wParam, long /*int*/ lParam) {
LRESULT result = super.WM_SYSCOLORCHANGE (wParam, lParam);
if (result != null) return result;
- int /*long*/ hwndChild = OS.GetWindow (handle, OS.GW_CHILD);
+ long /*int*/ hwndChild = OS.GetWindow (handle, OS.GW_CHILD);
while (hwndChild != 0) {
OS.SendMessage (hwndChild, OS.WM_SYSCOLORCHANGE, 0, 0);
hwndChild = OS.GetWindow (hwndChild, OS.GW_HWNDNEXT);
@@ -1709,7 +1709,7 @@ LRESULT WM_SYSCOLORCHANGE (int /*long*/ wParam, int /*long*/ lParam) {
return result;
}
-LRESULT WM_SYSCOMMAND (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT WM_SYSCOMMAND (long /*int*/ wParam, long /*int*/ lParam) {
LRESULT result = super.WM_SYSCOMMAND (wParam, lParam);
if (result != null) return result;
@@ -1735,7 +1735,7 @@ LRESULT WM_SYSCOMMAND (int /*long*/ wParam, int /*long*/ lParam) {
case OS.SC_VSCROLL:
boolean showHBar = horizontalBar != null && horizontalBar.getVisible ();
boolean showVBar = verticalBar != null && verticalBar.getVisible ();
- int /*long*/ code = callWindowProc (handle, OS.WM_SYSCOMMAND, wParam, lParam);
+ long /*int*/ code = callWindowProc (handle, OS.WM_SYSCOMMAND, wParam, lParam);
if ((showHBar != (horizontalBar != null && horizontalBar.getVisible ())) ||
(showVBar != (verticalBar != null && verticalBar.getVisible ()))) {
int flags = OS.RDW_FRAME | OS.RDW_INVALIDATE | OS.RDW_UPDATENOW;
@@ -1749,7 +1749,7 @@ LRESULT WM_SYSCOMMAND (int /*long*/ wParam, int /*long*/ lParam) {
return result;
}
-LRESULT WM_UPDATEUISTATE (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT WM_UPDATEUISTATE (long /*int*/ wParam, long /*int*/ lParam) {
LRESULT result = super.WM_UPDATEUISTATE (wParam, lParam);
if (result != null) return result;
if ((state & CANVAS) != 0 && hooks (SWT.Paint)) {
@@ -1758,20 +1758,20 @@ LRESULT WM_UPDATEUISTATE (int /*long*/ wParam, int /*long*/ lParam) {
return result;
}
-LRESULT wmNCPaint (int /*long*/ hwnd, int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT wmNCPaint (long /*int*/ hwnd, long /*int*/ wParam, long /*int*/ lParam) {
LRESULT result = super.wmNCPaint (hwnd, wParam, lParam);
if (result != null) return result;
- int /*long*/ borderHandle = borderHandle ();
+ long /*int*/ borderHandle = borderHandle ();
if ((state & CANVAS) != 0 || (hwnd == borderHandle && handle != borderHandle)) {
if (OS.COMCTL32_MAJOR >= 6 && OS.IsAppThemed ()) {
int bits1 = OS.GetWindowLong (hwnd, OS.GWL_EXSTYLE);
if ((bits1 & OS.WS_EX_CLIENTEDGE) != 0) {
- int /*long*/ code = 0;
+ long /*int*/ code = 0;
int bits2 = OS.GetWindowLong (hwnd, OS.GWL_STYLE);
if ((bits2 & (OS.WS_HSCROLL | OS.WS_VSCROLL)) != 0) {
code = callWindowProc (hwnd, OS.WM_NCPAINT, wParam, lParam);
}
- int /*long*/ hDC = OS.GetWindowDC (hwnd);
+ long /*int*/ hDC = OS.GetWindowDC (hwnd);
RECT rect = new RECT ();
OS.GetWindowRect (hwnd, rect);
rect.right -= rect.left;
@@ -1788,7 +1788,7 @@ LRESULT wmNCPaint (int /*long*/ hwnd, int /*long*/ wParam, int /*long*/ lParam)
return result;
}
-LRESULT wmNotify (NMHDR hdr, int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT wmNotify (NMHDR hdr, long /*int*/ wParam, long /*int*/ lParam) {
if (!OS.IsWinCE) {
switch (hdr.code) {
/*
@@ -1814,7 +1814,7 @@ LRESULT wmNotify (NMHDR hdr, int /*long*/ wParam, int /*long*/ lParam) {
* check if the parent is already on top and neither set or clear
* the topmost status of the tool tip.
*/
- int /*long*/ hwndParent = hdr.hwndFrom;
+ long /*int*/ hwndParent = hdr.hwndFrom;
do {
hwndParent = OS.GetParent (hwndParent);
if (hwndParent == 0) break;
@@ -1824,7 +1824,7 @@ LRESULT wmNotify (NMHDR hdr, int /*long*/ wParam, int /*long*/ lParam) {
if (hwndParent != 0) break;
display.lockActiveWindow = true;
int flags = OS.SWP_NOACTIVATE | OS.SWP_NOMOVE | OS.SWP_NOSIZE;
- int /*long*/ hwndInsertAfter = hdr.code == OS.TTN_SHOW ? OS.HWND_TOPMOST : OS.HWND_NOTOPMOST;
+ long /*int*/ hwndInsertAfter = hdr.code == OS.TTN_SHOW ? OS.HWND_TOPMOST : OS.HWND_NOTOPMOST;
SetWindowPos (hdr.hwndFrom, hwndInsertAfter, 0, 0, 0, 0, flags);
display.lockActiveWindow = false;
break;
@@ -1862,7 +1862,7 @@ LRESULT wmNotify (NMHDR hdr, int /*long*/ wParam, int /*long*/ lParam) {
* the orientation of the control.
*/
Widget widget = null;
- int /*long*/ hwnd = hdr.idFrom;
+ long /*int*/ hwnd = hdr.idFrom;
if ((lpnmtdi.uFlags & OS.TTF_IDISHWND) != 0) {
widget = display.getControl (hwnd);
} else {
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Control.java b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Control.java
index 7f7ad8410e..92056be90c 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Control.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Control.java
@@ -58,7 +58,7 @@ public abstract class Control extends Widget implements Drawable {
*
* @noreference This field is not intended to be referenced by clients.
*/
- public int /*long*/ handle;
+ public long /*int*/ handle;
Composite parent;
Cursor cursor;
Menu menu;
@@ -531,7 +531,7 @@ int binarySearch (int [] indices, int start, int end, int index) {
return -low - 1;
}
-int /*long*/ borderHandle () {
+long /*int*/ borderHandle () {
return handle;
}
@@ -572,7 +572,7 @@ void checkComposited () {
/* Do nothing */
}
-boolean checkHandle (int /*long*/ hwnd) {
+boolean checkHandle (long /*int*/ hwnd) {
return hwnd == handle;
}
@@ -690,7 +690,7 @@ Widget [] computeTabList () {
}
void createHandle () {
- int /*long*/ hwndParent = widgetParent ();
+ long /*int*/ hwndParent = widgetParent ();
handle = OS.CreateWindowEx (
widgetExtStyle (),
windowClass (),
@@ -707,7 +707,7 @@ void createHandle () {
OS.SetWindowLongPtr (handle, OS.GWLP_ID, handle);
}
if (OS.IsDBLocale && hwndParent != 0) {
- int /*long*/ hIMC = OS.ImmGetContext (hwndParent);
+ long /*int*/ hIMC = OS.ImmGetContext (hwndParent);
OS.ImmAssociateContext (handle, hIMC);
OS.ImmReleaseContext (hwndParent, hIMC);
}
@@ -722,8 +722,8 @@ void checkGesture () {
* Feature in Windows 7: All gestures are enabled by default except GID_ROTATE.
* Enable it explicitly by calling SetGestureConfig.
*/
- int /*long*/ hHeap = OS.GetProcessHeap ();
- int /*long*/ pConfigs = OS.HeapAlloc (hHeap, OS.HEAP_ZERO_MEMORY, GESTURECONFIG.sizeof);
+ long /*int*/ hHeap = OS.GetProcessHeap ();
+ long /*int*/ pConfigs = OS.HeapAlloc (hHeap, OS.HEAP_ZERO_MEMORY, GESTURECONFIG.sizeof);
if (pConfigs != 0) {
GESTURECONFIG config = new GESTURECONFIG();
config.dwID = OS.GID_ROTATE;
@@ -761,7 +761,7 @@ int defaultBackground () {
return OS.GetSysColor (OS.COLOR_BTNFACE);
}
-int /*long*/ defaultFont () {
+long /*int*/ defaultFont () {
return display.getSystemFont ().handle;
}
@@ -774,7 +774,7 @@ void deregister () {
}
void destroyWidget () {
- int /*long*/ hwnd = topHandle ();
+ long /*int*/ hwnd = topHandle ();
releaseHandle ();
if (hwnd != 0) {
OS.DestroyWindow (hwnd);
@@ -902,7 +902,7 @@ boolean dragDetect (int button, int count, int stateMask, int x, int y) {
if ((stateMask & SWT.BUTTON3) != 0) wParam |= OS.MK_RBUTTON;
if ((stateMask & SWT.BUTTON4) != 0) wParam |= OS.MK_XBUTTON1;
if ((stateMask & SWT.BUTTON5) != 0) wParam |= OS.MK_XBUTTON2;
- int /*long*/ lParam = OS.MAKELPARAM (x, y);
+ long /*int*/ lParam = OS.MAKELPARAM (x, y);
OS.SendMessage (handle, OS.WM_LBUTTONUP, wParam, lParam);
}
return false;
@@ -910,17 +910,17 @@ boolean dragDetect (int button, int count, int stateMask, int x, int y) {
return sendDragEvent (button, stateMask, x, y);
}
-void drawBackground (int /*long*/ hDC) {
+void drawBackground (long /*int*/ hDC) {
RECT rect = new RECT ();
OS.GetClientRect (handle, rect);
drawBackground (hDC, rect);
}
-void drawBackground (int /*long*/ hDC, RECT rect) {
+void drawBackground (long /*int*/ hDC, RECT rect) {
drawBackground (hDC, rect, -1, 0, 0);
}
-void drawBackground (int /*long*/ hDC, RECT rect, int pixel, int tx, int ty) {
+void drawBackground (long /*int*/ hDC, RECT rect, int pixel, int tx, int ty) {
Control control = findBackgroundControl ();
if (control != null) {
if (control.backgroundImage != null) {
@@ -944,21 +944,21 @@ void drawBackground (int /*long*/ hDC, RECT rect, int pixel, int tx, int ty) {
fillBackground (hDC, pixel, rect);
}
-void drawImageBackground (int /*long*/ hDC, int /*long*/ hwnd, int /*long*/ hBitmap, RECT rect, int tx, int ty) {
+void drawImageBackground (long /*int*/ hDC, long /*int*/ hwnd, long /*int*/ hBitmap, RECT rect, int tx, int ty) {
RECT rect2 = new RECT ();
OS.GetClientRect (hwnd, rect2);
OS.MapWindowPoints (hwnd, handle, rect2, 2);
- int /*long*/ hBrush = findBrush (hBitmap, OS.BS_PATTERN);
+ long /*int*/ hBrush = findBrush (hBitmap, OS.BS_PATTERN);
POINT lpPoint = new POINT ();
OS.GetWindowOrgEx (hDC, lpPoint);
OS.SetBrushOrgEx (hDC, -rect2.left - lpPoint.x - tx, -rect2.top - lpPoint.y - ty, lpPoint);
- int /*long*/ hOldBrush = OS.SelectObject (hDC, hBrush);
+ long /*int*/ hOldBrush = OS.SelectObject (hDC, hBrush);
OS.PatBlt (hDC, rect.left, rect.top, rect.right - rect.left, rect.bottom - rect.top, OS.PATCOPY);
OS.SetBrushOrgEx (hDC, lpPoint.x, lpPoint.y, null);
OS.SelectObject (hDC, hOldBrush);
}
-void drawThemeBackground (int /*long*/ hDC, int /*long*/ hwnd, RECT rect) {
+void drawThemeBackground (long /*int*/ hDC, long /*int*/ hwnd, RECT rect) {
/* Do nothing */
}
@@ -970,9 +970,9 @@ void enableWidget (boolean enabled) {
OS.EnableWindow (handle, enabled);
}
-void fillBackground (int /*long*/ hDC, int pixel, RECT rect) {
+void fillBackground (long /*int*/ hDC, int pixel, RECT rect) {
if (rect.left > rect.right || rect.top > rect.bottom) return;
- int /*long*/ hPalette = display.hPalette;
+ long /*int*/ hPalette = display.hPalette;
if (hPalette != 0) {
OS.SelectPalette (hDC, hPalette, false);
OS.RealizePalette (hDC);
@@ -980,7 +980,7 @@ void fillBackground (int /*long*/ hDC, int pixel, RECT rect) {
OS.FillRect (hDC, rect, findBrush (pixel, OS.BS_SOLID));
}
-void fillImageBackground (int /*long*/ hDC, Control control, RECT rect, int tx, int ty) {
+void fillImageBackground (long /*int*/ hDC, Control control, RECT rect, int tx, int ty) {
if (rect.left > rect.right || rect.top > rect.bottom) return;
if (control != null) {
Image image = control.backgroundImage;
@@ -990,7 +990,7 @@ void fillImageBackground (int /*long*/ hDC, Control control, RECT rect, int tx,
}
}
-void fillThemeBackground (int /*long*/ hDC, Control control, RECT rect) {
+void fillThemeBackground (long /*int*/ hDC, Control control, RECT rect) {
if (rect.left > rect.right || rect.top > rect.bottom) return;
if (control != null) {
control.drawThemeBackground (hDC, handle, rect);
@@ -1002,7 +1002,7 @@ Control findBackgroundControl () {
return (state & PARENT_BACKGROUND) != 0 ? parent.findBackgroundControl () : null;
}
-int /*long*/ findBrush (int /*long*/ value, int lbStyle) {
+long /*int*/ findBrush (long /*int*/ value, int lbStyle) {
return parent.findBrush (value, lbStyle);
}
@@ -1207,7 +1207,7 @@ int getBackgroundPixel () {
*/
public int getBorderWidth () {
checkWidget ();
- int /*long*/ borderHandle = borderHandle ();
+ long /*int*/ borderHandle = borderHandle ();
int bits1 = OS.GetWindowLong (borderHandle, OS.GWL_EXSTYLE);
if ((bits1 & OS.WS_EX_CLIENTEDGE) != 0) return OS.GetSystemMetrics (OS.SM_CXEDGE);
if ((bits1 & OS.WS_EX_STATICEDGE) != 0) return OS.GetSystemMetrics (OS.SM_CXBORDER);
@@ -1234,7 +1234,7 @@ public Rectangle getBounds () {
forceResize ();
RECT rect = new RECT ();
OS.GetWindowRect (topHandle (), rect);
- int /*long*/ hwndParent = parent == null ? 0 : parent.handle;
+ long /*int*/ hwndParent = parent == null ? 0 : parent.handle;
OS.MapWindowPoints (0, hwndParent, rect, 2);
int width = rect.right - rect.left;
int height = rect.bottom - rect.top;
@@ -1243,7 +1243,7 @@ public Rectangle getBounds () {
int getCodePage () {
if (OS.IsUnicode) return OS.CP_ACP;
- int /*long*/ hFont = OS.SendMessage (handle, OS.WM_GETFONT, 0, 0);
+ long /*int*/ hFont = OS.SendMessage (handle, OS.WM_GETFONT, 0, 0);
LOGFONT logFont = OS.IsUnicode ? (LOGFONT) new LOGFONTW () : new LOGFONTA ();
OS.GetObject (hFont, LOGFONT.sizeof, logFont);
int cs = logFont.lfCharSet & 0xFF;
@@ -1257,11 +1257,11 @@ int getCodePage () {
String getClipboardText () {
String string = "";
if (OS.OpenClipboard (0)) {
- int /*long*/ hMem = OS.GetClipboardData (OS.IsUnicode ? OS.CF_UNICODETEXT : OS.CF_TEXT);
+ long /*int*/ hMem = OS.GetClipboardData (OS.IsUnicode ? OS.CF_UNICODETEXT : OS.CF_TEXT);
if (hMem != 0) {
/* Ensure byteCount is a multiple of 2 bytes on UNICODE platforms */
int byteCount = OS.GlobalSize (hMem) / TCHAR.sizeof * TCHAR.sizeof;
- int /*long*/ ptr = OS.GlobalLock (hMem);
+ long /*int*/ ptr = OS.GlobalLock (hMem);
if (ptr != 0) {
/* Use the character encoding for the default locale */
TCHAR buffer = new TCHAR (0, byteCount / TCHAR.sizeof);
@@ -1351,7 +1351,7 @@ public boolean getEnabled () {
public Font getFont () {
checkWidget ();
if (font != null) return font;
- int /*long*/ hFont = OS.SendMessage (handle, OS.WM_GETFONT, 0, 0);
+ long /*int*/ hFont = OS.SendMessage (handle, OS.WM_GETFONT, 0, 0);
if (hFont == 0) hFont = defaultFont ();
return Font.win32_new (display, hFont);
}
@@ -1408,7 +1408,7 @@ public Point getLocation () {
forceResize ();
RECT rect = new RECT ();
OS.GetWindowRect (topHandle (), rect);
- int /*long*/ hwndParent = parent == null ? 0 : parent.handle;
+ long /*int*/ hwndParent = parent == null ? 0 : parent.handle;
OS.MapWindowPoints (0, hwndParent, rect, 2);
return new Point (rect.left, rect.top);
}
@@ -1450,7 +1450,7 @@ public Monitor getMonitor () {
if (OS.IsWinCE || OS.WIN32_VERSION < OS.VERSION (4, 10)) {
return display.getPrimaryMonitor ();
}
- int /*long*/ hmonitor = OS.MonitorFromWindow (handle, OS.MONITOR_DEFAULTTONEAREST);
+ long /*int*/ hmonitor = OS.MonitorFromWindow (handle, OS.MONITOR_DEFAULTTONEAREST);
MONITORINFO lpmi = new MONITORINFO ();
lpmi.cbSize = MONITORINFO.sizeof;
OS.GetMonitorInfo (hmonitor, lpmi);
@@ -1659,7 +1659,7 @@ boolean hasFocus () {
* then this control is considered to have focus
* even though it does not have focus in Windows.
*/
- int /*long*/ hwndFocus = OS.GetFocus ();
+ long /*int*/ hwndFocus = OS.GetFocus ();
while (hwndFocus != 0) {
if (hwndFocus == handle) return true;
if (display.getControl (hwndFocus) != null) {
@@ -1685,12 +1685,12 @@ boolean hasFocus () {
*
* @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) {
checkWidget();
- int /*long*/ hwnd = handle;
+ long /*int*/ hwnd = handle;
if (data != null && data.hwnd != 0) hwnd = data.hwnd;
if (data != null) data.hwnd = hwnd;
- int /*long*/ hDC = 0;
+ long /*int*/ hDC = 0;
if (data == null || data.ps == null) {
hDC = OS.GetDC (hwnd);
} else {
@@ -1741,9 +1741,9 @@ 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) {
checkWidget ();
- int /*long*/ hwnd = handle;
+ long /*int*/ hwnd = handle;
if (data != null && data.hwnd != 0) {
hwnd = data.hwnd;
}
@@ -1874,7 +1874,7 @@ boolean isShowing () {
*/
// if (!OS.IsWindowVisible (handle)) return false;
// int flags = OS.DCX_CACHE | OS.DCX_CLIPCHILDREN | OS.DCX_CLIPSIBLINGS;
-// int /*long*/ hDC = OS.GetDCEx (handle, 0, flags);
+// long /*int*/ hDC = OS.GetDCEx (handle, 0, flags);
// int result = OS.GetClipBox (hDC, new RECT ());
// OS.ReleaseDC (handle, hDC);
// return result != OS.NULLREGION;
@@ -1900,7 +1900,7 @@ boolean isTabItem () {
}
int bits = OS.GetWindowLong (handle, OS.GWL_STYLE);
if ((bits & OS.WS_TABSTOP) != 0) return false;
- int /*long*/ code = OS.SendMessage (handle, OS.WM_GETDLGCODE, 0, 0);
+ long /*int*/ code = OS.SendMessage (handle, OS.WM_GETDLGCODE, 0, 0);
if ((code & OS.DLGC_STATIC) != 0) return false;
if ((code & OS.DLGC_WANTALLKEYS) != 0) return false;
if ((code & OS.DLGC_WANTARROWS) != 0) return false;
@@ -1928,7 +1928,7 @@ public boolean isVisible () {
return getVisible () && parent.isVisible ();
}
-void mapEvent (int /*long*/ hwnd, Event event) {
+void mapEvent (long /*int*/ hwnd, Event event) {
if (hwnd != handle) {
POINT point = new POINT ();
point.x = event.x;
@@ -1977,11 +1977,11 @@ boolean mnemonicMatch (char key) {
*/
public void moveAbove (Control control) {
checkWidget ();
- int /*long*/ topHandle = topHandle (), hwndAbove = OS.HWND_TOP;
+ long /*int*/ topHandle = topHandle (), hwndAbove = OS.HWND_TOP;
if (control != null) {
if (control.isDisposed ()) error(SWT.ERROR_INVALID_ARGUMENT);
if (parent != control.parent) return;
- int /*long*/ hwnd = control.topHandle ();
+ long /*int*/ hwnd = control.topHandle ();
if (hwnd == 0 || hwnd == topHandle) return;
hwndAbove = OS.GetWindow (hwnd, OS.GW_HWNDPREV);
/*
@@ -2021,7 +2021,7 @@ public void moveAbove (Control control) {
*/
public void moveBelow (Control control) {
checkWidget ();
- int /*long*/ topHandle = topHandle (), hwndAbove = OS.HWND_BOTTOM;
+ long /*int*/ topHandle = topHandle (), hwndAbove = OS.HWND_BOTTOM;
if (control != null) {
if (control.isDisposed ()) error(SWT.ERROR_INVALID_ARGUMENT);
if (parent != control.parent) return;
@@ -2045,7 +2045,7 @@ public void moveBelow (Control control) {
* this case and do nothing because the control is already
* at the bottom.
*/
- int /*long*/ hwndParent = parent.handle, hwnd = hwndParent;
+ long /*int*/ hwndParent = parent.handle, hwnd = hwndParent;
hwndAbove = OS.GetWindow (hwnd, OS.GW_HWNDPREV);
while (hwndAbove != 0 && hwndAbove != hwnd) {
if (OS.GetWindow (hwndAbove, OS.GW_OWNER) == hwndParent) break;
@@ -2132,14 +2132,14 @@ public boolean print (GC gc) {
if (gc == null) error (SWT.ERROR_NULL_ARGUMENT);
if (gc.isDisposed ()) error (SWT.ERROR_INVALID_ARGUMENT);
if (!OS.IsWinCE && OS.WIN32_VERSION >= OS.VERSION (5, 1)) {
- int /*long*/ topHandle = topHandle ();
- int /*long*/ hdc = gc.handle;
+ long /*int*/ topHandle = topHandle ();
+ long /*int*/ hdc = gc.handle;
int state = 0;
- int /*long*/ gdipGraphics = gc.getGCData().gdipGraphics;
+ long /*int*/ gdipGraphics = gc.getGCData().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) error(SWT.ERROR_NO_HANDLES);
Gdip.Graphics_GetClip(gdipGraphics, rgn);
if (!Gdip.Region_IsInfinite(rgn, gdipGraphics)) {
@@ -2148,7 +2148,7 @@ public boolean print (GC gc) {
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) error(SWT.ERROR_NO_HANDLES);
Gdip.Graphics_GetTransform(gdipGraphics, matrix);
if (!Gdip.Matrix_IsIdentity(matrix)) {
@@ -2183,7 +2183,7 @@ public boolean print (GC gc) {
return false;
}
-void printWidget (int /*long*/ hwnd, int /*long*/ hdc, GC gc) {
+void printWidget (long /*int*/ hwnd, long /*int*/ hdc, GC gc) {
/*
* Bug in Windows. For some reason, PrintWindow()
* returns success but does nothing when it is called
@@ -2198,8 +2198,8 @@ void printWidget (int /*long*/ hwnd, int /*long*/ hdc, GC gc) {
* The fix is temporarily reparent the window to the desktop,
* call PrintWindow() then reparent the window back.
*/
- int /*long*/ hwndParent = OS.GetParent (hwnd);
- int /*long*/ hwndShell = hwndParent;
+ long /*int*/ hwndParent = OS.GetParent (hwnd);
+ long /*int*/ hwndShell = hwndParent;
while (OS.GetParent (hwndShell) != 0) {
if (OS.GetWindow (hwndShell, OS.GW_OWNER) != 0) break;
hwndShell = OS.GetParent (hwndShell);
@@ -2221,8 +2221,8 @@ void printWidget (int /*long*/ hwnd, int /*long*/ hdc, GC gc) {
* back.
*/
if (!fixPrintWindow) {
- int /*long*/ rgn = OS.CreateRectRgn(0, 0, 0, 0);
- int /*long*/ parent = OS.GetParent(hwnd);
+ long /*int*/ rgn = OS.CreateRectRgn(0, 0, 0, 0);
+ long /*int*/ parent = OS.GetParent(hwnd);
while (parent != hwndShell && !fixPrintWindow) {
if (OS.GetWindowRgn(parent, rgn) != 0) {
fixPrintWindow = true;
@@ -2233,7 +2233,7 @@ void printWidget (int /*long*/ hwnd, int /*long*/ hdc, GC gc) {
}
int bits1 = OS.GetWindowLong (hwnd, OS.GWL_STYLE);
int bits2 = OS.GetWindowLong (hwnd, OS.GWL_EXSTYLE);
- int /*long*/ hwndInsertAfter = OS.GetWindow (hwnd, OS.GW_HWNDPREV);
+ long /*int*/ hwndInsertAfter = OS.GetWindow (hwnd, OS.GW_HWNDPREV);
/*
* Bug in Windows. For some reason, when GetWindow ()
* with GW_HWNDPREV is used to query the previous window
@@ -2798,7 +2798,7 @@ public void removeTraverseListener(TraverseListener listener) {
}
void showWidget (boolean visible) {
- int /*long*/ topHandle = topHandle ();
+ long /*int*/ topHandle = topHandle ();
OS.ShowWindow (topHandle, visible ? OS.SW_SHOW : OS.SW_HIDE);
if (handle != topHandle) OS.ShowWindow (handle, visible ? OS.SW_SHOW : OS.SW_HIDE);
}
@@ -3034,7 +3034,7 @@ public void setBackgroundImage (Image image) {
updateBackgroundImage ();
}
-void setBackgroundImage (int /*long*/ hBitmap) {
+void setBackgroundImage (long /*int*/ hBitmap) {
if (OS.IsWinCE) {
OS.InvalidateRect (handle, null, true);
} else {
@@ -3095,7 +3095,7 @@ void setBounds (int x, int y, int width, int height, int flags, boolean defer) {
}
}
}
- int /*long*/ topHandle = topHandle ();
+ long /*int*/ topHandle = topHandle ();
if (defer && parent != null) {
forceResize ();
if (parent.lpwp != null) {
@@ -3173,7 +3173,7 @@ public void setCapture (boolean capture) {
}
void setCursor () {
- int /*long*/ lParam = OS.MAKELPARAM (OS.HTCLIENT, OS.WM_MOUSEMOVE);
+ long /*int*/ lParam = OS.MAKELPARAM (OS.HTCLIENT, OS.WM_MOUSEMOVE);
OS.SendMessage (handle, OS.WM_SETCURSOR, handle, lParam);
}
@@ -3201,15 +3201,15 @@ public void setCursor (Cursor cursor) {
if (cursor != null && cursor.isDisposed()) error(SWT.ERROR_INVALID_ARGUMENT);
this.cursor = cursor;
if (OS.IsWinCE) {
- int /*long*/ hCursor = cursor != null ? cursor.handle : 0;
+ long /*int*/ hCursor = cursor != null ? cursor.handle : 0;
OS.SetCursor (hCursor);
return;
}
- int /*long*/ hwndCursor = OS.GetCapture ();
+ long /*int*/ hwndCursor = OS.GetCapture ();
if (hwndCursor == 0) {
POINT pt = new POINT ();
if (!OS.GetCursorPos (pt)) return;
- int /*long*/ hwnd = hwndCursor = OS.WindowFromPoint (pt);
+ long /*int*/ hwnd = hwndCursor = OS.WindowFromPoint (pt);
while (hwnd != 0 && hwnd != handle) {
hwnd = OS.GetParent (hwnd);
}
@@ -3221,7 +3221,7 @@ public void setCursor (Cursor cursor) {
}
void setDefaultFont () {
- int /*long*/ hFont = display.getSystemFont ().handle;
+ long /*int*/ hFont = display.getSystemFont ().handle;
OS.SendMessage (handle, OS.WM_SETFONT, hFont, 0);
}
@@ -3320,7 +3320,7 @@ public boolean setFocus () {
*/
public void setFont (Font font) {
checkWidget ();
- int /*long*/ hFont = 0;
+ long /*int*/ hFont = 0;
if (font != null) {
if (font.isDisposed()) error(SWT.ERROR_INVALID_ARGUMENT);
hFont = font.handle;
@@ -3540,7 +3540,7 @@ public void setRedraw (boolean redraw) {
}
if (redraw) {
if (--drawCount == 0) {
- int /*long*/ topHandle = topHandle ();
+ long /*int*/ topHandle = topHandle ();
OS.SendMessage (topHandle, OS.WM_SETREDRAW, 1, 0);
if (handle != topHandle) OS.SendMessage (handle, OS.WM_SETREDRAW, 1, 0);
if ((state & HIDDEN) != 0) {
@@ -3559,7 +3559,7 @@ public void setRedraw (boolean redraw) {
}
} else {
if (drawCount++ == 0) {
- int /*long*/ topHandle = topHandle ();
+ long /*int*/ topHandle = topHandle ();
OS.SendMessage (topHandle, OS.WM_SETREDRAW, 0, 0);
if (handle != topHandle) OS.SendMessage (handle, OS.WM_SETREDRAW, 0, 0);
}
@@ -3586,7 +3586,7 @@ public void setRedraw (boolean redraw) {
public void setRegion (Region region) {
checkWidget ();
if (region != null && region.isDisposed()) error (SWT.ERROR_INVALID_ARGUMENT);
- int /*long*/ hRegion = 0;
+ long /*int*/ hRegion = 0;
if (region != null) {
hRegion = OS.CreateRectRgn (0, 0, 0, 0);
OS.CombineRgn (hRegion, region.handle, hRegion, OS.RGN_OR);
@@ -3779,8 +3779,8 @@ void sort (int [] items) {
}
void subclass () {
- int /*long*/ oldProc = windowProc ();
- int /*long*/ newProc = display.windowProc;
+ long /*int*/ oldProc = windowProc ();
+ long /*int*/ newProc = display.windowProc;
if (oldProc == newProc) return;
OS.SetWindowLongPtr (handle, OS.GWLP_WNDPROC, newProc);
}
@@ -3877,7 +3877,7 @@ public Point toDisplay (Point point) {
return toDisplay (point.x, point.y);
}
-int /*long*/ topHandle () {
+long /*int*/ topHandle () {
return handle;
}
@@ -3894,9 +3894,9 @@ boolean translateMnemonic (Event event, Control control) {
boolean translateMnemonic (MSG msg) {
if (msg.wParam < 0x20) return false;
- int /*long*/ hwnd = msg.hwnd;
+ long /*int*/ hwnd = msg.hwnd;
if (OS.GetKeyState (OS.VK_MENU) >= 0) {
- int /*long*/ code = OS.SendMessage (hwnd, OS.WM_GETDLGCODE, 0, 0);
+ long /*int*/ code = OS.SendMessage (hwnd, OS.WM_GETDLGCODE, 0, 0);
if ((code & OS.DLGC_WANTALLKEYS) != 0) return false;
if ((code & OS.DLGC_BUTTON) == 0) return false;
}
@@ -3914,7 +3914,7 @@ boolean translateMnemonic (MSG msg) {
}
boolean translateTraversal (MSG msg) {
- int /*long*/ hwnd = msg.hwnd;
+ long /*int*/ hwnd = msg.hwnd;
int key = (int)/*64*/msg.wParam;
if (key == OS.VK_MENU) {
if ((msg.lParam & 0x40000000) == 0) {
@@ -3930,7 +3930,7 @@ boolean translateTraversal (MSG msg) {
case OS.VK_ESCAPE: {
all = true;
lastAscii = 27;
- int /*long*/ code = OS.SendMessage (hwnd, OS.WM_GETDLGCODE, 0, 0);
+ long /*int*/ code = OS.SendMessage (hwnd, OS.WM_GETDLGCODE, 0, 0);
if ((code & OS.DLGC_WANTALLKEYS) != 0) {
/*
* Use DLGC_HASSETSEL to determine that the control
@@ -3947,7 +3947,7 @@ boolean translateTraversal (MSG msg) {
case OS.VK_RETURN: {
all = true;
lastAscii = '\r';
- int /*long*/ code = OS.SendMessage (hwnd, OS.WM_GETDLGCODE, 0, 0);
+ long /*int*/ code = OS.SendMessage (hwnd, OS.WM_GETDLGCODE, 0, 0);
if ((code & OS.DLGC_WANTALLKEYS) != 0) doit = false;
detail = SWT.TRAVERSE_RETURN;
break;
@@ -3955,7 +3955,7 @@ boolean translateTraversal (MSG msg) {
case OS.VK_TAB: {
lastAscii = '\t';
boolean next = OS.GetKeyState (OS.VK_SHIFT) >= 0;
- int /*long*/ code = OS.SendMessage (hwnd, OS.WM_GETDLGCODE, 0, 0);
+ long /*int*/ code = OS.SendMessage (hwnd, OS.WM_GETDLGCODE, 0, 0);
if ((code & (OS.DLGC_WANTTAB | OS.DLGC_WANTALLKEYS)) != 0) {
/*
* Use DLGC_HASSETSEL to determine that the control is a
@@ -3989,7 +3989,7 @@ boolean translateTraversal (MSG msg) {
if (key == OS.VK_LEFT || key == OS.VK_RIGHT) return false;
}
lastVirtual = true;
- int /*long*/ code = OS.SendMessage (hwnd, OS.WM_GETDLGCODE, 0, 0);
+ long /*int*/ code = OS.SendMessage (hwnd, OS.WM_GETDLGCODE, 0, 0);
if ((code & (OS.DLGC_WANTARROWS /*| OS.DLGC_WANTALLKEYS*/)) != 0) doit = false;
boolean next = key == OS.VK_DOWN || key == OS.VK_RIGHT;
if (parent != null && (parent.style & SWT.MIRRORED) != 0) {
@@ -4003,7 +4003,7 @@ boolean translateTraversal (MSG msg) {
all = true;
lastVirtual = true;
if (OS.GetKeyState (OS.VK_CONTROL) >= 0) return false;
- int /*long*/ code = OS.SendMessage (hwnd, OS.WM_GETDLGCODE, 0, 0);
+ long /*int*/ code = OS.SendMessage (hwnd, OS.WM_GETDLGCODE, 0, 0);
if ((code & OS.DLGC_WANTALLKEYS) != 0) {
/*
* Use DLGC_HASSETSEL to determine that the control is a
@@ -4340,8 +4340,8 @@ boolean traverseReturn () {
}
void unsubclass () {
- int /*long*/ newProc = windowProc ();
- int /*long*/ oldProc = display.windowProc;
+ long /*int*/ newProc = windowProc ();
+ long /*int*/ oldProc = display.windowProc;
if (oldProc == newProc) return;
OS.SetWindowLongPtr (handle, OS.GWLP_WNDPROC, newProc);
}
@@ -4449,7 +4449,7 @@ int widgetExtStyle () {
return bits;
}
-int /*long*/ widgetParent () {
+long /*int*/ widgetParent () {
return parent.handle;
}
@@ -4506,7 +4506,7 @@ public boolean setParent (Composite parent) {
Menu [] menus = oldShell.findMenus (this);
fixChildren (newShell, oldShell, newDecorations, oldDecorations, menus);
}
- int /*long*/ topHandle = topHandle ();
+ long /*int*/ topHandle = topHandle ();
if (OS.SetParent (topHandle, parent.handle) == 0) return false;
this.parent = parent;
int flags = OS.SWP_NOSIZE | OS.SWP_NOMOVE | OS.SWP_NOACTIVATE;
@@ -4517,9 +4517,9 @@ public boolean setParent (Composite parent) {
abstract TCHAR windowClass ();
-abstract int /*long*/ windowProc ();
+abstract long /*int*/ windowProc ();
-int /*long*/ windowProc (int /*long*/ hwnd, int msg, int /*long*/ wParam, int /*long*/ lParam) {
+long /*int*/ windowProc (long /*int*/ hwnd, int msg, long /*int*/ wParam, long /*int*/ lParam) {
LRESULT result = null;
switch (msg) {
case OS.WM_ACTIVATE: result = WM_ACTIVATE (wParam, lParam); break;
@@ -4623,32 +4623,32 @@ int /*long*/ windowProc (int /*long*/ hwnd, int msg, int /*long*/ wParam, int /*
return callWindowProc (hwnd, msg, wParam, lParam);
}
-LRESULT WM_ACTIVATE (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT WM_ACTIVATE (long /*int*/ wParam, long /*int*/ lParam) {
return null;
}
-LRESULT WM_CAPTURECHANGED (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT WM_CAPTURECHANGED (long /*int*/ wParam, long /*int*/ lParam) {
return wmCaptureChanged (handle, wParam, lParam);
}
-LRESULT WM_CHANGEUISTATE (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT WM_CHANGEUISTATE (long /*int*/ wParam, long /*int*/ lParam) {
if ((state & IGNORE_WM_CHANGEUISTATE) != 0) return LRESULT.ZERO;
return null;
}
-LRESULT WM_CHAR (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT WM_CHAR (long /*int*/ wParam, long /*int*/ lParam) {
return wmChar (handle, wParam, lParam);
}
-LRESULT WM_CLEAR (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT WM_CLEAR (long /*int*/ wParam, long /*int*/ lParam) {
return null;
}
-LRESULT WM_CLOSE (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT WM_CLOSE (long /*int*/ wParam, long /*int*/ lParam) {
return null;
}
-LRESULT WM_COMMAND (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT WM_COMMAND (long /*int*/ wParam, long /*int*/ lParam) {
/*
* When the WM_COMMAND message is sent from a
* menu, the HWND parameter in LPARAM is zero.
@@ -4669,12 +4669,12 @@ LRESULT WM_COMMAND (int /*long*/ wParam, int /*long*/ lParam) {
return control.wmCommandChild (wParam, lParam);
}
-LRESULT WM_CONTEXTMENU (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT WM_CONTEXTMENU (long /*int*/ wParam, long /*int*/ lParam) {
return wmContextMenu (handle, wParam, lParam);
}
-LRESULT WM_CTLCOLOR (int /*long*/ wParam, int /*long*/ lParam) {
- int /*long*/ hPalette = display.hPalette;
+LRESULT WM_CTLCOLOR (long /*int*/ wParam, long /*int*/ lParam) {
+ long /*int*/ hPalette = display.hPalette;
if (hPalette != 0) {
OS.SelectPalette (wParam, hPalette, false);
OS.RealizePalette (wParam);
@@ -4684,15 +4684,15 @@ LRESULT WM_CTLCOLOR (int /*long*/ wParam, int /*long*/ lParam) {
return control.wmColorChild (wParam, lParam);
}
-LRESULT WM_CUT (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT WM_CUT (long /*int*/ wParam, long /*int*/ lParam) {
return null;
}
-LRESULT WM_DESTROY (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT WM_DESTROY (long /*int*/ wParam, long /*int*/ lParam) {
return null;
}
-LRESULT WM_DRAWITEM (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT WM_DRAWITEM (long /*int*/ wParam, long /*int*/ lParam) {
DRAWITEMSTRUCT struct = new DRAWITEMSTRUCT ();
OS.MoveMemory (struct, lParam, DRAWITEMSTRUCT.sizeof);
if (struct.CtlType == OS.ODT_MENU) {
@@ -4705,15 +4705,15 @@ LRESULT WM_DRAWITEM (int /*long*/ wParam, int /*long*/ lParam) {
return control.wmDrawChild (wParam, lParam);
}
-LRESULT WM_ENDSESSION (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT WM_ENDSESSION (long /*int*/ wParam, long /*int*/ lParam) {
return null;
}
-LRESULT WM_ENTERIDLE (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT WM_ENTERIDLE (long /*int*/ wParam, long /*int*/ lParam) {
return null;
}
-LRESULT WM_ERASEBKGND (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT WM_ERASEBKGND (long /*int*/ wParam, long /*int*/ lParam) {
if ((state & DRAW_BACKGROUND) != 0) {
if (findImageControl () != null) return LRESULT.ONE;
}
@@ -4725,7 +4725,7 @@ LRESULT WM_ERASEBKGND (int /*long*/ wParam, int /*long*/ lParam) {
return null;
}
-LRESULT WM_GESTURE (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT WM_GESTURE (long /*int*/ wParam, long /*int*/ lParam) {
if (hooks (SWT.Gesture) || filters (SWT.Gesture)) {
GESTUREINFO gi = new GESTUREINFO ();
gi.cbSize = GESTUREINFO.sizeof;
@@ -4739,31 +4739,31 @@ LRESULT WM_GESTURE (int /*long*/ wParam, int /*long*/ lParam) {
return null;
}
-LRESULT WM_GETDLGCODE (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT WM_GETDLGCODE (long /*int*/ wParam, long /*int*/ lParam) {
return null;
}
-LRESULT WM_GETFONT (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT WM_GETFONT (long /*int*/ wParam, long /*int*/ lParam) {
return null;
}
-LRESULT WM_GETOBJECT (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT WM_GETOBJECT (long /*int*/ wParam, long /*int*/ lParam) {
if (accessible != null) {
- int /*long*/ result = accessible.internal_WM_GETOBJECT (wParam, lParam);
+ long /*int*/ result = accessible.internal_WM_GETOBJECT (wParam, lParam);
if (result != 0) return new LRESULT (result);
}
return null;
}
-LRESULT WM_GETMINMAXINFO (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT WM_GETMINMAXINFO (long /*int*/ wParam, long /*int*/ lParam) {
return null;
}
-LRESULT WM_HOTKEY (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT WM_HOTKEY (long /*int*/ wParam, long /*int*/ lParam) {
return null;
}
-LRESULT WM_HELP (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT WM_HELP (long /*int*/ wParam, long /*int*/ lParam) {
if (OS.IsWinCE) return null;
HELPINFO lphi = new HELPINFO ();
OS.MoveMemory (lphi, lParam, HELPINFO.sizeof);
@@ -4780,7 +4780,7 @@ LRESULT WM_HELP (int /*long*/ wParam, int /*long*/ lParam) {
if (menu.hooks (SWT.Help)) widget = menu;
}
if (widget != null) {
- int /*long*/ hwndShell = shell.handle;
+ long /*int*/ hwndShell = shell.handle;
OS.SendMessage (hwndShell, OS.WM_CANCELMODE, 0, 0);
widget.postEvent (SWT.Help);
return LRESULT.ONE;
@@ -4795,29 +4795,29 @@ LRESULT WM_HELP (int /*long*/ wParam, int /*long*/ lParam) {
return null;
}
-LRESULT WM_HSCROLL (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT WM_HSCROLL (long /*int*/ wParam, long /*int*/ lParam) {
Control control = display.getControl (lParam);
if (control == null) return null;
return control.wmScrollChild (wParam, lParam);
}
-LRESULT WM_IME_CHAR (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT WM_IME_CHAR (long /*int*/ wParam, long /*int*/ lParam) {
return wmIMEChar (handle, wParam, lParam);
}
-LRESULT WM_IME_COMPOSITION (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT WM_IME_COMPOSITION (long /*int*/ wParam, long /*int*/ lParam) {
return null;
}
-LRESULT WM_IME_COMPOSITION_START (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT WM_IME_COMPOSITION_START (long /*int*/ wParam, long /*int*/ lParam) {
return null;
}
-LRESULT WM_IME_ENDCOMPOSITION (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT WM_IME_ENDCOMPOSITION (long /*int*/ wParam, long /*int*/ lParam) {
return null;
}
-LRESULT WM_UNINITMENUPOPUP (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT WM_UNINITMENUPOPUP (long /*int*/ wParam, long /*int*/ lParam) {
Menu hiddenMenu = menuShell ().findMenu (wParam);
if (hiddenMenu != null) {
Shell shell = getShell ();
@@ -4827,7 +4827,7 @@ LRESULT WM_UNINITMENUPOPUP (int /*long*/ wParam, int /*long*/ lParam) {
return null;
}
-LRESULT WM_INITMENUPOPUP (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT WM_INITMENUPOPUP (long /*int*/ wParam, long /*int*/ lParam) {
/* Ignore WM_INITMENUPOPUP for an accelerator */
if (display.accelKeyHit) return null;
@@ -4884,47 +4884,47 @@ LRESULT WM_INITMENUPOPUP (int /*long*/ wParam, int /*long*/ lParam) {
return null;
}
-LRESULT WM_INPUTLANGCHANGE (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT WM_INPUTLANGCHANGE (long /*int*/ wParam, long /*int*/ lParam) {
return null;
}
-LRESULT WM_KEYDOWN (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT WM_KEYDOWN (long /*int*/ wParam, long /*int*/ lParam) {
return wmKeyDown (handle, wParam, lParam);
}
-LRESULT WM_KEYUP (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT WM_KEYUP (long /*int*/ wParam, long /*int*/ lParam) {
return wmKeyUp (handle, wParam, lParam);
}
-LRESULT WM_KILLFOCUS (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT WM_KILLFOCUS (long /*int*/ wParam, long /*int*/ lParam) {
return wmKillFocus (handle, wParam, lParam);
}
-LRESULT WM_LBUTTONDBLCLK (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT WM_LBUTTONDBLCLK (long /*int*/ wParam, long /*int*/ lParam) {
return wmLButtonDblClk (handle, wParam, lParam);
}
-LRESULT WM_LBUTTONDOWN (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT WM_LBUTTONDOWN (long /*int*/ wParam, long /*int*/ lParam) {
return wmLButtonDown (handle, wParam, lParam);
}
-LRESULT WM_LBUTTONUP (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT WM_LBUTTONUP (long /*int*/ wParam, long /*int*/ lParam) {
return wmLButtonUp (handle, wParam, lParam);
}
-LRESULT WM_MBUTTONDBLCLK (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT WM_MBUTTONDBLCLK (long /*int*/ wParam, long /*int*/ lParam) {
return wmMButtonDblClk (handle, wParam, lParam);
}
-LRESULT WM_MBUTTONDOWN (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT WM_MBUTTONDOWN (long /*int*/ wParam, long /*int*/ lParam) {
return wmMButtonDown (handle, wParam, lParam);
}
-LRESULT WM_MBUTTONUP (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT WM_MBUTTONUP (long /*int*/ wParam, long /*int*/ lParam) {
return wmMButtonUp (handle, wParam, lParam);
}
-LRESULT WM_MEASUREITEM (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT WM_MEASUREITEM (long /*int*/ wParam, long /*int*/ lParam) {
MEASUREITEMSTRUCT struct = new MEASUREITEMSTRUCT ();
OS.MoveMemory (struct, lParam, MEASUREITEMSTRUCT.sizeof);
if (struct.CtlType == OS.ODT_MENU) {
@@ -4932,13 +4932,13 @@ LRESULT WM_MEASUREITEM (int /*long*/ wParam, int /*long*/ lParam) {
if (item == null) return null;
return item.wmMeasureChild (wParam, lParam);
}
- int /*long*/ hwnd = OS.GetDlgItem (handle, struct.CtlID);
+ long /*int*/ hwnd = OS.GetDlgItem (handle, struct.CtlID);
Control control = display.getControl (hwnd);
if (control == null) return null;
return control.wmMeasureChild (wParam, lParam);
}
-LRESULT WM_MENUCHAR (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT WM_MENUCHAR (long /*int*/ wParam, long /*int*/ lParam) {
/*
* Feature in Windows. When the user types Alt+<key>
* and <key> does not match a mnemonic in the System
@@ -4955,7 +4955,7 @@ LRESULT WM_MENUCHAR (int /*long*/ wParam, int /*long*/ lParam) {
return null;
}
-LRESULT WM_MENUSELECT (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT WM_MENUSELECT (long /*int*/ wParam, long /*int*/ lParam) {
int code = OS.HIWORD (wParam);
Shell shell = getShell ();
if (code == 0xFFFF && lParam == 0) {
@@ -5015,32 +5015,32 @@ LRESULT WM_MENUSELECT (int /*long*/ wParam, int /*long*/ lParam) {
return null;
}
-LRESULT WM_MOUSEACTIVATE (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT WM_MOUSEACTIVATE (long /*int*/ wParam, long /*int*/ lParam) {
return null;
}
-LRESULT WM_MOUSEHOVER (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT WM_MOUSEHOVER (long /*int*/ wParam, long /*int*/ lParam) {
return wmMouseHover (handle, wParam, lParam);
}
-LRESULT WM_MOUSELEAVE (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT WM_MOUSELEAVE (long /*int*/ wParam, long /*int*/ lParam) {
if (OS.COMCTL32_MAJOR >= 6) getShell ().fixToolTip ();
return wmMouseLeave (handle, wParam, lParam);
}
-LRESULT WM_MOUSEMOVE (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT WM_MOUSEMOVE (long /*int*/ wParam, long /*int*/ lParam) {
return wmMouseMove (handle, wParam, lParam);
}
-LRESULT WM_MOUSEWHEEL (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT WM_MOUSEWHEEL (long /*int*/ wParam, long /*int*/ lParam) {
return wmMouseWheel (handle, wParam, lParam);
}
-LRESULT WM_MOUSEHWHEEL (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT WM_MOUSEHWHEEL (long /*int*/ wParam, long /*int*/ lParam) {
return wmMouseHWheel (handle, wParam, lParam);
}
-LRESULT WM_MOVE (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT WM_MOVE (long /*int*/ wParam, long /*int*/ lParam) {
state |= MOVE_OCCURRED;
if (findImageControl () != null) {
if (this != getShell ()) redrawChildren ();
@@ -5058,83 +5058,83 @@ LRESULT WM_MOVE (int /*long*/ wParam, int /*long*/ lParam) {
return null;
}
-LRESULT WM_NCACTIVATE (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT WM_NCACTIVATE (long /*int*/ wParam, long /*int*/ lParam) {
return null;
}
-LRESULT WM_NCCALCSIZE (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT WM_NCCALCSIZE (long /*int*/ wParam, long /*int*/ lParam) {
return null;
}
-LRESULT WM_NCHITTEST (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT WM_NCHITTEST (long /*int*/ wParam, long /*int*/ lParam) {
if (!OS.IsWindowEnabled (handle)) return null;
if (!isActive ()) return new LRESULT (OS.HTTRANSPARENT);
return null;
}
-LRESULT WM_NCLBUTTONDOWN (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT WM_NCLBUTTONDOWN (long /*int*/ wParam, long /*int*/ lParam) {
return null;
}
-LRESULT WM_NCPAINT (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT WM_NCPAINT (long /*int*/ wParam, long /*int*/ lParam) {
return wmNCPaint (handle, wParam, lParam);
}
-LRESULT WM_NOTIFY (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT WM_NOTIFY (long /*int*/ wParam, long /*int*/ lParam) {
NMHDR hdr = new NMHDR ();
OS.MoveMemory (hdr, lParam, NMHDR.sizeof);
return wmNotify (hdr, wParam, lParam);
}
-LRESULT WM_PAINT (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT WM_PAINT (long /*int*/ wParam, long /*int*/ lParam) {
return wmPaint (handle, wParam, lParam);
}
-LRESULT WM_PALETTECHANGED (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT WM_PALETTECHANGED (long /*int*/ wParam, long /*int*/ lParam) {
return null;
}
-LRESULT WM_PARENTNOTIFY (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT WM_PARENTNOTIFY (long /*int*/ wParam, long /*int*/ lParam) {
return null;
}
-LRESULT WM_PASTE (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT WM_PASTE (long /*int*/ wParam, long /*int*/ lParam) {
return null;
}
-LRESULT WM_PRINT (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT WM_PRINT (long /*int*/ wParam, long /*int*/ lParam) {
return wmPrint (handle, wParam, lParam);
}
-LRESULT WM_PRINTCLIENT (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT WM_PRINTCLIENT (long /*int*/ wParam, long /*int*/ lParam) {
return null;
}
-LRESULT WM_QUERYENDSESSION (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT WM_QUERYENDSESSION (long /*int*/ wParam, long /*int*/ lParam) {
return null;
}
-LRESULT WM_QUERYNEWPALETTE (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT WM_QUERYNEWPALETTE (long /*int*/ wParam, long /*int*/ lParam) {
return null;
}
-LRESULT WM_QUERYOPEN (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT WM_QUERYOPEN (long /*int*/ wParam, long /*int*/ lParam) {
return null;
}
-LRESULT WM_RBUTTONDBLCLK (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT WM_RBUTTONDBLCLK (long /*int*/ wParam, long /*int*/ lParam) {
return wmRButtonDblClk (handle, wParam, lParam);
}
-LRESULT WM_RBUTTONDOWN (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT WM_RBUTTONDOWN (long /*int*/ wParam, long /*int*/ lParam) {
return wmRButtonDown (handle, wParam, lParam);
}
-LRESULT WM_RBUTTONUP (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT WM_RBUTTONUP (long /*int*/ wParam, long /*int*/ lParam) {
return wmRButtonUp (handle, wParam, lParam);
}
-LRESULT WM_SETCURSOR (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT WM_SETCURSOR (long /*int*/ wParam, long /*int*/ lParam) {
int hitTest = (short) OS.LOWORD (lParam);
if (hitTest == OS.HTCLIENT) {
Control control = display.getControl (wParam);
@@ -5148,42 +5148,42 @@ LRESULT WM_SETCURSOR (int /*long*/ wParam, int /*long*/ lParam) {
return null;
}
-LRESULT WM_SETFOCUS (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT WM_SETFOCUS (long /*int*/ wParam, long /*int*/ lParam) {
return wmSetFocus (handle, wParam, lParam);
}
-LRESULT WM_SETTINGCHANGE (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT WM_SETTINGCHANGE (long /*int*/ wParam, long /*int*/ lParam) {
return null;
}
-LRESULT WM_SETFONT (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT WM_SETFONT (long /*int*/ wParam, long /*int*/ lParam) {
return null;
}
-LRESULT WM_SETREDRAW (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT WM_SETREDRAW (long /*int*/ wParam, long /*int*/ lParam) {
return null;
}
-LRESULT WM_SHOWWINDOW (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT WM_SHOWWINDOW (long /*int*/ wParam, long /*int*/ lParam) {
return null;
}
-LRESULT WM_SIZE (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT WM_SIZE (long /*int*/ wParam, long /*int*/ lParam) {
state |= RESIZE_OCCURRED;
if ((state & RESIZE_DEFERRED) == 0) sendEvent (SWT.Resize);
// widget could be disposed at this point
return null;
}
-LRESULT WM_SYSCHAR (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT WM_SYSCHAR (long /*int*/ wParam, long /*int*/ lParam) {
return wmSysChar (handle, wParam, lParam);
}
-LRESULT WM_SYSCOLORCHANGE (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT WM_SYSCOLORCHANGE (long /*int*/ wParam, long /*int*/ lParam) {
return null;
}
-LRESULT WM_SYSCOMMAND (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT WM_SYSCOMMAND (long /*int*/ wParam, long /*int*/ lParam) {
/*
* Check to see if the command is a system command or
* a user menu item that was added to the System menu.
@@ -5205,7 +5205,7 @@ LRESULT WM_SYSCOMMAND (int /*long*/ wParam, int /*long*/ lParam) {
int cmd = (int)/*64*/wParam & 0xFFF0;
switch (cmd) {
case OS.SC_CLOSE:
- int /*long*/ hwndShell = menuShell ().handle;
+ long /*int*/ hwndShell = menuShell ().handle;
int bits = OS.GetWindowLong (hwndShell, OS.GWL_STYLE);
if ((bits & OS.WS_SYSMENU) == 0) return LRESULT.ZERO;
break;
@@ -5298,19 +5298,19 @@ LRESULT WM_SYSCOMMAND (int /*long*/ wParam, int /*long*/ lParam) {
return null;
}
-LRESULT WM_SYSKEYDOWN (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT WM_SYSKEYDOWN (long /*int*/ wParam, long /*int*/ lParam) {
return wmSysKeyDown (handle, wParam, lParam);
}
-LRESULT WM_SYSKEYUP (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT WM_SYSKEYUP (long /*int*/ wParam, long /*int*/ lParam) {
return wmSysKeyUp (handle, wParam, lParam);
}
-LRESULT WM_TABLET_FLICK (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT WM_TABLET_FLICK (long /*int*/ wParam, long /*int*/ lParam) {
if (!hooks (SWT.Gesture) && !filters (SWT.Gesture)) return null;
Event event = new Event ();
FLICK_DATA fData = new FLICK_DATA ();
- int /*long*/ [] source = new int /*long*/ [1];
+ long /*int*/ [] source = new long /*int*/ [1];
source[0] = wParam;
OS.MoveMemory (fData, source, OS.FLICK_DATA_sizeof ());
FLICK_POINT fPoint = new FLICK_POINT ();
@@ -5361,12 +5361,12 @@ LRESULT WM_TABLET_FLICK (int /*long*/ wParam, int /*long*/ lParam) {
return event.doit ? null : LRESULT.ONE;
}
-LRESULT WM_TOUCH (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT WM_TOUCH (long /*int*/ wParam, long /*int*/ lParam) {
LRESULT result = null;
if (hooks (SWT.Touch) || filters (SWT.Touch)) {
int cInputs = OS.LOWORD (wParam);
- int /*long*/ hHeap = OS.GetProcessHeap ();
- int /*long*/ pInputs = OS.HeapAlloc (hHeap, OS.HEAP_ZERO_MEMORY, cInputs * TOUCHINPUT.sizeof);
+ long /*int*/ hHeap = OS.GetProcessHeap ();
+ long /*int*/ pInputs = OS.HeapAlloc (hHeap, OS.HEAP_ZERO_MEMORY, cInputs * TOUCHINPUT.sizeof);
if (pInputs != 0) {
if (OS.GetTouchInputInfo (lParam, cInputs, pInputs, TOUCHINPUT.sizeof)) {
TOUCHINPUT ti [] = new TOUCHINPUT [cInputs];
@@ -5384,35 +5384,35 @@ LRESULT WM_TOUCH (int /*long*/ wParam, int /*long*/ lParam) {
return result;
}
-LRESULT WM_TIMER (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT WM_TIMER (long /*int*/ wParam, long /*int*/ lParam) {
return null;
}
-LRESULT WM_UNDO (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT WM_UNDO (long /*int*/ wParam, long /*int*/ lParam) {
return null;
}
-LRESULT WM_UPDATEUISTATE (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT WM_UPDATEUISTATE (long /*int*/ wParam, long /*int*/ lParam) {
return null;
}
-LRESULT WM_VSCROLL (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT WM_VSCROLL (long /*int*/ wParam, long /*int*/ lParam) {
Control control = display.getControl (lParam);
if (control == null) return null;
return control.wmScrollChild (wParam, lParam);
}
-LRESULT WM_WINDOWPOSCHANGED (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT WM_WINDOWPOSCHANGED (long /*int*/ wParam, long /*int*/ lParam) {
try {
display.resizeCount++;
- int /*long*/ code = callWindowProc (handle, OS.WM_WINDOWPOSCHANGED, wParam, lParam);
+ long /*int*/ code = callWindowProc (handle, OS.WM_WINDOWPOSCHANGED, wParam, lParam);
return code == 0 ? LRESULT.ZERO : new LRESULT (code);
} finally {
--display.resizeCount;
}
}
-LRESULT WM_WINDOWPOSCHANGING (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT WM_WINDOWPOSCHANGING (long /*int*/ wParam, long /*int*/ lParam) {
/*
* Bug in Windows. When WM_SETREDRAW is used to turn off drawing
* for a control and the control is moved or resized, Windows does
@@ -5430,13 +5430,13 @@ LRESULT WM_WINDOWPOSCHANGING (int /*long*/ wParam, int /*long*/ lParam) {
int width = rect.right - rect.left;
int height = rect.bottom - rect.top;
if (width != 0 && height != 0) {
- int /*long*/ hwndParent = parent == null ? 0 : parent.handle;
+ long /*int*/ hwndParent = parent == null ? 0 : parent.handle;
OS.MapWindowPoints (0, hwndParent, rect, 2);
if (OS.IsWinCE) {
OS.InvalidateRect (hwndParent, rect, true);
} else {
- int /*long*/ rgn1 = OS.CreateRectRgn (rect.left, rect.top, rect.right, rect.bottom);
- int /*long*/ rgn2 = OS.CreateRectRgn (lpwp.x, lpwp.y, lpwp.x + lpwp.cx, lpwp.y + lpwp.cy);
+ long /*int*/ rgn1 = OS.CreateRectRgn (rect.left, rect.top, rect.right, rect.bottom);
+ long /*int*/ rgn2 = OS.CreateRectRgn (lpwp.x, lpwp.y, lpwp.x + lpwp.cx, lpwp.y + lpwp.cy);
OS.CombineRgn (rgn1, rgn1, rgn2, OS.RGN_DIFF);
int flags = OS.RDW_ERASE | OS.RDW_FRAME | OS.RDW_INVALIDATE | OS.RDW_ALLCHILDREN;
OS.RedrawWindow (hwndParent, null, rgn1, flags);
@@ -5450,19 +5450,19 @@ LRESULT WM_WINDOWPOSCHANGING (int /*long*/ wParam, int /*long*/ lParam) {
return null;
}
-LRESULT WM_XBUTTONDBLCLK (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT WM_XBUTTONDBLCLK (long /*int*/ wParam, long /*int*/ lParam) {
return wmXButtonDblClk (handle, wParam, lParam);
}
-LRESULT WM_XBUTTONDOWN (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT WM_XBUTTONDOWN (long /*int*/ wParam, long /*int*/ lParam) {
return wmXButtonDown (handle, wParam, lParam);
}
-LRESULT WM_XBUTTONUP (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT WM_XBUTTONUP (long /*int*/ wParam, long /*int*/ lParam) {
return wmXButtonUp (handle, wParam, lParam);
}
-LRESULT wmColorChild (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT wmColorChild (long /*int*/ wParam, long /*int*/ lParam) {
Control control = findBackgroundControl ();
if (control == null) {
if ((state & THEME_BACKGROUND) != 0) {
@@ -5489,15 +5489,15 @@ LRESULT wmColorChild (int /*long*/ wParam, int /*long*/ lParam) {
if (control.backgroundImage != null) {
RECT rect = new RECT ();
OS.GetClientRect (handle, rect);
- int /*long*/ hwnd = control.handle;
- int /*long*/ hBitmap = control.backgroundImage.handle;
+ long /*int*/ hwnd = control.handle;
+ long /*int*/ hBitmap = control.backgroundImage.handle;
OS.MapWindowPoints (handle, hwnd, rect, 2);
POINT lpPoint = new POINT ();
OS.GetWindowOrgEx (wParam, lpPoint);
OS.SetBrushOrgEx (wParam, -rect.left - lpPoint.x, -rect.top - lpPoint.y, lpPoint);
- int /*long*/ hBrush = findBrush (hBitmap, OS.BS_PATTERN);
+ long /*int*/ hBrush = findBrush (hBitmap, OS.BS_PATTERN);
if ((state & DRAW_BACKGROUND) != 0) {
- int /*long*/ hOldBrush = OS.SelectObject (wParam, hBrush);
+ long /*int*/ hOldBrush = OS.SelectObject (wParam, hBrush);
OS.MapWindowPoints (hwnd, handle, rect, 2);
OS.PatBlt (wParam, rect.left, rect.top, rect.right - rect.left, rect.bottom - rect.top, OS.PATCOPY);
OS.SelectObject (wParam, hOldBrush);
@@ -5505,40 +5505,40 @@ LRESULT wmColorChild (int /*long*/ wParam, int /*long*/ lParam) {
OS.SetBkMode (wParam, OS.TRANSPARENT);
return new LRESULT (hBrush);
}
- int /*long*/ hBrush = findBrush (backPixel, OS.BS_SOLID);
+ long /*int*/ hBrush = findBrush (backPixel, OS.BS_SOLID);
if ((state & DRAW_BACKGROUND) != 0) {
RECT rect = new RECT ();
OS.GetClientRect (handle, rect);
- int /*long*/ hOldBrush = OS.SelectObject (wParam, hBrush);
+ long /*int*/ hOldBrush = OS.SelectObject (wParam, hBrush);
OS.PatBlt (wParam, rect.left, rect.top, rect.right - rect.left, rect.bottom - rect.top, OS.PATCOPY);
OS.SelectObject (wParam, hOldBrush);
}
return new LRESULT (hBrush);
}
-LRESULT wmCommandChild (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT wmCommandChild (long /*int*/ wParam, long /*int*/ lParam) {
return null;
}
-LRESULT wmDrawChild (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT wmDrawChild (long /*int*/ wParam, long /*int*/ lParam) {
return null;
}
-LRESULT wmMeasureChild (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT wmMeasureChild (long /*int*/ wParam, long /*int*/ lParam) {
return null;
}
-LRESULT wmNotify (NMHDR hdr, int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT wmNotify (NMHDR hdr, long /*int*/ wParam, long /*int*/ lParam) {
Control control = display.getControl (hdr.hwndFrom);
if (control == null) return null;
return control.wmNotifyChild (hdr, wParam, lParam);
}
-LRESULT wmNotifyChild (NMHDR hdr, int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT wmNotifyChild (NMHDR hdr, long /*int*/ wParam, long /*int*/ lParam) {
return null;
}
-LRESULT wmScrollChild (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT wmScrollChild (long /*int*/ wParam, long /*int*/ lParam) {
return null;
}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/CoolBar.java b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/CoolBar.java
index 94bc063e8f..0833b5f86d 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/CoolBar.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/CoolBar.java
@@ -49,7 +49,7 @@ public class CoolBar extends Composite {
CoolItem [] originalItems;
boolean locked;
boolean ignoreResize;
- static final int /*long*/ ReBarProc;
+ static final long /*int*/ ReBarProc;
static final TCHAR ReBarClass = new TCHAR (0, OS.REBARCLASSNAME, true);
static {
INITCOMMONCONTROLSEX icex = new INITCOMMONCONTROLSEX ();
@@ -118,7 +118,7 @@ public CoolBar (Composite parent, int style) {
}
}
-int /*long*/ callWindowProc (int /*long*/ hwnd, int msg, int /*long*/ wParam, int /*long*/ lParam) {
+long /*int*/ callWindowProc (long /*int*/ hwnd, int msg, long /*int*/ wParam, long /*int*/ lParam) {
if (handle == 0) return 0;
return OS.CallWindowProc (ReBarProc, hwnd, msg, wParam, lParam);
}
@@ -224,7 +224,7 @@ void createHandle () {
* The control will not destroy a font that it did not
* create.
*/
- int /*long*/ hFont = OS.GetStockObject (OS.SYSTEM_FONT);
+ long /*int*/ hFont = OS.GetStockObject (OS.SYSTEM_FONT);
OS.SendMessage (handle, OS.WM_SETFONT, hFont, 0);
}
@@ -238,8 +238,8 @@ void createItem (CoolItem item, int index) {
System.arraycopy (items, 0, newItems, 0, items.length);
items = newItems;
}
- int /*long*/ hHeap = OS.GetProcessHeap ();
- int /*long*/ lpText = OS.HeapAlloc (hHeap, OS.HEAP_ZERO_MEMORY, TCHAR.sizeof);
+ long /*int*/ hHeap = OS.GetProcessHeap ();
+ long /*int*/ lpText = OS.HeapAlloc (hHeap, OS.HEAP_ZERO_MEMORY, TCHAR.sizeof);
REBARBANDINFO rbBand = new REBARBANDINFO ();
rbBand.cbSize = REBARBANDINFO.sizeof;
rbBand.fMask = OS.RBBIM_TEXT | OS.RBBIM_STYLE | OS.RBBIM_ID;
@@ -368,7 +368,7 @@ void destroyItem (CoolItem item) {
originalItems = newOriginals;
}
-void drawThemeBackground (int /*long*/ hDC, int /*long*/ hwnd, RECT rect) {
+void drawThemeBackground (long /*int*/ hDC, long /*int*/ hwnd, RECT rect) {
if (OS.COMCTL32_MAJOR >= 6 && OS.IsAppThemed ()) {
if (background == -1 && (style & SWT.FLAT) != 0) {
Control control = findBackgroundControl ();
@@ -992,11 +992,11 @@ TCHAR windowClass () {
return ReBarClass;
}
-int /*long*/ windowProc () {
+long /*int*/ windowProc () {
return ReBarProc;
}
-LRESULT WM_COMMAND (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT WM_COMMAND (long /*int*/ wParam, long /*int*/ lParam) {
/*
* Feature in Windows. When the coolbar window
* proc processes WM_COMMAND, it forwards this
@@ -1020,7 +1020,7 @@ LRESULT WM_COMMAND (int /*long*/ wParam, int /*long*/ lParam) {
return LRESULT.ZERO;
}
-LRESULT WM_ERASEBKGND (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT WM_ERASEBKGND (long /*int*/ wParam, long /*int*/ lParam) {
LRESULT result = super.WM_ERASEBKGND (wParam, lParam);
/*
* Feature in Windows. For some reason, Windows
@@ -1042,7 +1042,7 @@ LRESULT WM_ERASEBKGND (int /*long*/ wParam, int /*long*/ lParam) {
return result;
}
-LRESULT WM_NOTIFY (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT WM_NOTIFY (long /*int*/ wParam, long /*int*/ lParam) {
/*
* Feature in Windows. When the cool bar window
* proc processes WM_NOTIFY, it forwards this
@@ -1066,7 +1066,7 @@ LRESULT WM_NOTIFY (int /*long*/ wParam, int /*long*/ lParam) {
return LRESULT.ZERO;
}
-LRESULT WM_SETREDRAW (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT WM_SETREDRAW (long /*int*/ wParam, long /*int*/ lParam) {
LRESULT result = super.WM_SETREDRAW (wParam, lParam);
if (result != null) return result;
/*
@@ -1090,7 +1090,7 @@ LRESULT WM_SETREDRAW (int /*long*/ wParam, int /*long*/ lParam) {
*/
if (OS.COMCTL32_MAJOR >= 6) return LRESULT.ZERO;
Rectangle rect = getBounds ();
- int /*long*/ code = callWindowProc (handle, OS.WM_SETREDRAW, wParam, lParam);
+ long /*int*/ code = callWindowProc (handle, OS.WM_SETREDRAW, wParam, lParam);
OS.DefWindowProc (handle, OS.WM_SETREDRAW, wParam, lParam);
if (!rect.equals (getBounds ())) {
parent.redraw (rect.x, rect.y, rect.width, rect.height, true);
@@ -1098,9 +1098,9 @@ LRESULT WM_SETREDRAW (int /*long*/ wParam, int /*long*/ lParam) {
return new LRESULT (code);
}
-LRESULT WM_SIZE (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT WM_SIZE (long /*int*/ wParam, long /*int*/ lParam) {
if (ignoreResize) {
- int /*long*/ code = callWindowProc (handle, OS.WM_SIZE, wParam, lParam);
+ long /*int*/ code = callWindowProc (handle, OS.WM_SIZE, wParam, lParam);
if (code == 0) return LRESULT.ZERO;
return new LRESULT (code);
}
@@ -1113,7 +1113,7 @@ LRESULT WM_SIZE (int /*long*/ wParam, int /*long*/ lParam) {
return super.WM_SIZE (wParam, lParam);
}
-LRESULT wmNotifyChild (NMHDR hdr, int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT wmNotifyChild (NMHDR hdr, long /*int*/ wParam, long /*int*/ lParam) {
switch (hdr.code) {
case OS.RBN_BEGINDRAG: {
int pos = OS.GetMessagePos ();
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/CoolItem.java b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/CoolItem.java
index 3b21e1ab53..593309dc87 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/CoolItem.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/CoolItem.java
@@ -218,7 +218,7 @@ public Rectangle getBounds () {
checkWidget ();
int index = parent.indexOf (this);
if (index == -1) return new Rectangle (0, 0, 0, 0);
- int /*long*/ hwnd = parent.handle;
+ long /*int*/ hwnd = parent.handle;
RECT rect = new RECT ();
OS.SendMessage (hwnd, OS.RB_GETRECT, index, rect);
if (OS.COMCTL32_MAJOR >= 6) {
@@ -242,7 +242,7 @@ Rectangle getClientArea () {
checkWidget ();
int index = parent.indexOf (this);
if (index == -1) return new Rectangle (0, 0, 0, 0);
- int /*long*/ hwnd = parent.handle;
+ long /*int*/ hwnd = parent.handle;
RECT insetRect = new RECT ();
OS.SendMessage (hwnd, OS.RB_GETBANDBORDERS, index, insetRect);
RECT rect = new RECT ();
@@ -330,8 +330,8 @@ public void setControl (Control control) {
this.control = null;
}
Control oldControl = this.control, newControl = control;
- int /*long*/ hwnd = parent.handle;
- int /*long*/ hwndChild = newControl != null ? control.topHandle () : 0;
+ long /*int*/ hwnd = parent.handle;
+ long /*int*/ hwndChild = newControl != null ? control.topHandle () : 0;
REBARBANDINFO rbBand = new REBARBANDINFO ();
rbBand.cbSize = REBARBANDINFO.sizeof;
rbBand.fMask = OS.RBBIM_CHILD;
@@ -344,7 +344,7 @@ public void setControl (Control control) {
* moves the new child to the top of the Z-order. The fix is
* to save and restore the visibility and Z-order.
*/
- int /*long*/ hwndAbove = 0;
+ long /*int*/ hwndAbove = 0;
if (newControl != null) {
hwndAbove = OS.GetWindow (hwndChild, OS.GW_HWNDPREV);
}
@@ -375,7 +375,7 @@ public Point getPreferredSize () {
checkWidget ();
int index = parent.indexOf (this);
if (index == -1) return new Point (0, 0);
- int /*long*/ hwnd = parent.handle;
+ long /*int*/ hwnd = parent.handle;
REBARBANDINFO rbBand = new REBARBANDINFO ();
rbBand.cbSize = REBARBANDINFO.sizeof;
rbBand.fMask = OS.RBBIM_CHILDSIZE | OS.RBBIM_IDEALSIZE;
@@ -405,7 +405,7 @@ public void setPreferredSize (int width, int height) {
width = Math.max (0, width);
height = Math.max (0, height);
ideal = true;
- int /*long*/ hwnd = parent.handle;
+ long /*int*/ hwnd = parent.handle;
int cxIdeal, cyMaxChild;
if ((parent.style & SWT.VERTICAL) != 0) {
cxIdeal = Math.max (0, height - parent.getMargin (index));
@@ -465,7 +465,7 @@ public Point getSize() {
checkWidget ();
int index = parent.indexOf (this);
if (index == -1) new Point (0, 0);
- int /*long*/ hwnd = parent.handle;
+ long /*int*/ hwnd = parent.handle;
RECT rect = new RECT ();
OS.SendMessage (hwnd, OS.RB_GETRECT, index, rect);
if (OS.COMCTL32_MAJOR >= 6) {
@@ -507,7 +507,7 @@ public void setSize (int width, int height) {
if (index == -1) return;
width = Math.max (0, width);
height = Math.max (0, height);
- int /*long*/ hwnd = parent.handle;
+ long /*int*/ hwnd = parent.handle;
int cx, cyChild, cxIdeal;
if ((parent.style & SWT.VERTICAL) != 0) {
cx = height;
@@ -586,7 +586,7 @@ public Point getMinimumSize () {
checkWidget ();
int index = parent.indexOf (this);
if (index == -1) return new Point (0, 0);
- int /*long*/ hwnd = parent.handle;
+ long /*int*/ hwnd = parent.handle;
REBARBANDINFO rbBand = new REBARBANDINFO ();
rbBand.cbSize = REBARBANDINFO.sizeof;
rbBand.fMask = OS.RBBIM_CHILDSIZE;
@@ -618,7 +618,7 @@ public void setMinimumSize (int width, int height) {
width = Math.max (0, width);
height = Math.max (0, height);
minimum = true;
- int /*long*/ hwnd = parent.handle;
+ long /*int*/ hwnd = parent.handle;
int cxMinChild, cyMinChild;
if ((parent.style & SWT.VERTICAL) != 0) {
cxMinChild = height;
@@ -664,7 +664,7 @@ public void setMinimumSize (Point size) {
boolean getWrap() {
int index = parent.indexOf (this);
- int /*long*/ hwnd = parent.handle;
+ long /*int*/ hwnd = parent.handle;
REBARBANDINFO rbBand = new REBARBANDINFO ();
rbBand.cbSize = REBARBANDINFO.sizeof;
rbBand.fMask = OS.RBBIM_STYLE;
@@ -674,7 +674,7 @@ boolean getWrap() {
void setWrap(boolean wrap) {
int index = parent.indexOf (this);
- int /*long*/ hwnd = parent.handle;
+ long /*int*/ hwnd = parent.handle;
REBARBANDINFO rbBand = new REBARBANDINFO ();
rbBand.cbSize = REBARBANDINFO.sizeof;
rbBand.fMask = OS.RBBIM_STYLE;
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/DateTime.java b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/DateTime.java
index ba07146c54..b544d605b7 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/DateTime.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/DateTime.java
@@ -51,9 +51,9 @@ public class DateTime extends Composite {
boolean doubleClick, ignoreSelection;
SYSTEMTIME lastSystemTime;
SYSTEMTIME time = new SYSTEMTIME (); // only used in calendar mode
- static final int /*long*/ DateTimeProc;
+ static final long /*int*/ DateTimeProc;
static final TCHAR DateTimeClass = new TCHAR (0, OS.DATETIMEPICK_CLASS, true);
- static final int /*long*/ CalendarProc;
+ static final long /*int*/ CalendarProc;
static final TCHAR CalendarClass = new TCHAR (0, OS.MONTHCAL_CLASS, true);
static {
INITCOMMONCONTROLSEX icex = new INITCOMMONCONTROLSEX ();
@@ -82,13 +82,13 @@ public class DateTime extends Composite {
* code, other than SWT, could create a control with
* this class name, and fail unexpectedly.
*/
- int /*long*/ hInstance = OS.GetModuleHandle (null);
- int /*long*/ hHeap = OS.GetProcessHeap ();
+ long /*int*/ hInstance = OS.GetModuleHandle (null);
+ long /*int*/ hHeap = OS.GetProcessHeap ();
lpWndClass.hInstance = hInstance;
lpWndClass.style &= ~OS.CS_GLOBALCLASS;
lpWndClass.style |= OS.CS_DBLCLKS;
int byteCount = DateTimeClass.length () * TCHAR.sizeof;
- int /*long*/ lpszClassName = OS.HeapAlloc (hHeap, OS.HEAP_ZERO_MEMORY, byteCount);
+ long /*int*/ lpszClassName = OS.HeapAlloc (hHeap, OS.HEAP_ZERO_MEMORY, byteCount);
OS.MoveMemory (lpszClassName, DateTimeClass, byteCount);
lpWndClass.lpszClassName = lpszClassName;
OS.RegisterClass (lpWndClass);
@@ -115,13 +115,13 @@ public class DateTime extends Composite {
* code, other than SWT, could create a control with
* this class name, and fail unexpectedly.
*/
- int /*long*/ hInstance = OS.GetModuleHandle (null);
- int /*long*/ hHeap = OS.GetProcessHeap ();
+ long /*int*/ hInstance = OS.GetModuleHandle (null);
+ long /*int*/ hHeap = OS.GetProcessHeap ();
lpWndClass.hInstance = hInstance;
lpWndClass.style &= ~OS.CS_GLOBALCLASS;
lpWndClass.style |= OS.CS_DBLCLKS;
int byteCount = CalendarClass.length () * TCHAR.sizeof;
- int /*long*/ lpszClassName = OS.HeapAlloc (hHeap, OS.HEAP_ZERO_MEMORY, byteCount);
+ long /*int*/ lpszClassName = OS.HeapAlloc (hHeap, OS.HEAP_ZERO_MEMORY, byteCount);
OS.MoveMemory (lpszClassName, CalendarClass, byteCount);
lpWndClass.lpszClassName = lpszClassName;
OS.RegisterClass (lpWndClass);
@@ -222,7 +222,7 @@ public void addSelectionListener (SelectionListener listener) {
addListener (SWT.DefaultSelection, typedListener);
}
-int /*long*/ callWindowProc (int /*long*/ hwnd, int msg, int /*long*/ wParam, int /*long*/ lParam) {
+long /*int*/ callWindowProc (long /*int*/ hwnd, int msg, long /*int*/ wParam, long /*int*/ lParam) {
if (handle == 0) return 0;
return OS.CallWindowProc (windowProc (), hwnd, msg, wParam, lParam);
}
@@ -263,8 +263,8 @@ public Point computeSize (int wHint, int hHint, boolean changed) {
width = size.cx;
height = size.cy;
} else {
- int /*long*/ newFont, oldFont = 0;
- int /*long*/ hDC = OS.GetDC (handle);
+ long /*int*/ newFont, oldFont = 0;
+ long /*int*/ hDC = OS.GetDC (handle);
newFont = OS.SendMessage (handle, OS.WM_GETFONT, 0, 0);
if (newFont != 0) oldFont = OS.SelectObject (hDC, newFont);
RECT rect = new RECT ();
@@ -783,11 +783,11 @@ TCHAR windowClass () {
return (style & SWT.CALENDAR) != 0 ? CalendarClass : DateTimeClass;
}
-int /*long*/ windowProc () {
+long /*int*/ windowProc () {
return (style & SWT.CALENDAR) != 0 ? CalendarProc : DateTimeProc;
}
-LRESULT wmNotifyChild (NMHDR hdr, int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT wmNotifyChild (NMHDR hdr, long /*int*/ wParam, long /*int*/ lParam) {
switch (hdr.code) {
case OS.DTN_CLOSEUP: {
/*
@@ -822,7 +822,7 @@ LRESULT wmNotifyChild (NMHDR hdr, int /*long*/ wParam, int /*long*/ lParam) {
return super.wmNotifyChild (hdr, wParam, lParam);
}
-LRESULT WM_CHAR (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT WM_CHAR (long /*int*/ wParam, long /*int*/ lParam) {
LRESULT result = super.WM_CHAR (wParam, lParam);
if (result != null) return result;
/*
@@ -841,7 +841,7 @@ LRESULT WM_CHAR (int /*long*/ wParam, int /*long*/ lParam) {
return result;
}
-LRESULT WM_LBUTTONDBLCLK (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT WM_LBUTTONDBLCLK (long /*int*/ wParam, long /*int*/ lParam) {
LRESULT result = super.WM_LBUTTONDBLCLK (wParam, lParam);
if (isDisposed ()) return LRESULT.ZERO;
if ((style & SWT.CALENDAR) != 0) {
@@ -851,13 +851,13 @@ LRESULT WM_LBUTTONDBLCLK (int /*long*/ wParam, int /*long*/ lParam) {
pt.x = OS.GET_X_LPARAM (lParam);
pt.y = OS.GET_Y_LPARAM (lParam);
pMCHitTest.pt = pt;
- int /*long*/ code = OS.SendMessage (handle, OS.MCM_HITTEST, 0, pMCHitTest);
+ long /*int*/ code = OS.SendMessage (handle, OS.MCM_HITTEST, 0, pMCHitTest);
if ((code & OS.MCHT_CALENDARDATE) == OS.MCHT_CALENDARDATE) doubleClick = true;
}
return result;
}
-LRESULT WM_LBUTTONDOWN (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT WM_LBUTTONDOWN (long /*int*/ wParam, long /*int*/ lParam) {
LRESULT result = super.WM_LBUTTONDOWN (wParam, lParam);
if (result == LRESULT.ZERO) return result;
doubleClick = false;
@@ -872,7 +872,7 @@ LRESULT WM_LBUTTONDOWN (int /*long*/ wParam, int /*long*/ lParam) {
return result;
}
-LRESULT WM_LBUTTONUP (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT WM_LBUTTONUP (long /*int*/ wParam, long /*int*/ lParam) {
LRESULT result = super.WM_LBUTTONUP (wParam, lParam);
if (isDisposed ()) return LRESULT.ZERO;
if (doubleClick) sendSelectionEvent (SWT.DefaultSelection);
@@ -880,7 +880,7 @@ LRESULT WM_LBUTTONUP (int /*long*/ wParam, int /*long*/ lParam) {
return result;
}
-LRESULT WM_TIMER (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT WM_TIMER (long /*int*/ wParam, long /*int*/ lParam) {
LRESULT result = super.WM_TIMER (wParam, lParam);
if (result != null) return result;
/*
@@ -889,7 +889,7 @@ LRESULT WM_TIMER (int /*long*/ wParam, int /*long*/ lParam) {
* to ignore MCN_SELCHANGE during WM_TIMER.
*/
ignoreSelection = true;
- int /*long*/ code = callWindowProc(handle, OS.WM_TIMER, wParam, lParam);
+ long /*int*/ code = callWindowProc(handle, OS.WM_TIMER, wParam, lParam);
ignoreSelection = false;
return code == 0 ? LRESULT.ZERO : new LRESULT(code);
}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Decorations.java b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Decorations.java
index 27fd287fb4..14e1ac5626 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Decorations.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Decorations.java
@@ -103,7 +103,7 @@ public class Decorations extends Canvas {
Control savedFocus;
Button defaultButton, saveDefault;
int swFlags, nAccel;
- int /*long*/ hAccel;
+ long /*int*/ hAccel;
boolean moved, resized, opened;
int oldX = OS.CW_USEDEFAULT, oldY = OS.CW_USEDEFAULT;
int oldWidth = OS.CW_USEDEFAULT, oldHeight = OS.CW_USEDEFAULT;
@@ -171,7 +171,7 @@ void _setMaximized (boolean maximized) {
if (OS.IsPPC) {
/* Leave space for the menu bar */
if (menuBar != null) {
- int /*long*/ hwndCB = menuBar.hwndCB;
+ long /*int*/ hwndCB = menuBar.hwndCB;
RECT rectCB = new RECT ();
OS.GetWindowRect (hwndCB, rectCB);
height -= rectCB.bottom - rectCB.top;
@@ -299,7 +299,7 @@ protected void checkSubclass () {
if (!isValidSubclass ()) error (SWT.ERROR_INVALID_SUBCLASS);
}
-int /*long*/ callWindowProc (int /*long*/ hwnd, int msg, int /*long*/ wParam, int /*long*/ lParam) {
+long /*int*/ callWindowProc (long /*int*/ hwnd, int msg, long /*int*/ wParam, long /*int*/ lParam) {
if (handle == 0) return 0;
return OS.DefMDIChildProc (hwnd, msg, wParam, lParam);
}
@@ -448,7 +448,7 @@ public void dispose () {
super.dispose ();
}
-Menu findMenu (int /*long*/ hMenu) {
+Menu findMenu (long /*int*/ hMenu) {
if (menus == null) return null;
for (int i=0; i<menus.length; i++) {
Menu menu = menus [i];
@@ -509,7 +509,7 @@ public Rectangle getClientArea () {
if (OS.IsHPC) {
Rectangle rect = super.getClientArea ();
if (menuBar != null) {
- int /*long*/ hwndCB = menuBar.hwndCB;
+ long /*int*/ hwndCB = menuBar.hwndCB;
int height = OS.CommandBar_Height (hwndCB);
rect.y += height;
rect.height = Math.max (0, rect.height - height);
@@ -984,7 +984,7 @@ void setImages (Image image, Image [] images) {
if (smallImage != null) smallImage.dispose ();
if (largeImage != null) largeImage.dispose ();
smallImage = largeImage = null;
- int /*long*/ hSmallIcon = 0, hLargeIcon = 0;
+ long /*int*/ hSmallIcon = 0, hLargeIcon = 0;
Image smallIcon = null, largeIcon = null;
if (image != null) {
smallIcon = largeIcon = image;
@@ -1171,7 +1171,7 @@ public void setMenuBar (Menu menu) {
} else {
if (menu != null) display.removeBar (menu);
menuBar = menu;
- int /*long*/ hMenu = menuBar != null ? menuBar.handle: 0;
+ long /*int*/ hMenu = menuBar != null ? menuBar.handle: 0;
OS.SetMenu (handle, hMenu);
}
destroyAccelerators ();
@@ -1227,7 +1227,7 @@ void setParent () {
* undocumented and possibly dangerous Windows
* feature.
*/
- int /*long*/ hwndParent = parent.handle;
+ long /*int*/ hwndParent = parent.handle;
display.lockActiveWindow = true;
OS.SetParent (handle, hwndParent);
if (!OS.IsWindowVisible (hwndParent)) {
@@ -1299,7 +1299,7 @@ void setSavedFocus (Control control) {
void setSystemMenu () {
if (OS.IsWinCE) return;
- int /*long*/ hMenu = OS.GetSystemMenu (handle, false);
+ long /*int*/ hMenu = OS.GetSystemMenu (handle, false);
if (hMenu == 0) return;
int oldCount = OS.GetMenuItemCount (hMenu);
if ((style & SWT.RESIZE) == 0) {
@@ -1358,9 +1358,9 @@ public void setText (String string) {
TCHAR buffer = new TCHAR (0, string, true);
/* Ensure that the title appears in the task bar.*/
if ((state & FOREIGN_HANDLE) != 0) {
- int /*long*/ hHeap = OS.GetProcessHeap ();
+ long /*int*/ hHeap = OS.GetProcessHeap ();
int byteCount = buffer.length () * TCHAR.sizeof;
- int /*long*/ pszText = OS.HeapAlloc (hHeap, OS.HEAP_ZERO_MEMORY, byteCount);
+ long /*int*/ pszText = OS.HeapAlloc (hHeap, OS.HEAP_ZERO_MEMORY, byteCount);
OS.MoveMemory (pszText, buffer, byteCount);
OS.DefWindowProc (handle, OS.WM_SETTEXT, 0, pszText);
if (pszText != 0) OS.HeapFree (hHeap, 0, pszText);
@@ -1386,7 +1386,7 @@ public void setVisible (boolean visible) {
if (isDisposed ()) return;
if (OS.IsHPC) {
if (menuBar != null) {
- int /*long*/ hwndCB = menuBar.hwndCB;
+ long /*int*/ hwndCB = menuBar.hwndCB;
OS.CommandBar_DrawMenuBar (hwndCB, 0);
}
}
@@ -1492,7 +1492,7 @@ boolean translateMenuAccelerator (MSG msg) {
boolean translateMDIAccelerator (MSG msg) {
if (!(this instanceof Shell)) {
Shell shell = getShell ();
- int /*long*/ hwndMDIClient = shell.hwndMDIClient;
+ long /*int*/ hwndMDIClient = shell.hwndMDIClient;
if (hwndMDIClient != 0 && OS.TranslateMDISysAccel (hwndMDIClient, msg)) {
return true;
}
@@ -1570,7 +1570,7 @@ int widgetExtStyle () {
return bits;
}
-int /*long*/ widgetParent () {
+long /*int*/ widgetParent () {
Shell shell = getShell ();
return shell.hwndMDIClient ();
}
@@ -1617,7 +1617,7 @@ int widgetStyle () {
return bits;
}
-int /*long*/ windowProc (int /*long*/ hwnd, int msg, int /*long*/ wParam, int /*long*/ lParam) {
+long /*int*/ windowProc (long /*int*/ hwnd, int msg, long /*int*/ wParam, long /*int*/ lParam) {
switch (msg) {
case Display.SWT_GETACCEL:
case Display.SWT_GETACCELCOUNT:
@@ -1627,7 +1627,7 @@ int /*long*/ windowProc (int /*long*/ hwnd, int msg, int /*long*/ wParam, int /*
return super.windowProc (hwnd, msg, wParam, lParam);
}
-LRESULT WM_ACTIVATE (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT WM_ACTIVATE (long /*int*/ wParam, long /*int*/ lParam) {
LRESULT result = super.WM_ACTIVATE (wParam, lParam);
if (result != null) return result;
/*
@@ -1688,14 +1688,14 @@ LRESULT WM_ACTIVATE (int /*long*/ wParam, int /*long*/ lParam) {
return result;
}
-LRESULT WM_CLOSE (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT WM_CLOSE (long /*int*/ wParam, long /*int*/ lParam) {
LRESULT result = super.WM_CLOSE (wParam, lParam);
if (result != null) return result;
if (isEnabled () && isActive ()) closeWidget ();
return LRESULT.ZERO;
}
-LRESULT WM_HOTKEY (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT WM_HOTKEY (long /*int*/ wParam, long /*int*/ lParam) {
LRESULT result = super.WM_HOTKEY (wParam, lParam);
if (result != null) return result;
if (OS.IsSP) {
@@ -1721,13 +1721,13 @@ LRESULT WM_HOTKEY (int /*long*/ wParam, int /*long*/ lParam) {
return result;
}
-LRESULT WM_KILLFOCUS (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT WM_KILLFOCUS (long /*int*/ wParam, long /*int*/ lParam) {
LRESULT result = super.WM_KILLFOCUS (wParam, lParam);
saveFocus ();
return result;
}
-LRESULT WM_MOVE (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT WM_MOVE (long /*int*/ wParam, long /*int*/ lParam) {
if (moved) {
Point location = getLocation ();
if (location.x == oldX && location.y == oldY) {
@@ -1739,7 +1739,7 @@ LRESULT WM_MOVE (int /*long*/ wParam, int /*long*/ lParam) {
return super.WM_MOVE (wParam, lParam);
}
-LRESULT WM_NCACTIVATE (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT WM_NCACTIVATE (long /*int*/ wParam, long /*int*/ lParam) {
LRESULT result = super.WM_NCACTIVATE (wParam, lParam);
if (result != null) return result;
if (wParam == 0) {
@@ -1759,13 +1759,13 @@ LRESULT WM_NCACTIVATE (int /*long*/ wParam, int /*long*/ lParam) {
}
}
if (!(this instanceof Shell)) {
- int /*long*/ hwndShell = getShell().handle;
+ long /*int*/ hwndShell = getShell().handle;
OS.SendMessage (hwndShell, OS.WM_NCACTIVATE, wParam, lParam);
}
return result;
}
-LRESULT WM_QUERYOPEN (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT WM_QUERYOPEN (long /*int*/ wParam, long /*int*/ lParam) {
LRESULT result = super.WM_QUERYOPEN (wParam, lParam);
if (result != null) return result;
sendEvent (SWT.Deiconify);
@@ -1773,14 +1773,14 @@ LRESULT WM_QUERYOPEN (int /*long*/ wParam, int /*long*/ lParam) {
return result;
}
-LRESULT WM_SETFOCUS (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT WM_SETFOCUS (long /*int*/ wParam, long /*int*/ lParam) {
LRESULT result = super.WM_SETFOCUS (wParam, lParam);
if (isDisposed ()) return result;
if (savedFocus != this) restoreFocus ();
return result;
}
-LRESULT WM_SIZE (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT WM_SIZE (long /*int*/ wParam, long /*int*/ lParam) {
LRESULT result = null;
boolean changed = true;
if (resized) {
@@ -1815,7 +1815,7 @@ LRESULT WM_SIZE (int /*long*/ wParam, int /*long*/ lParam) {
return result;
}
-LRESULT WM_SYSCOMMAND (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT WM_SYSCOMMAND (long /*int*/ wParam, long /*int*/ lParam) {
LRESULT result = super.WM_SYSCOMMAND (wParam, lParam);
if (result != null) return result;
if (!(this instanceof Shell)) {
@@ -1834,7 +1834,7 @@ LRESULT WM_SYSCOMMAND (int /*long*/ wParam, int /*long*/ lParam) {
return result;
}
-LRESULT WM_WINDOWPOSCHANGING (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT WM_WINDOWPOSCHANGING (long /*int*/ wParam, long /*int*/ lParam) {
LRESULT result = super.WM_WINDOWPOSCHANGING (wParam, lParam);
if (result != null) return result;
if (display.lockActiveWindow) {
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/DirectoryDialog.java b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/DirectoryDialog.java
index 610911b510..3d00a4c068 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/DirectoryDialog.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/DirectoryDialog.java
@@ -84,7 +84,7 @@ public DirectoryDialog (Shell parent, int style) {
checkSubclass ();
}
-int /*long*/ BrowseCallbackProc (int /*long*/ hwnd, int /*long*/ uMsg, int /*long*/ lParam, int /*long*/ lpData) {
+long /*int*/ BrowseCallbackProc (long /*int*/ hwnd, long /*int*/ uMsg, long /*int*/ lParam, long /*int*/ lpData) {
switch ((int)/*64*/uMsg) {
case OS.BFFM_INITIALIZED:
if (filterPath != null && filterPath.length () != 0) {
@@ -149,14 +149,14 @@ public String getMessage () {
public String open () {
if (OS.IsWinCE) error (SWT.ERROR_NOT_IMPLEMENTED);
- int /*long*/ hHeap = OS.GetProcessHeap ();
+ long /*int*/ hHeap = OS.GetProcessHeap ();
/* Get the owner HWND for the dialog */
- int /*long*/ hwndOwner = 0;
+ long /*int*/ hwndOwner = 0;
if (parent != null) hwndOwner = parent.handle;
/* Copy the message to OS memory */
- int /*long*/ lpszTitle = 0;
+ long /*int*/ lpszTitle = 0;
if (message.length () != 0) {
String string = message;
if (string.indexOf ('&') != -1) {
@@ -179,7 +179,7 @@ public String open () {
/* Create the BrowseCallbackProc */
Callback callback = new Callback (this, "BrowseCallbackProc", 4); //$NON-NLS-1$
- int /*long*/ lpfn = callback.getAddress ();
+ long /*int*/ lpfn = callback.getAddress ();
if (lpfn == 0) error (SWT.ERROR_NO_MORE_CALLBACKS);
/* Make the parent shell be temporary modal */
@@ -228,7 +228,7 @@ public String open () {
*/
boolean oldRunMessages = display.runMessages;
if (OS.COMCTL32_MAJOR < 6) display.runMessages = false;
- int /*long*/ lpItemIdList = OS.SHBrowseForFolder (lpbi);
+ long /*int*/ lpItemIdList = OS.SHBrowseForFolder (lpbi);
if (OS.COMCTL32_MAJOR < 6) display.runMessages = oldRunMessages;
OS.SetErrorMode (oldErrorMode);
@@ -254,7 +254,7 @@ public String open () {
if (lpszTitle != 0) OS.HeapFree (hHeap, 0, lpszTitle);
/* Free the pointer to the ITEMIDLIST */
- int /*long*/ [] ppMalloc = new int /*long*/ [1];
+ long /*int*/ [] ppMalloc = new long /*int*/ [1];
if (OS.SHGetMalloc (ppMalloc) == OS.S_OK) {
/* void Free (struct IMalloc *this, void *pv); */
OS.VtblCall (5, ppMalloc [0], lpItemIdList);
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Display.java b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Display.java
index 230c484ca0..ccbeb0b84c 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Display.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Display.java
@@ -117,7 +117,7 @@ public class Display extends Device {
/* Windows and Events */
Event [] eventQueue;
Callback windowCallback;
- int /*long*/ windowProc;
+ long /*int*/ windowProc;
int threadId;
TCHAR windowClass, windowShadowClass, windowOwnDCClass;
static int WindowClassCount;
@@ -131,7 +131,7 @@ public class Display extends Device {
int freeSlot;
int [] indexTable;
Control lastControl, lastGetControl;
- int /*long*/ lastHwnd, lastGetHwnd;
+ long /*int*/ lastHwnd, lastGetHwnd;
Control [] controlTable;
static final int GROW_SIZE = 1024;
static final int SWT_OBJECT_INDEX;
@@ -155,7 +155,7 @@ public class Display extends Device {
}
/* XP Themes */
- int /*long*/ hButtonTheme, hEditTheme, hExplorerBarTheme, hScrollBarTheme, hTabTheme;
+ long /*int*/ hButtonTheme, hEditTheme, hExplorerBarTheme, hScrollBarTheme, hTabTheme;
static final char [] BUTTON = new char [] {'B', 'U', 'T', 'T', 'O', 'N', 0};
static final char [] EDIT = new char [] {'E', 'D', 'I', 'T', 0};
static final char [] EXPLORER = new char [] {'E', 'X', 'P', 'L', 'O', 'R', 'E', 'R', 0};
@@ -185,18 +185,18 @@ public class Display extends Device {
/* Filter Hook */
Callback msgFilterCallback;
- int /*long*/ msgFilterProc, filterHook;
+ long /*int*/ msgFilterProc, filterHook;
MSG hookMsg = new MSG ();
boolean runDragDrop = true, dragCancelled = false;
/* Idle Hook */
Callback foregroundIdleCallback;
- int /*long*/ foregroundIdleProc, idleHook;
+ long /*int*/ foregroundIdleProc, idleHook;
/* Message Hook and Embedding */
boolean ignoreNextKey;
Callback getMsgCallback, embeddedCallback;
- int /*long*/ getMsgProc, msgHook, embeddedHwnd, embeddedProc;
+ long /*int*/ getMsgProc, msgHook, embeddedHwnd, embeddedProc;
static final String AWT_WINDOW_CLASS = "SunAwtWindow"; //$NON-NLS-1$
static final short [] ACCENTS = new short [] {'~', '`', '\'', '^', '"'};
@@ -226,19 +226,19 @@ public class Display extends Device {
static final String LAUNCHER_PREFIX = "--launcher.openFile "; //$NON-NLS-1$
/* Timers */
- int /*long*/ [] timerIds;
+ long /*int*/ [] timerIds;
Runnable [] timerList;
- int /*long*/ nextTimerId = SETTINGS_ID + 1;
+ long /*int*/ nextTimerId = SETTINGS_ID + 1;
/* Settings */
- static final int /*long*/ SETTINGS_ID = 100;
+ static final long /*int*/ SETTINGS_ID = 100;
static final int SETTINGS_DELAY = 2000;
boolean lastHighContrast, sendSettings;
/* Keyboard and Mouse */
RECT clickRect;
int clickCount, lastTime, lastButton;
- int /*long*/ lastClickHwnd;
+ long /*int*/ lastClickHwnd;
int scrollRemainder, scrollHRemainder;
int lastKey, lastMouse, lastAscii;
boolean lastVirtual, lastNull, lastDead;
@@ -264,7 +264,7 @@ public class Display extends Device {
/* Message Only Window */
Callback messageCallback;
- int /*long*/ hwndMessage, messageProc;
+ long /*int*/ hwndMessage, messageProc;
/* System Resources */
LOGFONT lfSystemFont;
@@ -278,7 +278,7 @@ public class Display extends Device {
ImageList[] imageList, toolImageList, toolHotImageList, toolDisabledImageList;
/* Custom Colors for ChooseColor */
- int /*long*/ lpCustColors;
+ long /*int*/ lpCustColors;
/* Sort Indicators */
Image upArrow, downArrow;
@@ -287,7 +287,7 @@ public class Display extends Device {
char [] tableBuffer;
NMHDR hdr = new NMHDR ();
NMLVDISPINFO plvfi = new NMLVDISPINFO ();
- int /*long*/ hwndParent;
+ long /*int*/ hwndParent;
int columnCount;
boolean [] columnVisible;
@@ -512,7 +512,7 @@ void addBar (Menu menu) {
bars [index] = menu;
}
-void addControl (int /*long*/ handle, Control control) {
+void addControl (long /*int*/ handle, Control control) {
if (handle == 0) return;
if (freeSlot == -1) {
int length = (freeSlot = indexTable.length) + GROW_SIZE;
@@ -843,9 +843,9 @@ protected void create (DeviceData data) {
void createDisplay (DeviceData data) {
}
-static int /*long*/ create32bitDIB (Image image) {
+static long /*int*/ create32bitDIB (Image image) {
int transparentPixel = -1, alpha = -1;
- int /*long*/ hMask = 0, hBitmap = 0;
+ long /*int*/ hMask = 0, hBitmap = 0;
byte[] alphaData = null;
switch (image.type) {
case SWT.ICON:
@@ -866,10 +866,10 @@ static int /*long*/ create32bitDIB (Image image) {
OS.GetObject (hBitmap, BITMAP.sizeof, bm);
int imgWidth = bm.bmWidth;
int imgHeight = bm.bmHeight;
- int /*long*/ hDC = OS.GetDC (0);
- int /*long*/ srcHdc = OS.CreateCompatibleDC (hDC);
- int /*long*/ oldSrcBitmap = OS.SelectObject (srcHdc, hBitmap);
- int /*long*/ memHdc = OS.CreateCompatibleDC (hDC);
+ long /*int*/ hDC = OS.GetDC (0);
+ long /*int*/ srcHdc = OS.CreateCompatibleDC (hDC);
+ long /*int*/ oldSrcBitmap = OS.SelectObject (srcHdc, hBitmap);
+ long /*int*/ memHdc = OS.CreateCompatibleDC (hDC);
BITMAPINFOHEADER bmiHeader = new BITMAPINFOHEADER ();
bmiHeader.biSize = BITMAPINFOHEADER.sizeof;
bmiHeader.biWidth = imgWidth;
@@ -879,10 +879,10 @@ static int /*long*/ create32bitDIB (Image image) {
bmiHeader.biCompression = OS.BI_RGB;
byte [] bmi = new byte [BITMAPINFOHEADER.sizeof];
OS.MoveMemory (bmi, bmiHeader, BITMAPINFOHEADER.sizeof);
- int /*long*/ [] pBits = new int /*long*/ [1];
- int /*long*/ memDib = OS.CreateDIBSection (0, bmi, OS.DIB_RGB_COLORS, pBits, 0, 0);
+ long /*int*/ [] pBits = new long /*int*/ [1];
+ long /*int*/ memDib = OS.CreateDIBSection (0, bmi, OS.DIB_RGB_COLORS, pBits, 0, 0);
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;
@@ -991,15 +991,15 @@ static int /*long*/ create32bitDIB (Image image) {
if (hMask != 0) OS.DeleteObject (hMask);
return memDib;
}
-static int /*long*/ create32bitDIB (int /*long*/ hBitmap, int alpha, byte [] alphaData, int transparentPixel) {
+static long /*int*/ create32bitDIB (long /*int*/ hBitmap, int alpha, byte [] alphaData, int transparentPixel) {
BITMAP bm = new BITMAP ();
OS.GetObject (hBitmap, BITMAP.sizeof, bm);
int imgWidth = bm.bmWidth;
int imgHeight = bm.bmHeight;
- int /*long*/ hDC = OS.GetDC (0);
- int /*long*/ srcHdc = OS.CreateCompatibleDC (hDC);
- int /*long*/ oldSrcBitmap = OS.SelectObject (srcHdc, hBitmap);
- int /*long*/ memHdc = OS.CreateCompatibleDC (hDC);
+ long /*int*/ hDC = OS.GetDC (0);
+ long /*int*/ srcHdc = OS.CreateCompatibleDC (hDC);
+ long /*int*/ oldSrcBitmap = OS.SelectObject (srcHdc, hBitmap);
+ long /*int*/ memHdc = OS.CreateCompatibleDC (hDC);
BITMAPINFOHEADER bmiHeader = new BITMAPINFOHEADER ();
bmiHeader.biSize = BITMAPINFOHEADER.sizeof;
bmiHeader.biWidth = imgWidth;
@@ -1009,10 +1009,10 @@ static int /*long*/ create32bitDIB (int /*long*/ hBitmap, int alpha, byte [] alp
bmiHeader.biCompression = OS.BI_RGB;
byte [] bmi = new byte [BITMAPINFOHEADER.sizeof];
OS.MoveMemory (bmi, bmiHeader, BITMAPINFOHEADER.sizeof);
- int /*long*/ [] pBits = new int /*long*/ [1];
- int /*long*/ memDib = OS.CreateDIBSection (0, bmi, OS.DIB_RGB_COLORS, pBits, 0, 0);
+ long /*int*/ [] pBits = new long /*int*/ [1];
+ long /*int*/ memDib = OS.CreateDIBSection (0, bmi, OS.DIB_RGB_COLORS, pBits, 0, 0);
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;
@@ -1090,9 +1090,9 @@ static Image createIcon (Image image) {
return new Image (device, data, mask);
}
int width = data.width, height = data.height;
- int /*long*/ hMask, hBitmap;
- int /*long*/ hDC = device.internal_new_GC (null);
- int /*long*/ dstHdc = OS.CreateCompatibleDC (hDC), oldDstBitmap;
+ long /*int*/ hMask, hBitmap;
+ long /*int*/ hDC = device.internal_new_GC (null);
+ long /*int*/ dstHdc = OS.CreateCompatibleDC (hDC), oldDstBitmap;
if (!OS.IsWinCE && OS.WIN32_VERSION >= OS.VERSION (5, 1)) {
hBitmap = Display.create32bitDIB (image.handle, data.alpha, data.alphaData, data.transparentPixel);
hMask = OS.CreateBitmap (width, height, 1, 1, null);
@@ -1103,8 +1103,8 @@ static Image createIcon (Image image) {
/* Icons need black pixels where the mask is transparent */
hBitmap = OS.CreateCompatibleBitmap (hDC, width, height);
oldDstBitmap = OS.SelectObject (dstHdc, hBitmap);
- int /*long*/ srcHdc = OS.CreateCompatibleDC (hDC);
- int /*long*/ oldSrcBitmap = OS.SelectObject (srcHdc, image.handle);
+ long /*int*/ srcHdc = OS.CreateCompatibleDC (hDC);
+ long /*int*/ oldSrcBitmap = OS.SelectObject (srcHdc, image.handle);
OS.PatBlt (dstHdc, 0, 0, width, height, OS.BLACKNESS);
OS.BitBlt (dstHdc, 0, 0, width, height, srcHdc, 0, 0, OS.SRCINVERT);
OS.SelectObject (srcHdc, hMask);
@@ -1121,14 +1121,14 @@ static Image createIcon (Image image) {
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);
return Image.win32_new (device, SWT.ICON, hIcon);
}
-static int /*long*/ createMaskFromAlpha (ImageData data, int destWidth, int destHeight) {
+static long /*int*/ createMaskFromAlpha (ImageData data, int destWidth, int destHeight) {
int srcWidth = data.width;
int srcHeight = data.height;
ImageData mask = ImageData.internal_new (srcWidth, srcHeight, 1,
@@ -1140,13 +1140,13 @@ static int /*long*/ createMaskFromAlpha (ImageData data, int destWidth, int dest
mask.setPixel (x, y, (data.alphaData [ap++] & 0xff) <= 127 ? 1 : 0);
}
}
- int /*long*/ hMask = OS.CreateBitmap (srcWidth, srcHeight, 1, 1, mask.data);
+ long /*int*/ hMask = OS.CreateBitmap (srcWidth, srcHeight, 1, 1, mask.data);
if (srcWidth != destWidth || srcHeight != destHeight) {
- int /*long*/ hdc = OS.GetDC (0);
- int /*long*/ hdc1 = OS.CreateCompatibleDC (hdc);
+ long /*int*/ hdc = OS.GetDC (0);
+ long /*int*/ hdc1 = OS.CreateCompatibleDC (hdc);
OS.SelectObject (hdc1, hMask);
- int /*long*/ hdc2 = OS.CreateCompatibleDC (hdc);
- int /*long*/ hMask2 = OS.CreateBitmap (destWidth, destHeight, 1, 1, null);
+ long /*int*/ hdc2 = OS.CreateCompatibleDC (hdc);
+ long /*int*/ hMask2 = OS.CreateBitmap (destWidth, destHeight, 1, 1, null);
OS.SelectObject (hdc2, hMask2);
if (!OS.IsWinCE) OS.SetStretchBltMode(hdc2, OS.COLORONCOLOR);
OS.StretchBlt (hdc2, 0, 0, destWidth, destHeight, hdc1, 0, 0, srcWidth, srcHeight, OS.SRCCOPY);
@@ -1223,14 +1223,14 @@ void drawMenuBars () {
bars = null;
}
-int /*long*/ embeddedProc (int /*long*/ hwnd, int /*long*/ msg, int /*long*/ wParam, int /*long*/ lParam) {
+long /*int*/ embeddedProc (long /*int*/ hwnd, long /*int*/ msg, long /*int*/ wParam, long /*int*/ lParam) {
switch ((int)/*64*/msg) {
case SWT_KEYMSG: {
MSG keyMsg = new MSG ();
OS.MoveMemory (keyMsg, lParam, MSG.sizeof);
OS.TranslateMessage (keyMsg);
OS.DispatchMessage (keyMsg);
- int /*long*/ hHeap = OS.GetProcessHeap ();
+ long /*int*/ hHeap = OS.GetProcessHeap ();
OS.HeapFree (hHeap, 0, lParam);
break;
}
@@ -1283,9 +1283,9 @@ boolean filterMessage (MSG msg) {
return false;
}
-Control findControl (int /*long*/ handle) {
+Control findControl (long /*int*/ handle) {
if (handle == 0) return null;
- int /*long*/ hwndOwner = 0;
+ long /*int*/ hwndOwner = 0;
do {
Control control = getControl (handle);
if (control != null) return control;
@@ -1315,7 +1315,7 @@ Control findControl (int /*long*/ handle) {
*
* @noreference This method is not intended to be referenced by clients.
*/
-public Widget findWidget (int /*long*/ handle) {
+public Widget findWidget (long /*int*/ handle) {
checkDevice ();
return getControl (handle);
}
@@ -1344,7 +1344,7 @@ public Widget findWidget (int /*long*/ handle) {
*
* @since 3.1
*/
-public Widget findWidget (int /*long*/ handle, int /*long*/ id) {
+public Widget findWidget (long /*int*/ handle, long /*int*/ id) {
checkDevice ();
//TODO - should ids be long
Control control = getControl (handle);
@@ -1368,7 +1368,7 @@ public Widget findWidget (int /*long*/ handle, int /*long*/ id) {
*
* @since 3.3
*/
-public Widget findWidget (Widget widget, int /*long*/ id) {
+public Widget findWidget (Widget widget, long /*int*/ id) {
checkDevice ();
//TODO - should ids be long
if (widget instanceof Control) {
@@ -1377,7 +1377,7 @@ public Widget findWidget (Widget widget, int /*long*/ id) {
return null;
}
-int /*long*/ foregroundIdleProc (int /*long*/ code, int /*long*/ wParam, int /*long*/ lParam) {
+long /*int*/ foregroundIdleProc (long /*int*/ code, long /*int*/ wParam, long /*int*/ lParam) {
if (code >= 0) {
if (runMessages && getMessageCount () != 0) {
if (runMessagesInIdle) {
@@ -1430,7 +1430,7 @@ public static Display findDisplay (Thread thread) {
}
}
-TouchSource findTouchSource (int /*long*/ touchDevice, Monitor monitor) {
+TouchSource findTouchSource (long /*int*/ touchDevice, Monitor monitor) {
if (touchSources == null) touchSources = new TouchSource [4];
int length = touchSources.length;
for (int i=0; i<length; i++) {
@@ -1522,7 +1522,7 @@ public static Display getCurrent () {
return findDisplay (Thread.currentThread ());
}
-int getClickCount (int type, int button, int /*long*/ hwnd, int /*long*/ lParam) {
+int getClickCount (int type, int button, long /*int*/ hwnd, long /*int*/ lParam) {
switch (type) {
case SWT.MouseDown:
int doubleClick = OS.GetDoubleClickTime ();
@@ -1580,7 +1580,7 @@ public Rectangle getClientArea () {
return new Rectangle (x, y, width, height);
}
-Control getControl (int /*long*/ handle) {
+Control getControl (long /*int*/ handle) {
if (handle == 0) return null;
if (lastControl != null && lastHwnd == handle) {
return lastControl;
@@ -1889,7 +1889,7 @@ public int getIconDepth () {
/* Use the character encoding for the default locale */
TCHAR buffer1 = new TCHAR (0, "Control Panel\\Desktop\\WindowMetrics", true); //$NON-NLS-1$
- int /*long*/ [] phkResult = new int /*long*/ [1];
+ long /*int*/ [] phkResult = new long /*int*/ [1];
int result = OS.RegOpenKeyEx (OS.HKEY_CURRENT_USER, buffer1, 0, OS.KEY_READ, phkResult);
if (result != 0) return 4;
int depth = 4;
@@ -2097,7 +2097,7 @@ public Monitor [] getMonitors () {
}
monitors = new Monitor [4];
Callback callback = new Callback (this, "monitorEnumProc", 4); //$NON-NLS-1$
- int /*long*/ lpfnEnum = callback.getAddress ();
+ long /*int*/ lpfnEnum = callback.getAddress ();
if (lpfnEnum == 0) error (SWT.ERROR_NO_MORE_CALLBACKS);
OS.EnumDisplayMonitors (0, null, lpfnEnum, 0);
callback.dispose ();
@@ -2108,9 +2108,9 @@ public Monitor [] getMonitors () {
return result;
}
-int /*long*/ getMsgProc (int /*long*/ code, int /*long*/ wParam, int /*long*/ lParam) {
+long /*int*/ getMsgProc (long /*int*/ code, long /*int*/ wParam, long /*int*/ lParam) {
if (embeddedHwnd == 0) {
- int /*long*/ hInstance = OS.GetModuleHandle (null);
+ long /*int*/ hInstance = OS.GetModuleHandle (null);
embeddedHwnd = OS.CreateWindowEx (0,
windowClass,
null,
@@ -2135,8 +2135,8 @@ int /*long*/ getMsgProc (int /*long*/ code, int /*long*/ wParam, int /*long*/ lP
case OS.WM_SYSKEYUP: {
Control control = findControl (msg.hwnd);
if (control != null) {
- int /*long*/ hHeap = OS.GetProcessHeap ();
- int /*long*/ keyMsg = OS.HeapAlloc (hHeap, OS.HEAP_ZERO_MEMORY, MSG.sizeof);
+ long /*int*/ hHeap = OS.GetProcessHeap ();
+ long /*int*/ keyMsg = OS.HeapAlloc (hHeap, OS.HEAP_ZERO_MEMORY, MSG.sizeof);
OS.MoveMemory (keyMsg, msg, MSG.sizeof);
OS.PostMessage (hwndMessage, SWT_KEYMSG, wParam, keyMsg);
switch ((int)/*64*/msg.wParam) {
@@ -2183,7 +2183,7 @@ public Monitor getPrimaryMonitor () {
}
monitors = new Monitor [4];
Callback callback = new Callback (this, "monitorEnumProc", 4); //$NON-NLS-1$
- int /*long*/ lpfnEnum = callback.getAddress ();
+ long /*int*/ lpfnEnum = callback.getAddress ();
if (lpfnEnum == 0) error (SWT.ERROR_NO_MORE_CALLBACKS);
OS.EnumDisplayMonitors (0, null, lpfnEnum, 0);
callback.dispose ();
@@ -2458,7 +2458,7 @@ public Cursor getSystemCursor (int id) {
public Font getSystemFont () {
checkDevice ();
if (systemFont != null) return systemFont;
- int /*long*/ hFont = 0;
+ long /*int*/ hFont = 0;
if (!OS.IsWinCE) {
NONCLIENTMETRICS info = OS.IsUnicode ? (NONCLIENTMETRICS) new NONCLIENTMETRICSW () : new NONCLIENTMETRICSA ();
info.cbSize = NONCLIENTMETRICS.sizeof;
@@ -2504,23 +2504,23 @@ public Image getSystemImage (int id) {
switch (id) {
case SWT.ICON_ERROR: {
if (errorImage != null) return errorImage;
- int /*long*/ hIcon = OS.LoadImage (0, OS.OIC_HAND, OS.IMAGE_ICON, 0, 0, OS.LR_SHARED);
+ long /*int*/ hIcon = OS.LoadImage (0, OS.OIC_HAND, OS.IMAGE_ICON, 0, 0, OS.LR_SHARED);
return errorImage = Image.win32_new (this, SWT.ICON, hIcon);
}
case SWT.ICON_WORKING:
case SWT.ICON_INFORMATION: {
if (infoImage != null) return infoImage;
- int /*long*/ hIcon = OS.LoadImage (0, OS.OIC_INFORMATION, OS.IMAGE_ICON, 0, 0, OS.LR_SHARED);
+ long /*int*/ hIcon = OS.LoadImage (0, OS.OIC_INFORMATION, OS.IMAGE_ICON, 0, 0, OS.LR_SHARED);
return infoImage = Image.win32_new (this, SWT.ICON, hIcon);
}
case SWT.ICON_QUESTION: {
if (questionImage != null) return questionImage;
- int /*long*/ hIcon = OS.LoadImage (0, OS.OIC_QUES, OS.IMAGE_ICON, 0, 0, OS.LR_SHARED);
+ long /*int*/ hIcon = OS.LoadImage (0, OS.OIC_QUES, OS.IMAGE_ICON, 0, 0, OS.LR_SHARED);
return questionImage = Image.win32_new (this, SWT.ICON, hIcon);
}
case SWT.ICON_WARNING: {
if (warningIcon != null) return warningIcon;
- int /*long*/ hIcon = OS.LoadImage (0, OS.OIC_BANG, OS.IMAGE_ICON, 0, 0, OS.LR_SHARED);
+ long /*int*/ hIcon = OS.LoadImage (0, OS.OIC_BANG, OS.IMAGE_ICON, 0, 0, OS.LR_SHARED);
return warningIcon = Image.win32_new (this, SWT.ICON, hIcon);
}
}
@@ -2620,27 +2620,27 @@ public boolean getTouchEnabled () {
return (value & (OS.NID_READY | OS.NID_MULTI_INPUT)) == (OS.NID_READY | OS.NID_MULTI_INPUT);
}
-int /*long*/ hButtonTheme () {
+long /*int*/ hButtonTheme () {
if (hButtonTheme != 0) return hButtonTheme;
return hButtonTheme = OS.OpenThemeData (hwndMessage, BUTTON);
}
-int /*long*/ hEditTheme () {
+long /*int*/ hEditTheme () {
if (hEditTheme != 0) return hEditTheme;
return hEditTheme = OS.OpenThemeData (hwndMessage, EDIT);
}
-int /*long*/ hExplorerBarTheme () {
+long /*int*/ hExplorerBarTheme () {
if (hExplorerBarTheme != 0) return hExplorerBarTheme;
return hExplorerBarTheme = OS.OpenThemeData (hwndMessage, EXPLORERBAR);
}
-int /*long*/ hScrollBarTheme () {
+long /*int*/ hScrollBarTheme () {
if (hScrollBarTheme != 0) return hScrollBarTheme;
return hScrollBarTheme = OS.OpenThemeData (hwndMessage, SCROLLBAR);
}
-int /*long*/ hTabTheme () {
+long /*int*/ hTabTheme () {
if (hTabTheme != 0) return hTabTheme;
return hTabTheme = OS.OpenThemeData (hwndMessage, TAB);
}
@@ -2667,9 +2667,9 @@ int /*long*/ hTabTheme () {
*
* @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 (isDisposed()) error(SWT.ERROR_DEVICE_DISPOSED);
- int /*long*/ hDC = OS.GetDC (0);
+ long /*int*/ hDC = OS.GetDC (0);
if (hDC == 0) error (SWT.ERROR_NO_HANDLES);
if (data != null) {
int mask = SWT.LEFT_TO_RIGHT | SWT.RIGHT_TO_LEFT;
@@ -2703,7 +2703,7 @@ protected void init () {
int length = APP_NAME.length ();
appName = new char [length + 1];
APP_NAME.getChars (0, length, appName, 0);
- int /*long*/ [] appID = new int /*long*/ [1];
+ long /*int*/ [] appID = new long /*int*/ [1];
if (OS.GetCurrentProcessExplicitAppUserModelID(appID) != 0) {
OS.SetCurrentProcessExplicitAppUserModelID (appName);
}
@@ -2726,8 +2726,8 @@ protected void init () {
WindowClassCount++;
/* Register the SWT window class */
- int /*long*/ hHeap = OS.GetProcessHeap ();
- int /*long*/ hInstance = OS.GetModuleHandle (null);
+ long /*int*/ hHeap = OS.GetProcessHeap ();
+ long /*int*/ hInstance = OS.GetModuleHandle (null);
WNDCLASS lpWndClass = new WNDCLASS ();
lpWndClass.hInstance = hInstance;
lpWndClass.lpfnWndProc = windowProc;
@@ -2822,7 +2822,7 @@ protected void init () {
if (appName != null) {
/* Delete any old jump list set for the ID */
- int /*long*/ [] ppv = new int /*long*/ [1];
+ long /*int*/ [] ppv = new long /*int*/ [1];
int hr = OS.CoCreateInstance (TaskBar.CLSID_DestinationList, 0, OS.CLSCTX_INPROC_SERVER, TaskBar.IID_ICustomDestinationList, ppv);
if (hr == OS.S_OK) {
/*ICustomDestinationList::DeleteList*/
@@ -2862,7 +2862,7 @@ protected void init () {
*
* @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.ReleaseDC (0, hDC);
}
@@ -2872,7 +2872,7 @@ boolean isXMouseActive () {
*/
boolean xMouseActive = false;
TCHAR key = new TCHAR (0, "Control Panel\\Desktop", true); //$NON-NLS-1$
- int /*long*/ [] phKey = new int /*long*/ [1];
+ long /*int*/ [] phKey = new long /*int*/ [1];
int result = OS.RegOpenKeyEx (OS.HKEY_CURRENT_USER, key, 0, OS.KEY_READ, phKey);
if (result == 0) {
TCHAR lpValueName = new TCHAR (0, "UserPreferencesMask", true); //$NON-NLS-1$
@@ -2971,8 +2971,8 @@ public Point map (Control from, Control to, int x, int y) {
if (from != null && from.isDisposed()) error (SWT.ERROR_INVALID_ARGUMENT);
if (to != null && to.isDisposed()) error (SWT.ERROR_INVALID_ARGUMENT);
if (from == to) return new Point (x, y);
- int /*long*/ hwndFrom = from != null ? from.handle : 0;
- int /*long*/ hwndTo = to != null ? to.handle : 0;
+ long /*int*/ hwndFrom = from != null ? from.handle : 0;
+ long /*int*/ hwndTo = to != null ? to.handle : 0;
POINT point = new POINT ();
point.x = x;
point.y = y;
@@ -3065,8 +3065,8 @@ public Rectangle map (Control from, Control to, int x, int y, int width, int hei
if (from != null && from.isDisposed()) error (SWT.ERROR_INVALID_ARGUMENT);
if (to != null && to.isDisposed()) error (SWT.ERROR_INVALID_ARGUMENT);
if (from == to) return new Rectangle (x, y, width, height);
- int /*long*/ hwndFrom = from != null ? from.handle : 0;
- int /*long*/ hwndTo = to != null ? to.handle : 0;
+ long /*int*/ hwndFrom = from != null ? from.handle : 0;
+ long /*int*/ hwndTo = to != null ? to.handle : 0;
RECT rect = new RECT ();
rect.left = x;
rect.top = y;
@@ -3117,7 +3117,7 @@ static char mbcsToWcs (int ch, int codePage) {
return unicode [0];
}
-int /*long*/ messageProc (int /*long*/ hwnd, int /*long*/ msg, int /*long*/ wParam, int /*long*/ lParam) {
+long /*int*/ messageProc (long /*int*/ hwnd, long /*int*/ msg, long /*int*/ wParam, long /*int*/ lParam) {
switch ((int)/*64*/msg) {
case SWT_RUNASYNC: {
if (runMessagesInIdle) runAsyncMessages (false);
@@ -3221,7 +3221,7 @@ int /*long*/ messageProc (int /*long*/ hwnd, int /*long*/ msg, int /*long*/ wPar
consumed = true;
}
if (consumed) {
- int /*long*/ hHeap = OS.GetProcessHeap ();
+ long /*int*/ hHeap = OS.GetProcessHeap ();
OS.HeapFree (hHeap, 0, lParam);
} else {
OS.PostMessage (embeddedHwnd, SWT_KEYMSG, wParam, lParam);
@@ -3262,16 +3262,16 @@ int /*long*/ messageProc (int /*long*/ hwnd, int /*long*/ msg, int /*long*/ wPar
*/
if (wParam != 0) {
if (!isXMouseActive ()) {
- int /*long*/ hwndActive = OS.GetActiveWindow ();
+ long /*int*/ hwndActive = OS.GetActiveWindow ();
if (hwndActive != 0 && OS.IsWindowEnabled (hwndActive)) break;
Shell modal = modalDialog != null ? modalDialog.parent : getModalShell ();
if (modal != null && !modal.isDisposed ()) {
- int /*long*/ hwndModal = modal.handle;
+ long /*int*/ hwndModal = modal.handle;
if (OS.IsWindowEnabled (hwndModal)) {
modal.bringToTop ();
if (modal.isDisposed ()) break;
}
- int /*long*/ hwndPopup = OS.GetLastActivePopup (hwndModal);
+ long /*int*/ hwndPopup = OS.GetLastActivePopup (hwndModal);
if (hwndPopup != 0 && hwndPopup != modal.handle) {
if (getControl (hwndPopup) == null) {
if (OS.IsWindowEnabled (hwndPopup)) {
@@ -3393,17 +3393,17 @@ int /*long*/ messageProc (int /*long*/ hwnd, int /*long*/ msg, int /*long*/ wPar
String getSharedData(int pid, int handle) {
if (OS.IsWinCE) return null;
- int /*long*/ [] mapHandle = new int /*long*/ [1];
+ long /*int*/ [] mapHandle = new long /*int*/ [1];
if (pid == OS.GetCurrentProcessId()) {
mapHandle[0] = handle;
} else {
- int /*long*/ processHandle = OS.OpenProcess(OS.PROCESS_VM_READ|OS.PROCESS_DUP_HANDLE, false, pid);
+ long /*int*/ processHandle = OS.OpenProcess(OS.PROCESS_VM_READ|OS.PROCESS_DUP_HANDLE, false, pid);
if (processHandle == 0) return null;
OS.DuplicateHandle(processHandle, handle, OS.GetCurrentProcess(), mapHandle, OS.DUPLICATE_SAME_ACCESS, false, OS.DUPLICATE_SAME_ACCESS);
OS.CloseHandle(processHandle);
}
- int /*long*/ sharedData = OS.MapViewOfFile(mapHandle[0], OS.FILE_MAP_READ, 0, 0, 0);
+ long /*int*/ sharedData = OS.MapViewOfFile(mapHandle[0], OS.FILE_MAP_READ, 0, 0, 0);
if (sharedData == 0) return null;
int length = OS.IsUnicode ? OS.wcslen (sharedData) : OS.strlen (sharedData);
TCHAR buffer = new TCHAR (0, length);
@@ -3417,7 +3417,7 @@ String getSharedData(int pid, int handle) {
return result;
}
-int /*long*/ monitorEnumProc (int /*long*/ hmonitor, int /*long*/ hdc, int /*long*/ lprcMonitor, int /*long*/ dwData) {
+long /*int*/ monitorEnumProc (long /*int*/ hmonitor, long /*int*/ hdc, long /*int*/ lprcMonitor, long /*int*/ dwData) {
if (monitorCount >= monitors.length) {
Monitor[] newMonitors = new Monitor [monitors.length + 4];
System.arraycopy (monitors, 0, newMonitors, 0, monitors.length);
@@ -3440,7 +3440,7 @@ int /*long*/ monitorEnumProc (int /*long*/ hmonitor, int /*long*/ hdc, int /*lon
return 1;
}
-int /*long*/ msgFilterProc (int /*long*/ code, int /*long*/ wParam, int /*long*/ lParam) {
+long /*int*/ msgFilterProc (long /*int*/ code, long /*int*/ wParam, long /*int*/ lParam) {
switch ((int)/*64*/code) {
case OS.MSGF_COMMCTRL_BEGINDRAG: {
if (!runDragDrop && !dragCancelled) {
@@ -3618,8 +3618,8 @@ public boolean post (Event event) {
case OS.VK_DIVIDE:
inputs.dwFlags |= OS.KEYEVENTF_EXTENDEDKEY;
}
- int /*long*/ hHeap = OS.GetProcessHeap ();
- int /*long*/ pInputs = OS.HeapAlloc (hHeap, OS.HEAP_ZERO_MEMORY, INPUT.sizeof);
+ long /*int*/ hHeap = OS.GetProcessHeap ();
+ long /*int*/ pInputs = OS.HeapAlloc (hHeap, OS.HEAP_ZERO_MEMORY, INPUT.sizeof);
OS.MoveMemory(pInputs, new int[] {OS.INPUT_KEYBOARD}, 4);
//TODO - DWORD type of INPUT structure aligned to 8 bytes on 64 bit
OS.MoveMemory (pInputs + OS.PTR_SIZEOF, inputs, KEYBDINPUT.sizeof);
@@ -3683,8 +3683,8 @@ public boolean post (Event event) {
}
}
}
- int /*long*/ hHeap = OS.GetProcessHeap ();
- int /*long*/ pInputs = OS.HeapAlloc (hHeap, OS.HEAP_ZERO_MEMORY, INPUT.sizeof);
+ long /*int*/ hHeap = OS.GetProcessHeap ();
+ long /*int*/ pInputs = OS.HeapAlloc (hHeap, OS.HEAP_ZERO_MEMORY, INPUT.sizeof);
OS.MoveMemory(pInputs, new int[] {OS.INPUT_MOUSE}, 4);
//TODO - DWORD type of INPUT structure aligned to 8 bytes on 64 bit
OS.MoveMemory (pInputs + OS.PTR_SIZEOF, inputs, MOUSEINPUT.sizeof);
@@ -3874,8 +3874,8 @@ void releaseDisplay () {
messageProc = 0;
/* Unregister the SWT window class */
- int /*long*/ hHeap = OS.GetProcessHeap ();
- int /*long*/ hInstance = OS.GetModuleHandle (null);
+ long /*int*/ hHeap = OS.GetProcessHeap ();
+ long /*int*/ hInstance = OS.GetModuleHandle (null);
OS.UnregisterClass (windowClass, hInstance);
/* Unregister the SWT drop shadow and CS_OWNDC window class */
@@ -4105,7 +4105,7 @@ void removeBar (Menu menu) {
}
}
-Control removeControl (int /*long*/ handle) {
+Control removeControl (long /*int*/ handle) {
if (handle == 0) return null;
lastControl = lastGetControl = null;
Control control = null;
@@ -4258,7 +4258,7 @@ boolean runSkin () {
return false;
}
-boolean runTimer (int /*long*/ id) {
+boolean runTimer (long /*int*/ id) {
if (timerList != null && timerIds != null) {
int index = 0;
while (index <timerIds.length) {
@@ -4716,13 +4716,13 @@ public void timerExec (int milliseconds, Runnable runnable) {
checkDevice ();
if (runnable == null) error (SWT.ERROR_NULL_ARGUMENT);
if (timerList == null) timerList = new Runnable [4];
- if (timerIds == null) timerIds = new int /*long*/ [4];
+ if (timerIds == null) timerIds = new long /*int*/ [4];
int index = 0;
while (index < timerList.length) {
if (timerList [index] == runnable) break;
index++;
}
- int /*long*/ timerId = 0;
+ long /*int*/ timerId = 0;
if (index != timerList.length) {
timerId = timerIds [index];
if (milliseconds < 0) {
@@ -4743,12 +4743,12 @@ public void timerExec (int milliseconds, Runnable runnable) {
Runnable [] newTimerList = new Runnable [timerList.length + 4];
System.arraycopy (timerList, 0, newTimerList, 0, timerList.length);
timerList = newTimerList;
- int /*long*/ [] newTimerIds = new int /*long*/ [timerIds.length + 4];
+ long /*int*/ [] newTimerIds = new long /*int*/ [timerIds.length + 4];
System.arraycopy (timerIds, 0, newTimerIds, 0, timerIds.length);
timerIds = newTimerIds;
}
}
- int /*long*/ newTimerID = OS.SetTimer (hwndMessage, timerId, milliseconds, 0);
+ long /*int*/ newTimerID = OS.SetTimer (hwndMessage, timerId, milliseconds, 0);
if (newTimerID != 0) {
timerList [index] = runnable;
timerIds [index] = newTimerID;
@@ -4918,7 +4918,7 @@ static int wcsToMbcs (char ch) {
return wcsToMbcs (ch, 0);
}
-int /*long*/ windowProc (int /*long*/ hwnd, int /*long*/ msg, int /*long*/ wParam, int /*long*/ lParam) {
+long /*int*/ windowProc (long /*int*/ hwnd, long /*int*/ msg, long /*int*/ wParam, long /*int*/ lParam) {
/*
* Feature in Windows. On Vista only, it is faster to
* compute and answer the data for the visible columns
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/ExpandBar.java b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/ExpandBar.java
index 6ee27b8509..676518bb05 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/ExpandBar.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/ExpandBar.java
@@ -49,7 +49,7 @@ public class ExpandBar extends Composite {
ExpandItem focusItem;
int spacing = 4;
int yCurrentScroll;
- int /*long*/ hFont;
+ long /*int*/ hFont;
/**
@@ -111,7 +111,7 @@ public void addExpandListener (ExpandListener listener) {
addListener (SWT.Collapse, typedListener);
}
-int /*long*/ callWindowProc (int /*long*/ hwnd, int msg, int /*long*/ wParam, int /*long*/ lParam) {
+long /*int*/ callWindowProc (long /*int*/ hwnd, int msg, long /*int*/ wParam, long /*int*/ lParam) {
if (handle == 0) return 0;
return OS.DefWindowProc (hwnd, msg, wParam, lParam);
}
@@ -130,12 +130,12 @@ public Point computeSize (int wHint, int hHint, boolean changed) {
int height = 0, width = 0;
if (wHint == SWT.DEFAULT || hHint == SWT.DEFAULT) {
if (itemCount > 0) {
- int /*long*/ hDC = OS.GetDC (handle);
- int /*long*/ hTheme = 0;
+ long /*int*/ hDC = OS.GetDC (handle);
+ long /*int*/ hTheme = 0;
if (isAppThemed ()) {
hTheme = display.hExplorerBarTheme ();
}
- int /*long*/ hCurrentFont = 0, oldFont = 0;
+ long /*int*/ hCurrentFont = 0, oldFont = 0;
if (hTheme == 0) {
if (hFont != 0) {
hCurrentFont = hFont;
@@ -237,7 +237,7 @@ void destroyItem (ExpandItem item) {
layoutItems (index, true);
}
-void drawThemeBackground (int /*long*/ hDC, int /*long*/ hwnd, RECT rect) {
+void drawThemeBackground (long /*int*/ hDC, long /*int*/ hwnd, RECT rect) {
RECT rect2 = new RECT ();
OS.GetClientRect (handle, rect2);
OS.MapWindowPoints (handle, hwnd, rect2, 2);
@@ -245,7 +245,7 @@ void drawThemeBackground (int /*long*/ hDC, int /*long*/ hwnd, RECT rect) {
}
void drawWidget (GC gc, RECT clipRect) {
- int /*long*/ hTheme = 0;
+ long /*int*/ hTheme = 0;
if (isAppThemed ()) {
hTheme = display.hExplorerBarTheme ();
}
@@ -261,7 +261,7 @@ void drawWidget (GC gc, RECT clipRect) {
int uiState = (int)/*64*/OS.SendMessage (handle, OS.WM_QUERYUISTATE, 0, 0);
drawFocus = (uiState & OS.UISF_HIDEFOCUS) == 0;
}
- int /*long*/ hCurrentFont = 0, oldFont = 0;
+ long /*int*/ hCurrentFont = 0, oldFont = 0;
if (hTheme == 0) {
if (hFont != 0) {
hCurrentFont = hFont;
@@ -306,8 +306,8 @@ Control findThemeControl () {
int getBandHeight () {
if (hFont == 0) return ExpandItem.CHEVRON_SIZE;
- int /*long*/ hDC = OS.GetDC (handle);
- int /*long*/ oldHFont = OS.SelectObject (hDC, hFont);
+ long /*int*/ hDC = OS.GetDC (handle);
+ long /*int*/ oldHFont = OS.SelectObject (hDC, hFont);
TEXTMETRIC lptm = OS.IsUnicode ? (TEXTMETRIC)new TEXTMETRICW() : new TEXTMETRICA();
OS.GetTextMetrics (hDC, lptm);
OS.SelectObject (hDC, oldHFont);
@@ -617,11 +617,11 @@ TCHAR windowClass () {
return display.windowClass;
}
-int /*long*/ windowProc () {
+long /*int*/ windowProc () {
return display.windowProc;
}
-LRESULT WM_KEYDOWN (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT WM_KEYDOWN (long /*int*/ wParam, long /*int*/ lParam) {
LRESULT result = super.WM_KEYDOWN (wParam, lParam);
if (result != null) return result;
if (focusItem == null) return result;
@@ -660,13 +660,13 @@ LRESULT WM_KEYDOWN (int /*long*/ wParam, int /*long*/ lParam) {
return result;
}
-LRESULT WM_KILLFOCUS (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT WM_KILLFOCUS (long /*int*/ wParam, long /*int*/ lParam) {
LRESULT result = super.WM_KILLFOCUS (wParam, lParam);
if (focusItem != null) focusItem.redraw (true);
return result;
}
-LRESULT WM_LBUTTONDOWN (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT WM_LBUTTONDOWN (long /*int*/ wParam, long /*int*/ lParam) {
LRESULT result = super.WM_LBUTTONDOWN (wParam, lParam);
if (result == LRESULT.ZERO) return result;
int x = OS.GET_X_LPARAM (lParam);
@@ -685,7 +685,7 @@ LRESULT WM_LBUTTONDOWN (int /*long*/ wParam, int /*long*/ lParam) {
return result;
}
-LRESULT WM_LBUTTONUP (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT WM_LBUTTONUP (long /*int*/ wParam, long /*int*/ lParam) {
LRESULT result = super.WM_LBUTTONUP (wParam, lParam);
if (result == LRESULT.ZERO) return result;
if (focusItem == null) return result;
@@ -702,7 +702,7 @@ LRESULT WM_LBUTTONUP (int /*long*/ wParam, int /*long*/ lParam) {
return result;
}
-LRESULT WM_MOUSELEAVE (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT WM_MOUSELEAVE (long /*int*/ wParam, long /*int*/ lParam) {
LRESULT result = super.WM_MOUSELEAVE (wParam, lParam);
if (result != null) return result;
for (int i = 0; i < itemCount; i++) {
@@ -716,7 +716,7 @@ LRESULT WM_MOUSELEAVE (int /*long*/ wParam, int /*long*/ lParam) {
return result;
}
-LRESULT WM_MOUSEMOVE (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT WM_MOUSEMOVE (long /*int*/ wParam, long /*int*/ lParam) {
LRESULT result = super.WM_MOUSEMOVE (wParam, lParam);
if (result == LRESULT.ZERO) return result;
int x = OS.GET_X_LPARAM (lParam);
@@ -732,11 +732,11 @@ LRESULT WM_MOUSEMOVE (int /*long*/ wParam, int /*long*/ lParam) {
return result;
}
-LRESULT WM_MOUSEWHEEL (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT WM_MOUSEWHEEL (long /*int*/ wParam, long /*int*/ lParam) {
return wmScrollWheel (true, wParam, lParam);
}
-LRESULT WM_PAINT (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT WM_PAINT (long /*int*/ wParam, long /*int*/ lParam) {
PAINTSTRUCT ps = new PAINTSTRUCT ();
GCData data = new GCData ();
data.ps = ps;
@@ -765,7 +765,7 @@ LRESULT WM_PAINT (int /*long*/ wParam, int /*long*/ lParam) {
return LRESULT.ZERO;
}
-LRESULT WM_PRINTCLIENT (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT WM_PRINTCLIENT (long /*int*/ wParam, long /*int*/ lParam) {
LRESULT result = super.WM_PRINTCLIENT (wParam, lParam);
RECT rect = new RECT ();
OS.GetClientRect (handle, rect);
@@ -778,7 +778,7 @@ LRESULT WM_PRINTCLIENT (int /*long*/ wParam, int /*long*/ lParam) {
return result;
}
-LRESULT WM_SETCURSOR (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT WM_SETCURSOR (long /*int*/ wParam, long /*int*/ lParam) {
LRESULT result = super.WM_SETCURSOR (wParam, lParam);
if (result != null) return result;
int hitTest = (short) OS.LOWORD (lParam);
@@ -786,7 +786,7 @@ LRESULT WM_SETCURSOR (int /*long*/ wParam, int /*long*/ lParam) {
for (int i = 0; i < itemCount; i++) {
ExpandItem item = items [i];
if (item.hover) {
- int /*long*/ hCursor = OS.LoadCursor (0, OS.IDC_HAND);
+ long /*int*/ hCursor = OS.LoadCursor (0, OS.IDC_HAND);
OS.SetCursor (hCursor);
return LRESULT.ONE;
}
@@ -795,13 +795,13 @@ LRESULT WM_SETCURSOR (int /*long*/ wParam, int /*long*/ lParam) {
return result;
}
-LRESULT WM_SETFOCUS (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT WM_SETFOCUS (long /*int*/ wParam, long /*int*/ lParam) {
LRESULT result = super.WM_SETFOCUS (wParam, lParam);
if (focusItem != null) focusItem.redraw (true);
return result;
}
-LRESULT WM_SIZE (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT WM_SIZE (long /*int*/ wParam, long /*int*/ lParam) {
LRESULT result = super.WM_SIZE (wParam, lParam);
RECT rect = new RECT ();
OS.GetClientRect (handle, rect);
@@ -815,7 +815,7 @@ LRESULT WM_SIZE (int /*long*/ wParam, int /*long*/ lParam) {
return result;
}
-LRESULT wmScroll (ScrollBar bar, boolean update, int /*long*/ hwnd, int msg, int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT wmScroll (ScrollBar bar, boolean update, long /*int*/ hwnd, int msg, long /*int*/ wParam, long /*int*/ lParam) {
LRESULT result = super.wmScroll (bar, true, hwnd, msg, wParam, lParam);
SCROLLINFO info = new SCROLLINFO ();
info.cbSize = SCROLLINFO.sizeof;
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/ExpandItem.java b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/ExpandItem.java
index 51ba1ea3f9..3ef2b02572 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/ExpandItem.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/ExpandItem.java
@@ -116,16 +116,16 @@ static ExpandBar checkNull (ExpandBar control) {
return control;
}
-private void drawChevron (int /*long*/ hDC, RECT rect) {
- int /*long*/ oldBrush = OS.SelectObject (hDC, OS.GetSysColorBrush (OS.COLOR_BTNFACE));
+private void drawChevron (long /*int*/ hDC, RECT rect) {
+ long /*int*/ oldBrush = OS.SelectObject (hDC, OS.GetSysColorBrush (OS.COLOR_BTNFACE));
OS.PatBlt (hDC, rect.left, rect.top, rect.right - rect.left, rect.bottom - rect.top, OS.PATCOPY);
OS.SelectObject (hDC, oldBrush);
rect.left += 4;
rect.top += 4;
rect.right -= 4;
rect.bottom -= 4;
- int /*long*/ hPen = OS.CreatePen (OS.PS_SOLID, 1, parent.getForegroundPixel ());
- int /*long*/ oldPen = OS.SelectObject (hDC, hPen);
+ long /*int*/ hPen = OS.CreatePen (OS.PS_SOLID, 1, parent.getForegroundPixel ());
+ long /*int*/ oldPen = OS.SelectObject (hDC, hPen);
int [] polyline1, polyline2;
if (expanded) {
int px = rect.left + 5;
@@ -151,8 +151,8 @@ private void drawChevron (int /*long*/ hDC, RECT rect) {
OS.Polyline (hDC, polyline1, polyline1.length / 2);
OS.Polyline (hDC, polyline2, polyline2.length / 2);
if (hover) {
- int /*long*/ whitePen = OS.CreatePen (OS.PS_SOLID, 1, OS.GetSysColor (OS.COLOR_3DHILIGHT));
- int /*long*/ darkGrayPen = OS.CreatePen (OS.PS_SOLID, 1, OS.GetSysColor (OS.COLOR_3DSHADOW));
+ long /*int*/ whitePen = OS.CreatePen (OS.PS_SOLID, 1, OS.GetSysColor (OS.COLOR_3DHILIGHT));
+ long /*int*/ darkGrayPen = OS.CreatePen (OS.PS_SOLID, 1, OS.GetSysColor (OS.COLOR_3DSHADOW));
OS.SelectObject (hDC, whitePen);
int [] points1 = {
rect.left, rect.bottom,
@@ -174,15 +174,15 @@ private void drawChevron (int /*long*/ hDC, RECT rect) {
OS.DeleteObject (hPen);
}
-void drawItem (GC gc, int /*long*/ hTheme, RECT clipRect, boolean drawFocus) {
- int /*long*/ hDC = gc.handle;
+void drawItem (GC gc, long /*int*/ hTheme, RECT clipRect, boolean drawFocus) {
+ long /*int*/ hDC = gc.handle;
int headerHeight = parent.getBandHeight ();
RECT rect = new RECT ();
OS.SetRect (rect, x, y, x + width, y + headerHeight);
if (hTheme != 0) {
OS.DrawThemeBackground (hTheme, hDC, OS.EBP_NORMALGROUPHEAD, 0, rect, clipRect);
} else {
- int /*long*/ oldBrush = OS.SelectObject (hDC, OS.GetSysColorBrush (OS.COLOR_BTNFACE));
+ long /*int*/ oldBrush = OS.SelectObject (hDC, OS.GetSysColorBrush (OS.COLOR_BTNFACE));
OS.PatBlt (hDC, rect.left, rect.top, rect.right - rect.left, rect.bottom - rect.top, OS.PATCOPY);
OS.SelectObject (hDC, oldBrush);
}
@@ -223,8 +223,8 @@ void drawItem (GC gc, int /*long*/ hTheme, RECT clipRect, boolean drawFocus) {
}
if (expanded) {
if (!parent.isAppThemed ()) {
- int /*long*/ pen = OS.CreatePen (OS.PS_SOLID, 1, OS.GetSysColor (OS.COLOR_BTNFACE));
- int /*long*/ oldPen = OS.SelectObject (hDC, pen);
+ long /*int*/ pen = OS.CreatePen (OS.PS_SOLID, 1, OS.GetSysColor (OS.COLOR_BTNFACE));
+ long /*int*/ oldPen = OS.SelectObject (hDC, pen);
int [] points = {
x, y + headerHeight,
x, y + headerHeight + height,
@@ -319,7 +319,7 @@ public ExpandBar getParent () {
return parent;
}
-int getPreferredWidth (int /*long*/ hTheme, int /*long*/ hDC) {
+int getPreferredWidth (long /*int*/ hTheme, long /*int*/ hDC) {
int width = ExpandItem.TEXT_INSET * 2 + ExpandItem.CHEVRON_SIZE;
if (image != null) {
width += ExpandItem.TEXT_INSET + imageWidth;
@@ -343,7 +343,7 @@ boolean isHover (int x, int y) {
}
void redraw (boolean all) {
- int /*long*/ parentHandle = parent.handle;
+ long /*int*/ parentHandle = parent.handle;
int headerHeight = parent.getBandHeight ();
RECT rect = new RECT ();
int left = all ? x : x + width - headerHeight;
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/FileDialog.java b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/FileDialog.java
index 212fcbecf2..079fcd48c7 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/FileDialog.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/FileDialog.java
@@ -196,7 +196,7 @@ public boolean getOverwrite () {
return overwrite;
}
-int /*long*/ OFNHookProc (int /*long*/ hdlg, int /*long*/ uiMsg, int /*long*/ wParam, int /*long*/ lParam) {
+long /*int*/ OFNHookProc (long /*int*/ hdlg, long /*int*/ uiMsg, long /*int*/ wParam, long /*int*/ lParam) {
switch ((int)/*64*/uiMsg) {
case OS.WM_NOTIFY:
OFNOTIFY ofn = new OFNOTIFY ();
@@ -208,8 +208,8 @@ int /*long*/ OFNHookProc (int /*long*/ hdlg, int /*long*/ uiMsg, int /*long*/ wP
OPENFILENAME lpofn = new OPENFILENAME ();
OS.MoveMemory (lpofn, ofn.lpOFN, OPENFILENAME.sizeof);
if (lpofn.nMaxFile < lResult) {
- int /*long*/ hHeap = OS.GetProcessHeap ();
- int /*long*/ lpstrFile = OS.HeapAlloc (hHeap, OS.HEAP_ZERO_MEMORY, lResult * TCHAR.sizeof);
+ long /*int*/ hHeap = OS.GetProcessHeap ();
+ long /*int*/ lpstrFile = OS.HeapAlloc (hHeap, OS.HEAP_ZERO_MEMORY, lResult * TCHAR.sizeof);
if (lpstrFile != 0) {
if (lpofn.lpstrFile != 0) OS.HeapFree (hHeap, 0, lpofn.lpstrFile);
lpofn.lpstrFile = lpstrFile;
@@ -237,11 +237,11 @@ int /*long*/ OFNHookProc (int /*long*/ hdlg, int /*long*/ uiMsg, int /*long*/ wP
* </ul>
*/
public String open () {
- int /*long*/ hHeap = OS.GetProcessHeap ();
+ long /*int*/ hHeap = OS.GetProcessHeap ();
/* Get the owner HWND for the dialog */
- int /*long*/ hwndOwner = parent.handle;
- int /*long*/ hwndParent = parent.handle;
+ long /*int*/ hwndOwner = parent.handle;
+ long /*int*/ hwndParent = parent.handle;
/*
* Feature in Windows. There is no API to set the orientation of a
@@ -276,7 +276,7 @@ public String open () {
/* Use the character encoding for the default locale */
TCHAR buffer3 = new TCHAR (0, title, true);
int byteCount3 = buffer3.length () * TCHAR.sizeof;
- int /*long*/ lpstrTitle = OS.HeapAlloc (hHeap, OS.HEAP_ZERO_MEMORY, byteCount3);
+ long /*int*/ lpstrTitle = OS.HeapAlloc (hHeap, OS.HEAP_ZERO_MEMORY, byteCount3);
OS.MoveMemory (lpstrTitle, buffer3, byteCount3);
/* Compute filters and copy into lpstrFilter */
@@ -294,7 +294,7 @@ public String open () {
/* Use the character encoding for the default locale */
TCHAR buffer4 = new TCHAR (0, strFilter, true);
int byteCount4 = buffer4.length () * TCHAR.sizeof;
- int /*long*/ lpstrFilter = OS.HeapAlloc (hHeap, OS.HEAP_ZERO_MEMORY, byteCount4);
+ long /*int*/ lpstrFilter = OS.HeapAlloc (hHeap, OS.HEAP_ZERO_MEMORY, byteCount4);
OS.MoveMemory (lpstrFilter, buffer4, byteCount4);
/* Convert the fileName and filterName to C strings */
@@ -309,7 +309,7 @@ public String open () {
int nMaxFile = OS.MAX_PATH;
if ((style & SWT.MULTI) != 0) nMaxFile = Math.max (nMaxFile, BUFFER_SIZE);
int byteCount = nMaxFile * TCHAR.sizeof;
- int /*long*/ lpstrFile = OS.HeapAlloc (hHeap, OS.HEAP_ZERO_MEMORY, byteCount);
+ long /*int*/ lpstrFile = OS.HeapAlloc (hHeap, OS.HEAP_ZERO_MEMORY, byteCount);
int byteCountFile = Math.min (name.length () * TCHAR.sizeof, byteCount - TCHAR.sizeof);
OS.MoveMemory (lpstrFile, name, byteCountFile);
@@ -321,7 +321,7 @@ public String open () {
/* Use the character encoding for the default locale */
TCHAR path = new TCHAR (0, filterPath.replace ('/', '\\'), true);
int byteCount5 = OS.MAX_PATH * TCHAR.sizeof;
- int /*long*/ lpstrInitialDir = OS.HeapAlloc (hHeap, OS.HEAP_ZERO_MEMORY, byteCount5);
+ long /*int*/ lpstrInitialDir = OS.HeapAlloc (hHeap, OS.HEAP_ZERO_MEMORY, byteCount5);
int byteCountDir = Math.min (path.length () * TCHAR.sizeof, byteCount5 - TCHAR.sizeof);
OS.MoveMemory (lpstrInitialDir, path, byteCountDir);
@@ -336,7 +336,7 @@ public String open () {
struct.Flags |= OS.OFN_ALLOWMULTISELECT | OS.OFN_EXPLORER | OS.OFN_ENABLESIZING;
if (!OS.IsWinCE && USE_HOOK) {
callback = new Callback (this, "OFNHookProc", 4); //$NON-NLS-1$
- int /*long*/ lpfnHook = callback.getAddress ();
+ long /*int*/ lpfnHook = callback.getAddress ();
if (lpfnHook == 0) error (SWT.ERROR_NO_MORE_CALLBACKS);
struct.lpfnHook = lpfnHook;
struct.Flags |= OS.OFN_ENABLEHOOK;
@@ -356,7 +356,7 @@ public String open () {
* empty, Windows uses the current value of the filter
* extension at the time that the dialog is closed.
*/
- int /*long*/ lpstrDefExt = 0;
+ long /*int*/ lpstrDefExt = 0;
if (save) {
lpstrDefExt = OS.HeapAlloc (hHeap, OS.HEAP_ZERO_MEMORY, TCHAR.sizeof);
struct.lpstrDefExt = lpstrDefExt;
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/FontDialog.java b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/FontDialog.java
index 855c758791..27582d5b95 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/FontDialog.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/FontDialog.java
@@ -155,8 +155,8 @@ public FontData open () {
if (OS.IsWinCE) error (SWT.ERROR_NOT_IMPLEMENTED);
/* Get the owner HWND for the dialog */
- int /*long*/ hwndOwner = parent.handle;
- int /*long*/ hwndParent = parent.handle;
+ long /*int*/ hwndOwner = parent.handle;
+ long /*int*/ hwndParent = parent.handle;
/*
* Feature in Windows. There is no API to set the orientation of a
@@ -187,7 +187,7 @@ public FontData open () {
}
/* Open the dialog */
- int /*long*/ hHeap = OS.GetProcessHeap ();
+ long /*int*/ hHeap = OS.GetProcessHeap ();
CHOOSEFONT lpcf = new CHOOSEFONT ();
lpcf.lStructSize = CHOOSEFONT.sizeof;
lpcf.hwndOwner = hwndOwner;
@@ -196,11 +196,11 @@ public FontData open () {
lpcf.Flags |= OS.CF_EFFECTS;
}
- int /*long*/ lpLogFont = OS.HeapAlloc (hHeap, OS.HEAP_ZERO_MEMORY, LOGFONT.sizeof);
+ long /*int*/ lpLogFont = OS.HeapAlloc (hHeap, OS.HEAP_ZERO_MEMORY, LOGFONT.sizeof);
if (fontData != null && fontData.data != null) {
LOGFONT logFont = fontData.data;
int lfHeight = logFont.lfHeight;
- int /*long*/ hDC = OS.GetDC (0);
+ long /*int*/ hDC = OS.GetDC (0);
int pixels = -(int)(0.5f + (fontData.height * OS.GetDeviceCaps(hDC, OS.LOGPIXELSY) / 72));
OS.ReleaseDC (0, hDC);
logFont.lfHeight = pixels;
@@ -242,7 +242,7 @@ public FontData open () {
* This will not work on multiple screens or
* for printing. Should use DC for the proper device.
*/
- int /*long*/ hDC = OS.GetDC(0);
+ long /*int*/ hDC = OS.GetDC(0);
int logPixelsY = OS.GetDeviceCaps(hDC, OS.LOGPIXELSY);
int pixels = 0;
if (logFont.lfHeight > 0) {
@@ -254,8 +254,8 @@ public FontData open () {
* we must subtract the internal leading, which requires a TEXTMETRIC,
* which in turn requires font creation.
*/
- int /*long*/ hFont = OS.CreateFontIndirect(logFont);
- int /*long*/ oldFont = OS.SelectObject(hDC, hFont);
+ long /*int*/ hFont = OS.CreateFontIndirect(logFont);
+ long /*int*/ oldFont = OS.SelectObject(hDC, hFont);
TEXTMETRIC lptm = OS.IsUnicode ? (TEXTMETRIC) new TEXTMETRICW () : new TEXTMETRICA ();
OS.GetTextMetrics(hDC, lptm);
OS.SelectObject(hDC, oldFont);
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Group.java b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Group.java
index 8d00eef630..bded168bba 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Group.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Group.java
@@ -43,7 +43,7 @@ import org.eclipse.swt.graphics.*;
public class Group extends Composite {
String text = "";
static final int CLIENT_INSET = 3;
- static final int /*long*/ GroupProc;
+ static final long /*int*/ GroupProc;
static final TCHAR GroupClass = new TCHAR (0, OS.IsWinCE ? "BUTTON" : "SWT_GROUP", true);
static {
/*
@@ -67,13 +67,13 @@ public class Group extends Composite {
TCHAR WC_BUTTON = new TCHAR (0, "BUTTON", true);
OS.GetClassInfo (0, WC_BUTTON, lpWndClass);
GroupProc = lpWndClass.lpfnWndProc;
- int /*long*/ hInstance = OS.GetModuleHandle (null);
+ long /*int*/ hInstance = OS.GetModuleHandle (null);
if (!OS.GetClassInfo (hInstance, GroupClass, lpWndClass)) {
- int /*long*/ hHeap = OS.GetProcessHeap ();
+ long /*int*/ hHeap = OS.GetProcessHeap ();
lpWndClass.hInstance = hInstance;
lpWndClass.style &= ~(OS.CS_HREDRAW | OS.CS_VREDRAW);
int byteCount = GroupClass.length () * TCHAR.sizeof;
- int /*long*/ lpszClassName = OS.HeapAlloc (hHeap, OS.HEAP_ZERO_MEMORY, byteCount);
+ long /*int*/ lpszClassName = OS.HeapAlloc (hHeap, OS.HEAP_ZERO_MEMORY, byteCount);
OS.MoveMemory (lpszClassName, GroupClass, byteCount);
lpWndClass.lpszClassName = lpszClassName;
OS.RegisterClass (lpWndClass);
@@ -118,7 +118,7 @@ public Group (Composite parent, int style) {
super (parent, checkStyle (style));
}
-int /*long*/ callWindowProc (int /*long*/ hwnd, int msg, int /*long*/ wParam, int /*long*/ lParam) {
+long /*int*/ callWindowProc (long /*int*/ hwnd, int msg, long /*int*/ wParam, long /*int*/ lParam) {
if (handle == 0) return 0;
/*
* Feature in Windows. When the user clicks on the group
@@ -172,8 +172,8 @@ public Point computeSize (int wHint, int hHint, boolean changed) {
* client area, pad the width so the text is not clipped.
*/
TCHAR buffer = new TCHAR (getCodePage (), string, true);
- int /*long*/ newFont, oldFont = 0;
- int /*long*/ hDC = OS.GetDC (handle);
+ long /*int*/ newFont, oldFont = 0;
+ long /*int*/ hDC = OS.GetDC (handle);
newFont = OS.SendMessage (handle, OS.WM_GETFONT, 0, 0);
if (newFont != 0) oldFont = OS.SelectObject (hDC, newFont);
RECT rect = new RECT ();
@@ -190,8 +190,8 @@ public Point computeSize (int wHint, int hHint, boolean changed) {
public Rectangle computeTrim (int x, int y, int width, int height) {
checkWidget ();
Rectangle trim = super.computeTrim (x, y, width, height);
- int /*long*/ newFont, oldFont = 0;
- int /*long*/ hDC = OS.GetDC (handle);
+ long /*int*/ newFont, oldFont = 0;
+ long /*int*/ hDC = OS.GetDC (handle);
newFont = OS.SendMessage (handle, OS.WM_GETFONT, 0, 0);
if (newFont != 0) oldFont = OS.SelectObject (hDC, newFont);
TEXTMETRIC tm = OS.IsUnicode ? (TEXTMETRIC) new TEXTMETRICW () : new TEXTMETRICA ();
@@ -244,8 +244,8 @@ public Rectangle getClientArea () {
forceResize ();
RECT rect = new RECT ();
OS.GetClientRect (handle, rect);
- int /*long*/ newFont, oldFont = 0;
- int /*long*/ hDC = OS.GetDC (handle);
+ long /*int*/ newFont, oldFont = 0;
+ long /*int*/ hDC = OS.GetDC (handle);
newFont = OS.SendMessage (handle, OS.WM_GETFONT, 0, 0);
if (newFont != 0) oldFont = OS.SelectObject (hDC, newFont);
TEXTMETRIC tm = OS.IsUnicode ? (TEXTMETRIC) new TEXTMETRICW () : new TEXTMETRICA ();
@@ -290,7 +290,7 @@ boolean mnemonicMatch (char key) {
return Character.toUpperCase (key) == Character.toUpperCase (mnemonic);
}
-void printWidget (int /*long*/ hwnd, int /*long*/ hdc, GC gc) {
+void printWidget (long /*int*/ hwnd, long /*int*/ hdc, GC gc) {
/*
* Bug in Windows. For some reason, PrintWindow()
* returns success but does nothing when it is called
@@ -339,7 +339,7 @@ void printWidget (int /*long*/ hwnd, int /*long*/ hdc, GC gc) {
} else {
OS.SetWindowOrgEx (hdc, -location.x, -location.y, null);
}
- int /*long*/ topHandle = children [i].topHandle();
+ long /*int*/ topHandle = children [i].topHandle();
int bits = OS.GetWindowLong (topHandle, OS.GWL_STYLE);
if ((bits & OS.WS_VISIBLE) != 0) {
children [i].printWidget (topHandle, hdc, gc);
@@ -429,11 +429,11 @@ TCHAR windowClass () {
return GroupClass;
}
-int /*long*/ windowProc () {
+long /*int*/ windowProc () {
return GroupProc;
}
-LRESULT WM_ERASEBKGND (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT WM_ERASEBKGND (long /*int*/ wParam, long /*int*/ lParam) {
LRESULT result = super.WM_ERASEBKGND (wParam, lParam);
if (result != null) return result;
/*
@@ -445,7 +445,7 @@ LRESULT WM_ERASEBKGND (int /*long*/ wParam, int /*long*/ lParam) {
return LRESULT.ONE;
}
-LRESULT WM_NCHITTEST (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT WM_NCHITTEST (long /*int*/ wParam, long /*int*/ lParam) {
LRESULT result = super.WM_NCHITTEST (wParam, lParam);
if (result != null) return result;
/*
@@ -457,12 +457,12 @@ LRESULT WM_NCHITTEST (int /*long*/ wParam, int /*long*/ lParam) {
* allow children, answer HTCLIENT to allow mouse messages
* to be delivered to the children.
*/
- int /*long*/ code = callWindowProc (handle, OS.WM_NCHITTEST, wParam, lParam);
+ long /*int*/ code = callWindowProc (handle, OS.WM_NCHITTEST, wParam, lParam);
if (code == OS.HTTRANSPARENT) code = OS.HTCLIENT;
return new LRESULT (code);
}
-LRESULT WM_MOUSEMOVE (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT WM_MOUSEMOVE (long /*int*/ wParam, long /*int*/ lParam) {
LRESULT result = super.WM_MOUSEMOVE (wParam, lParam);
if (result != null) return result;
/*
@@ -474,7 +474,7 @@ LRESULT WM_MOUSEMOVE (int /*long*/ wParam, int /*long*/ lParam) {
return LRESULT.ZERO;
}
-LRESULT WM_PRINTCLIENT (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT WM_PRINTCLIENT (long /*int*/ wParam, long /*int*/ lParam) {
LRESULT result = super.WM_PRINTCLIENT (wParam, lParam);
if (result != null) return result;
/*
@@ -489,14 +489,14 @@ LRESULT WM_PRINTCLIENT (int /*long*/ wParam, int /*long*/ lParam) {
*/
if (OS.COMCTL32_MAJOR >= 6 && OS.IsAppThemed ()) {
int nSavedDC = OS.SaveDC (wParam);
- int /*long*/ code = callWindowProc (handle, OS.WM_PRINTCLIENT, wParam, lParam);
+ long /*int*/ code = callWindowProc (handle, OS.WM_PRINTCLIENT, wParam, lParam);
OS.RestoreDC (wParam, nSavedDC);
return new LRESULT (code);
}
return result;
}
-LRESULT WM_UPDATEUISTATE (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT WM_UPDATEUISTATE (long /*int*/ wParam, long /*int*/ lParam) {
LRESULT result = super.WM_UPDATEUISTATE (wParam, lParam);
if (result != null) return result;
/*
@@ -518,13 +518,13 @@ LRESULT WM_UPDATEUISTATE (int /*long*/ wParam, int /*long*/ lParam) {
}
if (redraw) {
OS.InvalidateRect (handle, null, false);
- int /*long*/ code = OS.DefWindowProc (handle, OS.WM_UPDATEUISTATE, wParam, lParam);
+ long /*int*/ code = OS.DefWindowProc (handle, OS.WM_UPDATEUISTATE, wParam, lParam);
return new LRESULT (code);
}
return result;
}
-LRESULT WM_WINDOWPOSCHANGING (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT WM_WINDOWPOSCHANGING (long /*int*/ wParam, long /*int*/ lParam) {
LRESULT result = super.WM_WINDOWPOSCHANGING (wParam, lParam);
if (result != null) return result;
/*
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/IME.java b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/IME.java
index 3d09962e20..f3b1e26977 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/IME.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/IME.java
@@ -165,7 +165,7 @@ public int getCompositionOffset () {
}
TF_DISPLAYATTRIBUTE getDisplayAttribute (short langid, int attInfo) {
- int /*long*/ [] pProfiles = new int /*long*/ [1];
+ long /*int*/ [] pProfiles = new long /*int*/ [1];
int hr = OS.CoCreateInstance (CLSID_TF_InputProcessorProfiles, 0, OS.CLSCTX_INPROC_SERVER, IID_ITfInputProcessorProfiles, pProfiles);
TF_DISPLAYATTRIBUTE pda = null;
if (hr == OS.S_OK) {
@@ -174,14 +174,14 @@ TF_DISPLAYATTRIBUTE getDisplayAttribute (short langid, int attInfo) {
/* pProfiles.GetDefaultLanguageProfile () */
hr = OS.VtblCall (8, pProfiles [0], langid, GUID_TFCAT_TIP_KEYBOARD, pclsid, pguidProfile);
if (hr == OS.S_OK) {
- int /*long*/ [] pProvider = new int /*long*/ [1];
+ long /*int*/ [] pProvider = new long /*int*/ [1];
hr = OS.CoCreateInstance (pclsid, 0, OS.CLSCTX_INPROC_SERVER, IID_ITfDisplayAttributeProvider, pProvider);
if (hr == OS.S_OK) {
- int /*long*/ [] pEnum = new int /*long*/ [1];
+ long /*int*/ [] pEnum = new long /*int*/ [1];
/* pProvider.EnumDisplayAttributeInfo () */
hr = OS.VtblCall (3, pProvider [0], pEnum);
if (hr == OS.S_OK) {
- int /*long*/ [] pDispInfo = new int /*long*/ [1];
+ long /*int*/ [] pDispInfo = new long /*int*/ [1];
TF_DISPLAYATTRIBUTE tempPda = new TF_DISPLAYATTRIBUTE ();
/* pEnum.Next () */
while ((hr = OS.VtblCall (4, pEnum [0], 1, pDispInfo, (int[])null)) == OS.S_OK) {
@@ -310,7 +310,7 @@ public String getText () {
*/
public boolean getWideCaret() {
checkWidget ();
- int /*long*/ layout = OS.GetKeyboardLayout (0);
+ long /*int*/ layout = OS.GetKeyboardLayout (0);
short langID = (short)OS.LOWORD (layout);
return OS.PRIMARYLANGID (langID) == OS.LANG_KOREAN;
}
@@ -357,13 +357,13 @@ public void setCompositionOffset (int offset) {
}
}
-LRESULT WM_IME_COMPOSITION (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT WM_IME_COMPOSITION (long /*int*/ wParam, long /*int*/ lParam) {
if (!isInlineEnabled ()) return null;
ranges = null;
styles = null;
caretOffset = commitCount = 0;
- int /*long*/ hwnd = parent.handle;
- int /*long*/ hIMC = OS.ImmGetContext (hwnd);
+ long /*int*/ hwnd = parent.handle;
+ long /*int*/ hIMC = OS.ImmGetContext (hwnd);
int codePage = parent.getCodePage ();
if (hIMC != 0) {
TCHAR buffer = null;
@@ -430,7 +430,7 @@ LRESULT WM_IME_COMPOSITION (int /*long*/ wParam, int /*long*/ lParam) {
length = clauses.length - 1;
ranges = new int [length * 2];
styles = new TextStyle [length];
- int /*long*/ layout = OS.GetKeyboardLayout (0);
+ long /*int*/ layout = OS.GetKeyboardLayout (0);
short langID = (short)OS.LOWORD (layout);
TF_DISPLAYATTRIBUTE attr = null;
TextStyle style = null;
@@ -512,18 +512,18 @@ LRESULT WM_IME_COMPOSITION (int /*long*/ wParam, int /*long*/ lParam) {
return LRESULT.ONE;
}
-LRESULT WM_IME_COMPOSITION_START (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT WM_IME_COMPOSITION_START (long /*int*/ wParam, long /*int*/ lParam) {
return isInlineEnabled () ? LRESULT.ONE : null;
}
-LRESULT WM_IME_ENDCOMPOSITION (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT WM_IME_ENDCOMPOSITION (long /*int*/ wParam, long /*int*/ lParam) {
return isInlineEnabled () ? LRESULT.ONE : null;
}
-LRESULT WM_KILLFOCUS (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT WM_KILLFOCUS (long /*int*/ wParam, long /*int*/ lParam) {
if (!isInlineEnabled ()) return null;
- int /*long*/ hwnd = parent.handle;
- int /*long*/ hIMC = OS.ImmGetContext (hwnd);
+ long /*int*/ hwnd = parent.handle;
+ long /*int*/ hIMC = OS.ImmGetContext (hwnd);
if (hIMC != 0) {
if (OS.ImmGetOpenStatus (hIMC)) {
OS.ImmNotifyIME (hIMC, OS.NI_COMPOSITIONSTR, OS.CPS_COMPLETE, 0);
@@ -533,10 +533,10 @@ LRESULT WM_KILLFOCUS (int /*long*/ wParam, int /*long*/ lParam) {
return null;
}
-LRESULT WM_LBUTTONDOWN (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT WM_LBUTTONDOWN (long /*int*/ wParam, long /*int*/ lParam) {
if (!isInlineEnabled ()) return null;
- int /*long*/ hwnd = parent.handle;
- int /*long*/ hIMC = OS.ImmGetContext (hwnd);
+ long /*int*/ hwnd = parent.handle;
+ long /*int*/ hIMC = OS.ImmGetContext (hwnd);
if (hIMC != 0) {
if (OS.ImmGetOpenStatus (hIMC)) {
if (OS.ImmGetCompositionString (hIMC, OS.GCS_COMPSTR, (TCHAR)null, 0) > 0) {
@@ -548,10 +548,10 @@ LRESULT WM_LBUTTONDOWN (int /*long*/ wParam, int /*long*/ lParam) {
int offset = event.index;
int length = text.length();
if (offset != -1 && startOffset != -1 && startOffset <= offset && offset < startOffset + length) {
- int /*long*/ imeWnd = OS.ImmGetDefaultIMEWnd (hwnd);
+ long /*int*/ imeWnd = OS.ImmGetDefaultIMEWnd (hwnd);
offset = event.index + event.count - startOffset;
int trailing = event.count > 0 ? 1 : 2;
- int /*long*/ param = OS.MAKEWPARAM (OS.MAKEWORD (OS.IMEMOUSE_LDOWN, trailing), offset);
+ long /*int*/ param = OS.MAKEWPARAM (OS.MAKEWORD (OS.IMEMOUSE_LDOWN, trailing), offset);
OS.SendMessage (imeWnd, WM_MSIME_MOUSE, param, hIMC);
} else {
OS.ImmNotifyIME (hIMC, OS.NI_COMPOSITIONSTR, OS.CPS_COMPLETE, 0);
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Label.java b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Label.java
index f32a57b30d..e94602af60 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Label.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Label.java
@@ -52,7 +52,7 @@ public class Label extends Control {
Image image;
static final int MARGIN = 4;
static /*final*/ boolean IMAGE_AND_TEXT = false;
- static final int /*long*/ LabelProc;
+ static final long /*int*/ LabelProc;
static final TCHAR LabelClass = new TCHAR (0, "STATIC", true);
static {
WNDCLASS lpWndClass = new WNDCLASS ();
@@ -101,7 +101,7 @@ public Label (Composite parent, int style) {
super (parent, checkStyle (style));
}
-int /*long*/ callWindowProc (int /*long*/ hwnd, int msg, int /*long*/ wParam, int /*long*/ lParam) {
+long /*int*/ callWindowProc (long /*int*/ hwnd, int msg, long /*int*/ wParam, long /*int*/ lParam) {
if (handle == 0) return 0;
/*
* Feature in Windows 7. When the user double clicks
@@ -157,9 +157,9 @@ public Point computeSize (int wHint, int hHint, boolean changed) {
}
}
if (drawText) {
- int /*long*/ hDC = OS.GetDC (handle);
- int /*long*/ newFont = OS.SendMessage (handle, OS.WM_GETFONT, 0, 0);
- int /*long*/ oldFont = OS.SelectObject (hDC, newFont);
+ long /*int*/ hDC = OS.GetDC (handle);
+ long /*int*/ newFont = OS.SendMessage (handle, OS.WM_GETFONT, 0, 0);
+ long /*int*/ oldFont = OS.SelectObject (hDC, newFont);
int length = OS.GetWindowTextLength (handle);
if (length == 0) {
TEXTMETRIC tm = OS.IsUnicode ? (TEXTMETRIC) new TEXTMETRICW () : new TEXTMETRICA ();
@@ -446,11 +446,11 @@ TCHAR windowClass () {
return LabelClass;
}
-int /*long*/ windowProc () {
+long /*int*/ windowProc () {
return LabelProc;
}
-LRESULT WM_ERASEBKGND (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT WM_ERASEBKGND (long /*int*/ wParam, long /*int*/ lParam) {
LRESULT result = super.WM_ERASEBKGND (wParam, lParam);
if (result != null) return result;
int bits = OS.GetWindowLong (handle, OS.GWL_STYLE);
@@ -474,7 +474,7 @@ LRESULT WM_ERASEBKGND (int /*long*/ wParam, int /*long*/ lParam) {
return result;
}
-LRESULT WM_SIZE (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT WM_SIZE (long /*int*/ wParam, long /*int*/ lParam) {
LRESULT result = super.WM_SIZE (wParam, lParam);
if (isDisposed ()) return result;
if ((style & SWT.SEPARATOR) != 0) {
@@ -500,7 +500,7 @@ LRESULT WM_SIZE (int /*long*/ wParam, int /*long*/ lParam) {
return result;
}
-LRESULT WM_UPDATEUISTATE (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT WM_UPDATEUISTATE (long /*int*/ wParam, long /*int*/ lParam) {
LRESULT result = super.WM_UPDATEUISTATE (wParam, lParam);
if (result != null) return result;
/*
@@ -521,13 +521,13 @@ LRESULT WM_UPDATEUISTATE (int /*long*/ wParam, int /*long*/ lParam) {
}
if (redraw) {
OS.InvalidateRect (handle, null, false);
- int /*long*/ code = OS.DefWindowProc (handle, OS.WM_UPDATEUISTATE, wParam, lParam);
+ long /*int*/ code = OS.DefWindowProc (handle, OS.WM_UPDATEUISTATE, wParam, lParam);
return new LRESULT (code);
}
return result;
}
-LRESULT wmColorChild (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT wmColorChild (long /*int*/ wParam, long /*int*/ lParam) {
/*
* Bug in Windows. For some reason, the HBRUSH that
* is returned from WM_CTRLCOLOR is misaligned when
@@ -549,7 +549,7 @@ LRESULT wmColorChild (int /*long*/ wParam, int /*long*/ lParam) {
return result;
}
-LRESULT WM_PAINT (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT WM_PAINT (long /*int*/ wParam, long /*int*/ lParam) {
if (OS.IsWinCE) {
boolean drawImage = image != null;
boolean drawSeparator = (style & SWT.SEPARATOR) != 0 && (style & SWT.SHADOW_NONE) == 0;
@@ -613,7 +613,7 @@ LRESULT WM_PAINT (int /*long*/ wParam, int /*long*/ lParam) {
return super.WM_PAINT(wParam, lParam);
}
-LRESULT wmDrawChild (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT wmDrawChild (long /*int*/ wParam, long /*int*/ lParam) {
DRAWITEMSTRUCT struct = new DRAWITEMSTRUCT ();
OS.MoveMemory (struct, lParam, DRAWITEMSTRUCT.sizeof);
drawBackground (struct.hDC);
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Link.java b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Link.java
index 5f13a902f7..7181cab877 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Link.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Link.java
@@ -47,9 +47,9 @@ public class Link extends Control {
String [] ids;
int [] mnemonics;
int focusIndex, mouseDownIndex;
- int /*long*/ font;
+ long /*int*/ font;
static final RGB LINK_FOREGROUND = new RGB (0, 51, 153);
- static final int /*long*/ LinkProc;
+ static final long /*int*/ LinkProc;
static final TCHAR LinkClass = new TCHAR (0, OS.WC_LINK, true);
static {
if (OS.COMCTL32_MAJOR >= 6) {
@@ -73,13 +73,13 @@ public class Link extends Control {
* code, other than SWT, could create a control with
* this class name, and fail unexpectedly.
*/
- int /*long*/ hInstance = OS.GetModuleHandle (null);
- int /*long*/ hHeap = OS.GetProcessHeap ();
+ long /*int*/ hInstance = OS.GetModuleHandle (null);
+ long /*int*/ hHeap = OS.GetProcessHeap ();
lpWndClass.hInstance = hInstance;
lpWndClass.style &= ~OS.CS_GLOBALCLASS;
lpWndClass.style |= OS.CS_DBLCLKS;
int byteCount = LinkClass.length () * TCHAR.sizeof;
- int /*long*/ lpszClassName = OS.HeapAlloc (hHeap, OS.HEAP_ZERO_MEMORY, byteCount);
+ long /*int*/ lpszClassName = OS.HeapAlloc (hHeap, OS.HEAP_ZERO_MEMORY, byteCount);
OS.MoveMemory (lpszClassName, LinkClass, byteCount);
lpWndClass.lpszClassName = lpszClassName;
OS.RegisterClass (lpWndClass);
@@ -152,7 +152,7 @@ public void addSelectionListener (SelectionListener listener) {
addListener (SWT.DefaultSelection, typedListener);
}
-int /*long*/ callWindowProc (int /*long*/ hwnd, int msg, int /*long*/ wParam, int /*long*/ lParam) {
+long /*int*/ callWindowProc (long /*int*/ hwnd, int msg, long /*int*/ wParam, long /*int*/ lParam) {
if (handle == 0) return 0;
if (LinkProc != 0) {
/*
@@ -180,9 +180,9 @@ public Point computeSize (int wHint, int hHint, boolean changed) {
if (hHint != SWT.DEFAULT && hHint < 0) hHint = 0;
int width, height;
if (OS.COMCTL32_MAJOR >= 6) {
- int /*long*/ hDC = OS.GetDC (handle);
- int /*long*/ newFont = OS.SendMessage (handle, OS.WM_GETFONT, 0, 0);
- int /*long*/ oldFont = OS.SelectObject (hDC, newFont);
+ long /*int*/ hDC = OS.GetDC (handle);
+ long /*int*/ newFont = OS.SendMessage (handle, OS.WM_GETFONT, 0, 0);
+ long /*int*/ oldFont = OS.SelectObject (hDC, newFont);
if (text.length () > 0) {
TCHAR buffer = new TCHAR (getCodePage (), parse (text), false);
RECT rect = new RECT ();
@@ -747,11 +747,11 @@ TCHAR windowClass () {
return OS.COMCTL32_MAJOR >= 6 ? LinkClass : display.windowClass;
}
-int /*long*/ windowProc () {
+long /*int*/ windowProc () {
return LinkProc != 0 ? LinkProc : display.windowProc;
}
-LRESULT WM_CHAR (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT WM_CHAR (long /*int*/ wParam, long /*int*/ lParam) {
LRESULT result = super.WM_CHAR (wParam, lParam);
if (result != null) return result;
if (OS.COMCTL32_MAJOR < 6) {
@@ -789,7 +789,7 @@ LRESULT WM_CHAR (int /*long*/ wParam, int /*long*/ lParam) {
* This allows the application to cancel an operation that is normally
* performed in WM_KEYDOWN from WM_CHAR.
*/
- int /*long*/ code = callWindowProc (handle, OS.WM_KEYDOWN, wParam, lParam);
+ long /*int*/ code = callWindowProc (handle, OS.WM_KEYDOWN, wParam, lParam);
return new LRESULT (code);
}
@@ -797,11 +797,11 @@ LRESULT WM_CHAR (int /*long*/ wParam, int /*long*/ lParam) {
return result;
}
-LRESULT WM_GETDLGCODE (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT WM_GETDLGCODE (long /*int*/ wParam, long /*int*/ lParam) {
LRESULT result = super.WM_GETDLGCODE (wParam, lParam);
if (result != null) return result;
int index, count;
- int /*long*/ code = 0;
+ long /*int*/ code = 0;
if (OS.COMCTL32_MAJOR >= 6) {
LITEM item = new LITEM ();
item.mask = OS.LIF_ITEMINDEX | OS.LIF_STATE;
@@ -832,16 +832,16 @@ LRESULT WM_GETDLGCODE (int /*long*/ wParam, int /*long*/ lParam) {
return result;
}
-LRESULT WM_GETFONT (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT WM_GETFONT (long /*int*/ wParam, long /*int*/ lParam) {
LRESULT result = super.WM_GETFONT (wParam, lParam);
if (result != null) return result;
- int /*long*/ code = callWindowProc (handle, OS.WM_GETFONT, wParam, lParam);
+ long /*int*/ code = callWindowProc (handle, OS.WM_GETFONT, wParam, lParam);
if (code != 0) return new LRESULT (code);
if (font == 0) font = defaultFont ();
return new LRESULT (font);
}
-LRESULT WM_KEYDOWN (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT WM_KEYDOWN (long /*int*/ wParam, long /*int*/ lParam) {
LRESULT result = super.WM_KEYDOWN (wParam, lParam);
if (result != null) return result;
if (OS.COMCTL32_MAJOR >= 6) {
@@ -861,13 +861,13 @@ LRESULT WM_KEYDOWN (int /*long*/ wParam, int /*long*/ lParam) {
return result;
}
-LRESULT WM_KILLFOCUS (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT WM_KILLFOCUS (long /*int*/ wParam, long /*int*/ lParam) {
LRESULT result = super.WM_KILLFOCUS (wParam, lParam);
if (OS.COMCTL32_MAJOR < 6) redraw ();
return result;
}
-LRESULT WM_LBUTTONDOWN (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT WM_LBUTTONDOWN (long /*int*/ wParam, long /*int*/ lParam) {
LRESULT result = super.WM_LBUTTONDOWN (wParam, lParam);
if (result == LRESULT.ZERO) return result;
if (OS.COMCTL32_MAJOR < 6) {
@@ -905,7 +905,7 @@ LRESULT WM_LBUTTONDOWN (int /*long*/ wParam, int /*long*/ lParam) {
return result;
}
-LRESULT WM_LBUTTONUP (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT WM_LBUTTONUP (long /*int*/ wParam, long /*int*/ lParam) {
LRESULT result = super.WM_LBUTTONUP (wParam, lParam);
if (result == LRESULT.ZERO) return result;
if (OS.COMCTL32_MAJOR < 6) {
@@ -927,7 +927,7 @@ LRESULT WM_LBUTTONUP (int /*long*/ wParam, int /*long*/ lParam) {
return result;
}
-LRESULT WM_NCHITTEST (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT WM_NCHITTEST (long /*int*/ wParam, long /*int*/ lParam) {
LRESULT result = super.WM_NCHITTEST (wParam, lParam);
if (result != null) return result;
@@ -941,7 +941,7 @@ LRESULT WM_NCHITTEST (int /*long*/ wParam, int /*long*/ lParam) {
return result;
}
-LRESULT WM_MOUSEMOVE (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT WM_MOUSEMOVE (long /*int*/ wParam, long /*int*/ lParam) {
LRESULT result = super.WM_MOUSEMOVE (wParam, lParam);
if (OS.COMCTL32_MAJOR < 6) {
int x = OS.GET_X_LPARAM (lParam);
@@ -976,7 +976,7 @@ LRESULT WM_MOUSEMOVE (int /*long*/ wParam, int /*long*/ lParam) {
return result;
}
-LRESULT WM_PAINT (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT WM_PAINT (long /*int*/ wParam, long /*int*/ lParam) {
if (OS.COMCTL32_MAJOR >= 6) {
return super.WM_PAINT (wParam, lParam);
}
@@ -998,7 +998,7 @@ LRESULT WM_PAINT (int /*long*/ wParam, int /*long*/ lParam) {
return LRESULT.ZERO;
}
-LRESULT WM_PRINTCLIENT (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT WM_PRINTCLIENT (long /*int*/ wParam, long /*int*/ lParam) {
LRESULT result = super.WM_PRINTCLIENT (wParam, lParam);
if (OS.COMCTL32_MAJOR < 6) {
RECT rect = new RECT ();
@@ -1013,13 +1013,13 @@ LRESULT WM_PRINTCLIENT (int /*long*/ wParam, int /*long*/ lParam) {
return result;
}
-LRESULT WM_SETFOCUS (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT WM_SETFOCUS (long /*int*/ wParam, long /*int*/ lParam) {
LRESULT result = super.WM_SETFOCUS (wParam, lParam);
if (OS.COMCTL32_MAJOR < 6) redraw ();
return result;
}
-LRESULT WM_SETFONT (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT WM_SETFONT (long /*int*/ wParam, long /*int*/ lParam) {
if (OS.COMCTL32_MAJOR < 6) {
layout.setFont (Font.win32_new (display, wParam));
}
@@ -1027,7 +1027,7 @@ LRESULT WM_SETFONT (int /*long*/ wParam, int /*long*/ lParam) {
return super.WM_SETFONT (font = wParam, lParam);
}
-LRESULT WM_SIZE (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT WM_SIZE (long /*int*/ wParam, long /*int*/ lParam) {
LRESULT result = super.WM_SIZE (wParam, lParam);
if (OS.COMCTL32_MAJOR < 6) {
RECT rect = new RECT ();
@@ -1038,7 +1038,7 @@ LRESULT WM_SIZE (int /*long*/ wParam, int /*long*/ lParam) {
return result;
}
-LRESULT wmColorChild (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT wmColorChild (long /*int*/ wParam, long /*int*/ lParam) {
LRESULT result = super.wmColorChild (wParam, lParam);
/*
* Feature in Windows. When a SysLink is disabled, it does
@@ -1051,7 +1051,7 @@ LRESULT wmColorChild (int /*long*/ wParam, int /*long*/ lParam) {
if (result == null) {
int backPixel = getBackgroundPixel ();
OS.SetBkColor (wParam, backPixel);
- int /*long*/ hBrush = findBrush (backPixel, OS.BS_SOLID);
+ long /*int*/ hBrush = findBrush (backPixel, OS.BS_SOLID);
return new LRESULT (hBrush);
}
}
@@ -1059,7 +1059,7 @@ LRESULT wmColorChild (int /*long*/ wParam, int /*long*/ lParam) {
return result;
}
-LRESULT wmNotifyChild (NMHDR hdr, int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT wmNotifyChild (NMHDR hdr, long /*int*/ wParam, long /*int*/ lParam) {
if (OS.COMCTL32_MAJOR >= 6) {
switch (hdr.code) {
case OS.NM_RETURN:
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/List.java b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/List.java
index 26376aed54..d7f2f2dc42 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/List.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/List.java
@@ -41,7 +41,7 @@ import org.eclipse.swt.events.*;
public class List extends Scrollable {
static final int INSET = 3;
- static final int /*long*/ ListProc;
+ static final long /*int*/ ListProc;
static final TCHAR ListClass = new TCHAR (0, "LISTBOX", true);
static {
WNDCLASS lpWndClass = new WNDCLASS ();
@@ -178,7 +178,7 @@ public void addSelectionListener(SelectionListener listener) {
addListener (SWT.DefaultSelection,typedListener);
}
-int /*long*/ callWindowProc (int /*long*/ hwnd, int msg, int /*long*/ wParam, int /*long*/ lParam) {
+long /*int*/ callWindowProc (long /*int*/ hwnd, int msg, long /*int*/ wParam, long /*int*/ lParam) {
if (handle == 0) return 0;
boolean redraw = false;
switch (msg) {
@@ -189,7 +189,7 @@ int /*long*/ callWindowProc (int /*long*/ hwnd, int msg, int /*long*/ wParam, in
break;
}
}
- int /*long*/ code = OS.CallWindowProc (ListProc, hwnd, msg, wParam, lParam);
+ long /*int*/ code = OS.CallWindowProc (ListProc, hwnd, msg, wParam, lParam);
switch (msg) {
case OS.WM_HSCROLL:
case OS.WM_VSCROLL: {
@@ -216,8 +216,8 @@ public Point computeSize (int wHint, int hHint, boolean changed) {
width -= INSET;
} else {
int count = (int)/*64*/OS.SendMessage (handle, OS.LB_GETCOUNT, 0, 0);
- int /*long*/ newFont, oldFont = 0;
- int /*long*/ hDC = OS.GetDC (handle);
+ long /*int*/ newFont, oldFont = 0;
+ long /*int*/ hDC = OS.GetDC (handle);
newFont = OS.SendMessage (handle, OS.WM_GETFONT, 0, 0);
if (newFont != 0) oldFont = OS.SelectObject (hDC, newFont);
RECT rect = new RECT ();
@@ -741,7 +741,7 @@ public void remove (int [] indices) {
}
int topIndex = (int)/*64*/OS.SendMessage (handle, OS.LB_GETTOPINDEX, 0, 0);
RECT rect = null;
- int /*long*/ hDC = 0, oldFont = 0, newFont = 0;
+ long /*int*/ hDC = 0, oldFont = 0, newFont = 0;
int newWidth = 0;
if ((style & SWT.H_SCROLL) != 0) {
rect = new RECT ();
@@ -861,7 +861,7 @@ public void remove (int start, int end) {
}
int topIndex = (int)/*64*/OS.SendMessage (handle, OS.LB_GETTOPINDEX, 0, 0);
RECT rect = null;
- int /*long*/ hDC = 0, oldFont = 0, newFont = 0;
+ long /*int*/ hDC = 0, oldFont = 0, newFont = 0;
int newWidth = 0;
if ((style & SWT.H_SCROLL) != 0) {
rect = new RECT ();
@@ -1198,14 +1198,14 @@ public void setItems (String [] items) {
for (int i=0; i<items.length; i++) {
if (items [i] == null) error (SWT.ERROR_INVALID_ARGUMENT);
}
- int /*long*/ oldProc = OS.GetWindowLongPtr (handle, OS.GWLP_WNDPROC);
+ long /*int*/ oldProc = OS.GetWindowLongPtr (handle, OS.GWLP_WNDPROC);
OS.SetWindowLongPtr (handle, OS.GWLP_WNDPROC, ListProc);
boolean redraw = getDrawing () && OS.IsWindowVisible (handle);
if (redraw) {
OS.SendMessage (handle, OS.WM_SETREDRAW, 0, 0);
}
RECT rect = null;
- int /*long*/ hDC = 0, oldFont = 0, newFont = 0;
+ long /*int*/ hDC = 0, oldFont = 0, newFont = 0;
int newWidth = 0;
if ((style & SWT.H_SCROLL) != 0) {
rect = new RECT ();
@@ -1256,8 +1256,8 @@ public void setItems (String [] items) {
void setScrollWidth () {
int newWidth = 0;
RECT rect = new RECT ();
- int /*long*/ newFont, oldFont = 0;
- int /*long*/ hDC = OS.GetDC (handle);
+ long /*int*/ newFont, oldFont = 0;
+ long /*int*/ hDC = OS.GetDC (handle);
newFont = OS.SendMessage (handle, OS.WM_GETFONT, 0, 0);
if (newFont != 0) oldFont = OS.SelectObject (hDC, newFont);
int cp = getCodePage ();
@@ -1281,8 +1281,8 @@ void setScrollWidth () {
void setScrollWidth (TCHAR buffer, boolean grow) {
RECT rect = new RECT ();
- int /*long*/ newFont, oldFont = 0;
- int /*long*/ hDC = OS.GetDC (handle);
+ long /*int*/ newFont, oldFont = 0;
+ long /*int*/ hDC = OS.GetDC (handle);
newFont = OS.SendMessage (handle, OS.WM_GETFONT, 0, 0);
if (newFont != 0) oldFont = OS.SelectObject (hDC, newFont);
int flags = OS.DT_CALCRECT | OS.DT_SINGLELINE | OS.DT_NOPREFIX;
@@ -1518,8 +1518,8 @@ void updateMenuLocation (Event event) {
int focusIndex = getFocusIndex();
if (focusIndex != -1) {
RECT rect = new RECT ();
- int /*long*/ newFont, oldFont = 0;
- int /*long*/ hDC = OS.GetDC (handle);
+ long /*int*/ newFont, oldFont = 0;
+ long /*int*/ hDC = OS.GetDC (handle);
newFont = OS.SendMessage (handle, OS.WM_GETFONT, 0, 0);
if (newFont != 0) oldFont = OS.SelectObject (hDC, newFont);
int flags = OS.DT_CALCRECT | OS.DT_SINGLELINE | OS.DT_NOPREFIX;
@@ -1563,11 +1563,11 @@ TCHAR windowClass () {
return ListClass;
}
-int /*long*/ windowProc () {
+long /*int*/ windowProc () {
return ListProc;
}
-LRESULT WM_CHAR (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT WM_CHAR (long /*int*/ wParam, long /*int*/ lParam) {
LRESULT result = super.WM_CHAR (wParam, lParam);
if (result != null) return result;
/*
@@ -1595,7 +1595,7 @@ LRESULT WM_CHAR (int /*long*/ wParam, int /*long*/ lParam) {
return result;
}
-LRESULT WM_KEYDOWN (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT WM_KEYDOWN (long /*int*/ wParam, long /*int*/ lParam) {
LRESULT result = super.WM_KEYDOWN (wParam, lParam);
if (result != null) return result;
/*
@@ -1699,7 +1699,7 @@ LRESULT WM_KEYDOWN (int /*long*/ wParam, int /*long*/ lParam) {
return result;
}
-LRESULT WM_SETREDRAW (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT WM_SETREDRAW (long /*int*/ wParam, long /*int*/ lParam) {
LRESULT result = super.WM_SETREDRAW (wParam, lParam);
if (result != null) return result;
/*
@@ -1712,7 +1712,7 @@ LRESULT WM_SETREDRAW (int /*long*/ wParam, int /*long*/ lParam) {
return result;
}
-LRESULT WM_SIZE (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT WM_SIZE (long /*int*/ wParam, long /*int*/ lParam) {
/*
* Bug in Windows. If the top index is changed while the
* list is being resized, Windows does not redraw properly
@@ -1740,7 +1740,7 @@ LRESULT WM_SIZE (int /*long*/ wParam, int /*long*/ lParam) {
return result;
}
-LRESULT wmCommandChild (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT wmCommandChild (long /*int*/ wParam, long /*int*/ lParam) {
int code = OS.HIWORD (wParam);
switch (code) {
case OS.LBN_SELCHANGE:
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Menu.java b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Menu.java
index bf8d404cfb..a44eff8633 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Menu.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Menu.java
@@ -53,10 +53,10 @@ public class Menu extends Widget {
*
* @noreference This field is not intended to be referenced by clients.
*/
- public int /*long*/ handle;
+ public long /*int*/ handle;
int x, y;
- int /*long*/ hBrush, hwndCB;
+ long /*int*/ hBrush, hwndCB;
int id0, id1;
int foreground = -1, background = -1;
Image backgroundImage;
@@ -201,7 +201,7 @@ public Menu (MenuItem parentItem) {
this (checkNull (parentItem).parent);
}
-Menu (Decorations parent, int style, int /*long*/ handle) {
+Menu (Decorations parent, int style, long /*int*/ handle) {
super (parent, checkStyle (style));
this.parent = parent;
this.handle = handle;
@@ -225,7 +225,7 @@ Menu (Decorations parent, int style, int /*long*/ handle) {
void _setVisible (boolean visible) {
if ((style & (SWT.BAR | SWT.DROP_DOWN)) != 0) return;
- int /*long*/ hwndParent = parent.handle;
+ long /*int*/ hwndParent = parent.handle;
if (visible) {
int flags = OS.TPM_LEFTBUTTON;
if (OS.GetKeyState (OS.VK_LBUTTON) >= 0) flags |= OS.TPM_RIGHTBUTTON;
@@ -266,7 +266,7 @@ void _setVisible (boolean visible) {
* is not returned to the focus control. This causes confusion for AT users.
* The fix is to explicitly set the accessibility focus back to the focus control.
*/
- int /*long*/ hFocus = OS.GetFocus();
+ long /*int*/ hFocus = OS.GetFocus();
if (hFocus != 0) {
OS.NotifyWinEvent (OS.EVENT_OBJECT_FOCUS, hFocus, OS.OBJID_CLIENT, 0);
}
@@ -348,7 +348,7 @@ void createHandle () {
if (handle != 0) return;
if ((style & SWT.BAR) != 0) {
if (OS.IsPPC) {
- int /*long*/ hwndShell = parent.handle;
+ long /*int*/ hwndShell = parent.handle;
SHMENUBARINFO mbi = new SHMENUBARINFO ();
mbi.cbSize = SHMENUBARINFO.sizeof;
mbi.hwndParent = hwndShell;
@@ -405,7 +405,7 @@ void createHandle () {
/* Set first item */
if (nToolBarId == ID_SPMM || nToolBarId == ID_SPMB) {
- int /*long*/ hMenu = OS.SendMessage (hwndCB, OS.SHCMBM_GETSUBMENU, 0, ID_SPSOFTKEY0);
+ long /*int*/ hMenu = OS.SendMessage (hwndCB, OS.SHCMBM_GETSUBMENU, 0, ID_SPSOFTKEY0);
/* Remove the item from the resource file */
OS.RemoveMenu (hMenu, 0, OS.MF_BYPOSITION);
Menu menu = new Menu (parent, SWT.DROP_DOWN, hMenu);
@@ -418,7 +418,7 @@ void createHandle () {
/* Set second item */
if (nToolBarId == ID_SPMM || nToolBarId == ID_SPBM) {
- int /*long*/ hMenu = OS.SendMessage (hwndCB, OS.SHCMBM_GETSUBMENU, 0, ID_SPSOFTKEY1);
+ long /*int*/ hMenu = OS.SendMessage (hwndCB, OS.SHCMBM_GETSUBMENU, 0, ID_SPSOFTKEY1);
OS.RemoveMenu (hMenu, 0, OS.MF_BYPOSITION);
Menu menu = new Menu (parent, SWT.DROP_DOWN, hMenu);
item = new MenuItem (this, menu, SWT.CASCADE, 1);
@@ -434,14 +434,14 @@ void createHandle () {
* a result, Shell on WinCE SP must use the class Dialog.
*/
int dwMask = OS.SHMBOF_NODEFAULT | OS.SHMBOF_NOTIFY;
- int /*long*/ lParam = OS.MAKELPARAM (dwMask, dwMask);
+ long /*int*/ lParam = OS.MAKELPARAM (dwMask, dwMask);
OS.SendMessage (hwndCB, OS.SHCMBM_OVERRIDEKEY, OS.VK_ESCAPE, lParam);
return;
}
handle = OS.CreateMenu ();
if (handle == 0) error (SWT.ERROR_NO_HANDLES);
if (OS.IsHPC) {
- int /*long*/ hwndShell = parent.handle;
+ long /*int*/ hwndShell = parent.handle;
hwndCB = OS.CommandBar_Create (OS.GetModuleHandle (null), hwndShell, 1);
if (hwndCB == 0) error (SWT.ERROR_NO_HANDLES);
OS.CommandBar_Show (hwndCB, false);
@@ -505,10 +505,10 @@ void createItem (MenuItem item, int index) {
* becomes unexpectedly disabled. The fix is to insert a
* space.
*/
- int /*long*/ hHeap = OS.GetProcessHeap ();
+ long /*int*/ hHeap = OS.GetProcessHeap ();
TCHAR buffer = new TCHAR (0, " ", true);
int byteCount = buffer.length () * TCHAR.sizeof;
- int /*long*/ pszText = OS.HeapAlloc (hHeap, OS.HEAP_ZERO_MEMORY, byteCount);
+ long /*int*/ pszText = OS.HeapAlloc (hHeap, OS.HEAP_ZERO_MEMORY, byteCount);
OS.MoveMemory (pszText, buffer, byteCount);
MENUITEMINFO info = new MENUITEMINFO ();
info.cbSize = MENUITEMINFO.sizeof;
@@ -605,7 +605,7 @@ void destroyItem (MenuItem item) {
void destroyWidget () {
MenuItem cascade = this.cascade;
- int /*long*/ hMenu = handle, hCB = hwndCB;
+ long /*int*/ hMenu = handle, hCB = hwndCB;
releaseHandle ();
if (OS.IsWinCE && hCB != 0) {
OS.CommandBar_Destroy (hCB);
@@ -689,7 +689,7 @@ void fixMenus (Decorations newParent) {
if (parent.menuBar != this) {
return new Rectangle (0, 0, 0, 0);
}
- int /*long*/ hwndShell = parent.handle;
+ long /*int*/ hwndShell = parent.handle;
MENUBARINFO info = new MENUBARINFO ();
info.cbSize = MENUBARINFO.sizeof;
if (OS.GetMenuBarInfo (hwndShell, OS.OBJID_MENU, 0, info)) {
@@ -797,7 +797,7 @@ public MenuItem getItem (int index) {
if ((OS.IsPPC || OS.IsSP) && hwndCB != 0) {
if (OS.IsPPC) {
TBBUTTON lpButton = new TBBUTTON ();
- int /*long*/ result = OS.SendMessage (hwndCB, OS.TB_GETBUTTON, index, lpButton);
+ long /*int*/ result = OS.SendMessage (hwndCB, OS.TB_GETBUTTON, index, lpButton);
if (result == 0) error (SWT.ERROR_CANNOT_GET_ITEM);
id = lpButton.idCommand;
}
@@ -892,7 +892,7 @@ public MenuItem [] getItems () {
return result;
}
-int GetMenuItemCount (int /*long*/ handle) {
+int GetMenuItemCount (long /*int*/ handle) {
if (OS.IsWinCE) {
if ((OS.IsPPC || OS.IsSP) && hwndCB != 0) {
return OS.IsSP ? 2 : (int)/*64*/OS.SendMessage (hwndCB, OS.TB_BUTTONCOUNT, 0, 0);
@@ -1050,7 +1050,7 @@ int imageIndex (Image image) {
Rectangle bounds = image.getBounds ();
imageList = display.getImageList (style & SWT.RIGHT_TO_LEFT, bounds.width, bounds.height);
int index = imageList.add (image);
- int /*long*/ hImageList = imageList.getHandle ();
+ long /*int*/ hImageList = imageList.getHandle ();
OS.SendMessage (hwndCB, OS.TB_SETIMAGELIST, 0, hImageList);
return index;
}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/MenuItem.java b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/MenuItem.java
index 376d077bae..cfa8287700 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/MenuItem.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/MenuItem.java
@@ -38,7 +38,7 @@ import org.eclipse.swt.events.*;
public class MenuItem extends Item {
Menu parent, menu;
- int /*long*/ hBitmap;
+ long /*int*/ hBitmap;
int id, accelerator, userId;
/*
* Feature in Windows. On Windows 98, it is necessary
@@ -335,7 +335,7 @@ public int getAccelerator () {
if (shell.menuBar != parent) {
return new Rectangle (0, 0, 0, 0);
}
- int /*long*/ hwndShell = shell.handle;
+ long /*int*/ hwndShell = shell.handle;
MENUBARINFO info1 = new MENUBARINFO ();
info1.cbSize = MENUBARINFO.sizeof;
if (!OS.GetMenuBarInfo (hwndShell, OS.OBJID_MENU, 1, info1)) {
@@ -352,7 +352,7 @@ public int getAccelerator () {
int height = info2.bottom - info2.top;
return new Rectangle (x, y, width, height);
} else {
- int /*long*/ hMenu = parent.handle;
+ long /*int*/ hMenu = parent.handle;
RECT rect1 = new RECT ();
if (!OS.GetMenuItemRect (0, hMenu, 0, rect1)) {
return new Rectangle (0, 0, 0, 0);
@@ -387,7 +387,7 @@ public int getAccelerator () {
public boolean getEnabled () {
checkWidget ();
if ((OS.IsPPC || OS.IsSP) && parent.hwndCB != 0) {
- int /*long*/ hwndCB = parent.hwndCB;
+ long /*int*/ hwndCB = parent.hwndCB;
TBBUTTONINFO info = new TBBUTTONINFO ();
info.cbSize = TBBUTTONINFO.sizeof;
info.dwMask = OS.TBIF_STATE;
@@ -403,7 +403,7 @@ public boolean getEnabled () {
if ((style & SWT.SEPARATOR) != 0) {
return (state & DISABLED) == 0;
}
- int /*long*/ hMenu = parent.handle;
+ long /*int*/ hMenu = parent.handle;
MENUITEMINFO info = new MENUITEMINFO ();
info.cbSize = MENUITEMINFO.sizeof;
info.fMask = OS.MIIM_STATE;
@@ -493,7 +493,7 @@ public boolean getSelection () {
checkWidget ();
if ((style & (SWT.CHECK | SWT.RADIO)) == 0) return false;
if ((OS.IsPPC || OS.IsSP) && parent.hwndCB != 0) return false;
- int /*long*/ hMenu = parent.handle;
+ long /*int*/ hMenu = parent.handle;
MENUITEMINFO info = new MENUITEMINFO ();
info.cbSize = MENUITEMINFO.sizeof;
info.fMask = OS.MIIM_STATE;
@@ -681,7 +681,7 @@ public void setAccelerator (int accelerator) {
public void setEnabled (boolean enabled) {
checkWidget ();
if ((OS.IsPPC || OS.IsSP) && parent.hwndCB != 0) {
- int /*long*/ hwndCB = parent.hwndCB;
+ long /*int*/ hwndCB = parent.hwndCB;
TBBUTTONINFO info = new TBBUTTONINFO ();
info.cbSize = TBBUTTONINFO.sizeof;
info.dwMask = OS.TBIF_STATE;
@@ -703,7 +703,7 @@ public void setEnabled (boolean enabled) {
state |= DISABLED;
}
}
- int /*long*/ hMenu = parent.handle;
+ long /*int*/ hMenu = parent.handle;
if (OS.IsWinCE) {
int index = parent.indexOf (this);
if (index == -1) return;
@@ -792,7 +792,7 @@ public void setImage (Image image) {
super.setImage (image);
if (OS.IsWinCE) {
if ((OS.IsPPC || OS.IsSP) && parent.hwndCB != 0) {
- int /*long*/ hwndCB = parent.hwndCB;
+ long /*int*/ hwndCB = parent.hwndCB;
TBBUTTONINFO info = new TBBUTTONINFO ();
info.cbSize = TBBUTTONINFO.sizeof;
info.dwMask = OS.TBIF_IMAGE;
@@ -815,7 +815,7 @@ public void setImage (Image image) {
info.hbmpItem = image != null ? OS.HBMMENU_CALLBACK : 0;
}
}
- int /*long*/ hMenu = parent.handle;
+ long /*int*/ hMenu = parent.handle;
OS.SetMenuItemInfo (hMenu, id, false, info);
parent.redraw ();
}
@@ -875,13 +875,13 @@ void setMenu (Menu menu, boolean dispose) {
/* Assign the new menu in the OS */
if ((OS.IsPPC || OS.IsSP) && parent.hwndCB != 0) {
if (OS.IsPPC) {
- int /*long*/ hwndCB = parent.hwndCB;
- int /*long*/ hMenu = menu == null ? 0 : menu.handle;
+ long /*int*/ hwndCB = parent.hwndCB;
+ long /*int*/ hMenu = menu == null ? 0 : menu.handle;
OS.SendMessage (hwndCB, OS.SHCMBM_SETSUBMENU, id, hMenu);
}
if (OS.IsSP) error (SWT.ERROR_CANNOT_SET_MENU);
} else {
- int /*long*/ hMenu = parent.handle;
+ long /*int*/ hMenu = parent.handle;
MENUITEMINFO info = new MENUITEMINFO ();
info.cbSize = MENUITEMINFO.sizeof;
info.fMask = OS.MIIM_DATA;
@@ -892,9 +892,9 @@ void setMenu (Menu menu, boolean dispose) {
}
if (info.dwItemData != id) return;
int cch = 128;
- int /*long*/ hHeap = OS.GetProcessHeap ();
+ long /*int*/ hHeap = OS.GetProcessHeap ();
int byteCount = cch * TCHAR.sizeof;
- int /*long*/ pszText = OS.HeapAlloc (hHeap, OS.HEAP_ZERO_MEMORY, byteCount);
+ long /*int*/ pszText = OS.HeapAlloc (hHeap, OS.HEAP_ZERO_MEMORY, byteCount);
info.fMask = OS.MIIM_STATE | OS.MIIM_ID | OS.MIIM_DATA;
/*
* Bug in Windows. When GetMenuItemInfo() is used to get the text,
@@ -925,7 +925,7 @@ void setMenu (Menu menu, boolean dispose) {
* the item, SetMenuItemInfo() to set the string and EnableMenuItem()
* and CheckMenuItem() to set the state.
*/
- int /*long*/ uIDNewItem = id;
+ long /*int*/ uIDNewItem = id;
int uFlags = OS.MF_BYPOSITION;
if (menu != null) {
uFlags |= OS.MF_POPUP;
@@ -978,7 +978,7 @@ boolean setRadioSelection (boolean value) {
}
void setOrientation (int orientation) {
- int /*long*/ hMenu = parent.handle;
+ long /*int*/ hMenu = parent.handle;
MENUITEMINFO info = new MENUITEMINFO ();
info.cbSize = MENUITEMINFO.sizeof;
info.fMask = OS.MIIM_FTYPE;
@@ -1004,7 +1004,7 @@ public void setSelection (boolean selected) {
checkWidget ();
if ((style & (SWT.CHECK | SWT.RADIO)) == 0) return;
if ((OS.IsPPC || OS.IsSP) && parent.hwndCB != 0) return;
- int /*long*/ hMenu = parent.handle;
+ long /*int*/ hMenu = parent.handle;
if (OS.IsWinCE) {
int index = parent.indexOf (this);
if (index == -1) return;
@@ -1082,8 +1082,8 @@ public void setText (String string) {
if ((style & SWT.SEPARATOR) != 0) return;
if (text.equals (string)) return;
super.setText (string);
- int /*long*/ hHeap = OS.GetProcessHeap ();
- int /*long*/ pszText = 0;
+ long /*int*/ hHeap = OS.GetProcessHeap ();
+ long /*int*/ pszText = 0;
boolean success = false;
if ((OS.IsPPC || OS.IsSP) && parent.hwndCB != 0) {
/*
@@ -1107,7 +1107,7 @@ public void setText (String string) {
int byteCount = buffer.length () * TCHAR.sizeof;
pszText = OS.HeapAlloc (hHeap, OS.HEAP_ZERO_MEMORY, byteCount);
OS.MoveMemory (pszText, buffer, byteCount);
- int /*long*/ hwndCB = parent.hwndCB;
+ long /*int*/ hwndCB = parent.hwndCB;
TBBUTTONINFO info2 = new TBBUTTONINFO ();
info2.cbSize = TBBUTTONINFO.sizeof;
info2.dwMask = OS.TBIF_TEXT;
@@ -1116,7 +1116,7 @@ public void setText (String string) {
} else {
MENUITEMINFO info = new MENUITEMINFO ();
info.cbSize = MENUITEMINFO.sizeof;
- int /*long*/ hMenu = parent.handle;
+ long /*int*/ hMenu = parent.handle;
/* Use the character encoding for the default locale */
TCHAR buffer = new TCHAR (0, string, true);
@@ -1162,7 +1162,7 @@ int widgetStyle () {
return bits | OS.MFT_STRING;
}
-LRESULT wmCommandChild (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT wmCommandChild (long /*int*/ wParam, long /*int*/ lParam) {
if ((style & SWT.CHECK) != 0) {
setSelection (!getSelection ());
} else {
@@ -1178,7 +1178,7 @@ LRESULT wmCommandChild (int /*long*/ wParam, int /*long*/ lParam) {
return null;
}
-LRESULT wmDrawChild (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT wmDrawChild (long /*int*/ wParam, long /*int*/ lParam) {
DRAWITEMSTRUCT struct = new DRAWITEMSTRUCT ();
OS.MoveMemory (struct, lParam, DRAWITEMSTRUCT.sizeof);
if (image != null) {
@@ -1201,7 +1201,7 @@ LRESULT wmDrawChild (int /*long*/ wParam, int /*long*/ lParam) {
return null;
}
-LRESULT wmMeasureChild (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT wmMeasureChild (long /*int*/ wParam, long /*int*/ lParam) {
MEASUREITEMSTRUCT struct = new MEASUREITEMSTRUCT ();
OS.MoveMemory (struct, lParam, MEASUREITEMSTRUCT.sizeof);
int width = 0, height = 0;
@@ -1223,7 +1223,7 @@ LRESULT wmMeasureChild (int /*long*/ wParam, int /*long*/ lParam) {
MENUINFO lpcmi = new MENUINFO ();
lpcmi.cbSize = MENUINFO.sizeof;
lpcmi.fMask = OS.MIM_STYLE;
- int /*long*/ hMenu = parent.handle;
+ long /*int*/ hMenu = parent.handle;
OS.GetMenuInfo (hMenu, lpcmi);
if ((lpcmi.dwStyle & OS.MNS_CHECKORBMP) == 0) {
MenuItem [] items = parent.getItems ();
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/MessageBox.java b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/MessageBox.java
index 8694a26c2d..04ec9096a8 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/MessageBox.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/MessageBox.java
@@ -190,7 +190,7 @@ public int open () {
* anyway and not rely on MB_MODAL to work by making the
* parent be temporarily modal.
*/
- int /*long*/ hwndOwner = parent != null ? parent.handle : 0;
+ long /*int*/ hwndOwner = parent != null ? parent.handle : 0;
Dialog oldModal = null;
Display display = null;
if ((bits & OS.MB_TASKMODAL) != 0) {
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/ProgressBar.java b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/ProgressBar.java
index 1083d0f62b..4d3214c9db 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/ProgressBar.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/ProgressBar.java
@@ -40,7 +40,7 @@ public class ProgressBar extends Control {
static final int DELAY = 100;
static final int TIMER_ID = 100;
static final int MINIMUM_WIDTH = 100;
- static final int /*long*/ ProgressBarProc;
+ static final long /*int*/ ProgressBarProc;
static final TCHAR ProgressBarClass = new TCHAR (0, OS.PROGRESS_CLASS, true);
static {
WNDCLASS lpWndClass = new WNDCLASS ();
@@ -63,13 +63,13 @@ public class ProgressBar extends Control {
* code, other than SWT, could create a control with
* this class name, and fail unexpectedly.
*/
- int /*long*/ hInstance = OS.GetModuleHandle (null);
- int /*long*/ hHeap = OS.GetProcessHeap ();
+ long /*int*/ hInstance = OS.GetModuleHandle (null);
+ long /*int*/ hHeap = OS.GetProcessHeap ();
lpWndClass.hInstance = hInstance;
lpWndClass.style &= ~OS.CS_GLOBALCLASS;
lpWndClass.style |= OS.CS_DBLCLKS;
int byteCount = ProgressBarClass.length () * TCHAR.sizeof;
- int /*long*/ lpszClassName = OS.HeapAlloc (hHeap, OS.HEAP_ZERO_MEMORY, byteCount);
+ long /*int*/ lpszClassName = OS.HeapAlloc (hHeap, OS.HEAP_ZERO_MEMORY, byteCount);
OS.MoveMemory (lpszClassName, ProgressBarClass, byteCount);
lpWndClass.lpszClassName = lpszClassName;
OS.RegisterClass (lpWndClass);
@@ -111,7 +111,7 @@ public ProgressBar (Composite parent, int style) {
super (parent, checkStyle (style));
}
-int /*long*/ callWindowProc (int /*long*/ hwnd, int msg, int /*long*/ wParam, int /*long*/ lParam) {
+long /*int*/ callWindowProc (long /*int*/ hwnd, int msg, long /*int*/ wParam, long /*int*/ lParam) {
if (handle == 0) return 0;
return OS.CallWindowProc (ProgressBarProc, hwnd, msg, wParam, lParam);
}
@@ -323,7 +323,7 @@ public void setSelection (int value) {
* a second time.
*/
if (!OS.IsWinCE && OS.WIN32_VERSION >= OS.VERSION (6, 0)) {
- int /*long*/ state = OS.SendMessage (handle, OS.PBM_GETSTATE, 0, 0);
+ long /*int*/ state = OS.SendMessage (handle, OS.PBM_GETSTATE, 0, 0);
if (state != OS.PBST_NORMAL) {
OS.SendMessage (handle, OS.PBM_SETPOS, value, 0);
}
@@ -380,11 +380,11 @@ TCHAR windowClass () {
return ProgressBarClass;
}
-int /*long*/ windowProc () {
+long /*int*/ windowProc () {
return ProgressBarProc;
}
-LRESULT WM_GETDLGCODE (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT WM_GETDLGCODE (long /*int*/ wParam, long /*int*/ lParam) {
LRESULT result = super.WM_GETDLGCODE (wParam, lParam);
if (result != null) return result;
/*
@@ -399,7 +399,7 @@ LRESULT WM_GETDLGCODE (int /*long*/ wParam, int /*long*/ lParam) {
return new LRESULT (OS.DLGC_STATIC);
}
-LRESULT WM_SIZE (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT WM_SIZE (long /*int*/ wParam, long /*int*/ lParam) {
LRESULT result = super.WM_SIZE (wParam, lParam);
if (result != null) return result;
/*
@@ -435,7 +435,7 @@ LRESULT WM_SIZE (int /*long*/ wParam, int /*long*/ lParam) {
return result;
}
-LRESULT WM_TIMER (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT WM_TIMER (long /*int*/ wParam, long /*int*/ lParam) {
LRESULT result = super.WM_TIMER (wParam, lParam);
if (result != null) return result;
if ((style & SWT.INDETERMINATE) != 0) {
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Sash.java b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Sash.java
index e87b67adda..b834ad02fc 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Sash.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Sash.java
@@ -110,7 +110,7 @@ public void addSelectionListener (SelectionListener listener) {
addListener (SWT.DefaultSelection,typedListener);
}
-int /*long*/ callWindowProc (int /*long*/ hwnd, int msg, int /*long*/ wParam, int /*long*/ lParam) {
+long /*int*/ callWindowProc (long /*int*/ hwnd, int msg, long /*int*/ wParam, long /*int*/ lParam) {
if (handle == 0) return 0;
return OS.DefWindowProc (hwnd, msg, wParam, lParam);
}
@@ -140,12 +140,12 @@ public Point computeSize (int wHint, int hHint, boolean changed) {
void drawBand (int x, int y, int width, int height) {
if ((style & SWT.SMOOTH) != 0) return;
- int /*long*/ hwndTrack = parent.handle;
+ long /*int*/ hwndTrack = parent.handle;
byte [] bits = {-86, 0, 85, 0, -86, 0, 85, 0, -86, 0, 85, 0, -86, 0, 85, 0};
- int /*long*/ stippleBitmap = OS.CreateBitmap (8, 8, 1, 1, bits);
- int /*long*/ stippleBrush = OS.CreatePatternBrush (stippleBitmap);
- int /*long*/ hDC = OS.GetDCEx (hwndTrack, 0, OS.DCX_CACHE);
- int /*long*/ oldBrush = OS.SelectObject (hDC, stippleBrush);
+ long /*int*/ stippleBitmap = OS.CreateBitmap (8, 8, 1, 1, bits);
+ long /*int*/ stippleBrush = OS.CreatePatternBrush (stippleBitmap);
+ long /*int*/ hDC = OS.GetDCEx (hwndTrack, 0, OS.DCX_CACHE);
+ long /*int*/ oldBrush = OS.SelectObject (hDC, stippleBrush);
OS.PatBlt (hDC, x, y, width, height, OS.PATINVERT);
OS.SelectObject (hDC, oldBrush);
OS.ReleaseDC (hwndTrack, hDC);
@@ -182,17 +182,17 @@ TCHAR windowClass () {
return display.windowClass;
}
-int /*long*/ windowProc () {
+long /*int*/ windowProc () {
return display.windowProc;
}
-LRESULT WM_ERASEBKGND (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT WM_ERASEBKGND (long /*int*/ wParam, long /*int*/ lParam) {
super.WM_ERASEBKGND (wParam, lParam);
drawBackground (wParam);
return LRESULT.ONE;
}
-LRESULT WM_KEYDOWN (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT WM_KEYDOWN (long /*int*/ wParam, long /*int*/ lParam) {
LRESULT result = super.WM_KEYDOWN (wParam, lParam);
if (result != null) return result;
switch ((int)/*64*/wParam) {
@@ -216,7 +216,7 @@ LRESULT WM_KEYDOWN (int /*long*/ wParam, int /*long*/ lParam) {
OS.GetWindowRect (handle, rect);
int width = rect.right - rect.left;
int height = rect.bottom - rect.top;
- int /*long*/ hwndTrack = parent.handle;
+ long /*int*/ hwndTrack = parent.handle;
RECT clientRect = new RECT ();
OS.GetClientRect (hwndTrack, clientRect);
int clientWidth = clientRect.right - clientRect.left;
@@ -254,16 +254,16 @@ LRESULT WM_KEYDOWN (int /*long*/ wParam, int /*long*/ lParam) {
return result;
}
-LRESULT WM_GETDLGCODE (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT WM_GETDLGCODE (long /*int*/ wParam, long /*int*/ lParam) {
return new LRESULT (OS.DLGC_STATIC);
}
-LRESULT WM_LBUTTONDOWN (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT WM_LBUTTONDOWN (long /*int*/ wParam, long /*int*/ lParam) {
LRESULT result = super.WM_LBUTTONDOWN (wParam, lParam);
if (result == LRESULT.ZERO) return result;
/* Compute the banding rectangle */
- int /*long*/ hwndTrack = parent.handle;
+ long /*int*/ hwndTrack = parent.handle;
POINT pt = new POINT ();
OS.POINTSTOPOINT (pt, lParam);
RECT rect = new RECT ();
@@ -311,7 +311,7 @@ LRESULT WM_LBUTTONDOWN (int /*long*/ wParam, int /*long*/ lParam) {
return result;
}
-LRESULT WM_LBUTTONUP (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT WM_LBUTTONUP (long /*int*/ wParam, long /*int*/ lParam) {
LRESULT result = super.WM_LBUTTONUP (wParam, lParam);
if (result == LRESULT.ZERO) return result;
@@ -341,7 +341,7 @@ LRESULT WM_LBUTTONUP (int /*long*/ wParam, int /*long*/ lParam) {
return result;
}
-LRESULT WM_MOUSEMOVE (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT WM_MOUSEMOVE (long /*int*/ wParam, long /*int*/ lParam) {
LRESULT result = super.WM_MOUSEMOVE (wParam, lParam);
if (result != null) return result;
if (!dragging || (wParam & OS.MK_LBUTTON) == 0) return result;
@@ -349,7 +349,7 @@ LRESULT WM_MOUSEMOVE (int /*long*/ wParam, int /*long*/ lParam) {
/* Compute the banding rectangle */
POINT pt = new POINT ();
OS.POINTSTOPOINT (pt, lParam);
- int /*long*/ hwndTrack = parent.handle;
+ long /*int*/ hwndTrack = parent.handle;
OS.MapWindowPoints (handle, hwndTrack, pt, 1);
RECT rect = new RECT (), clientRect = new RECT ();
OS.GetWindowRect (handle, rect);
@@ -396,12 +396,12 @@ LRESULT WM_MOUSEMOVE (int /*long*/ wParam, int /*long*/ lParam) {
return result;
}
-LRESULT WM_SETCURSOR (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT WM_SETCURSOR (long /*int*/ wParam, long /*int*/ lParam) {
LRESULT result = super.WM_SETCURSOR (wParam, lParam);
if (result != null) return result;
int hitTest = (short) OS.LOWORD (lParam);
if (hitTest == OS.HTCLIENT) {
- int /*long*/ hCursor = 0;
+ long /*int*/ hCursor = 0;
if ((style & SWT.HORIZONTAL) != 0) {
hCursor = OS.LoadCursor (0, OS.IDC_SIZENS);
} else {
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Scale.java b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Scale.java
index e02cf81d49..5b76a9cd47 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Scale.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Scale.java
@@ -41,7 +41,7 @@ import org.eclipse.swt.events.*;
public class Scale extends Control {
boolean ignoreResize, ignoreSelection;
- static final int /*long*/ TrackBarProc;
+ static final long /*int*/ TrackBarProc;
static final TCHAR TrackBarClass = new TCHAR (0, OS.TRACKBAR_CLASS, true);
boolean createdAsRTL;
static {
@@ -65,13 +65,13 @@ public class Scale extends Control {
* code, other than SWT, could create a control with
* this class name, and fail unexpectedly.
*/
- int /*long*/ hInstance = OS.GetModuleHandle (null);
- int /*long*/ hHeap = OS.GetProcessHeap ();
+ long /*int*/ hInstance = OS.GetModuleHandle (null);
+ long /*int*/ hHeap = OS.GetProcessHeap ();
lpWndClass.hInstance = hInstance;
lpWndClass.style &= ~OS.CS_GLOBALCLASS;
lpWndClass.style |= OS.CS_DBLCLKS;
int byteCount = TrackBarClass.length () * TCHAR.sizeof;
- int /*long*/ lpszClassName = OS.HeapAlloc (hHeap, OS.HEAP_ZERO_MEMORY, byteCount);
+ long /*int*/ lpszClassName = OS.HeapAlloc (hHeap, OS.HEAP_ZERO_MEMORY, byteCount);
OS.MoveMemory (lpszClassName, TrackBarClass, byteCount);
lpWndClass.lpszClassName = lpszClassName;
OS.RegisterClass (lpWndClass);
@@ -142,7 +142,7 @@ public void addSelectionListener(SelectionListener listener) {
addListener (SWT.DefaultSelection,typedListener);
}
-int /*long*/ callWindowProc (int /*long*/ hwnd, int msg, int /*long*/ wParam, int /*long*/ lParam) {
+long /*int*/ callWindowProc (long /*int*/ hwnd, int msg, long /*int*/ wParam, long /*int*/ lParam) {
if (handle == 0) return 0;
return OS.CallWindowProc (TrackBarProc, hwnd, msg, wParam, lParam);
}
@@ -288,7 +288,7 @@ public void removeSelectionListener(SelectionListener listener) {
eventTable.unhook (SWT.DefaultSelection,listener);
}
-void setBackgroundImage (int /*long*/ hImage) {
+void setBackgroundImage (long /*int*/ hImage) {
super.setBackgroundImage (hImage);
/*
* Bug in Windows. Changing the background color of the Scale
@@ -454,11 +454,11 @@ TCHAR windowClass () {
return TrackBarClass;
}
-int /*long*/ windowProc () {
+long /*int*/ windowProc () {
return TrackBarProc;
}
-LRESULT WM_KEYDOWN (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT WM_KEYDOWN (long /*int*/ wParam, long /*int*/ lParam) {
LRESULT result = super.WM_KEYDOWN (wParam, lParam);
if (result != null) return result;
switch ((int)/*64*/wParam) {
@@ -473,7 +473,7 @@ LRESULT WM_KEYDOWN (int /*long*/ wParam, int /*long*/ lParam) {
*/
boolean isRTL = (style & SWT.RIGHT_TO_LEFT) != 0;
if (isRTL != createdAsRTL) {
- int /*long*/ code = callWindowProc (handle, OS.WM_KEYDOWN, wParam == OS.VK_RIGHT ? OS.VK_LEFT : OS.VK_RIGHT, lParam);
+ long /*int*/ code = callWindowProc (handle, OS.WM_KEYDOWN, wParam == OS.VK_RIGHT ? OS.VK_LEFT : OS.VK_RIGHT, lParam);
return new LRESULT (code);
}
break;
@@ -481,7 +481,7 @@ LRESULT WM_KEYDOWN (int /*long*/ wParam, int /*long*/ lParam) {
return result;
}
-LRESULT WM_MOUSEWHEEL (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT WM_MOUSEWHEEL (long /*int*/ wParam, long /*int*/ lParam) {
LRESULT result = super.WM_MOUSEWHEEL (wParam, lParam);
if (result != null) return result;
/*
@@ -494,7 +494,7 @@ LRESULT WM_MOUSEWHEEL (int /*long*/ wParam, int /*long*/ lParam) {
*/
int oldPosition = (int)/*64*/OS.SendMessage (handle, OS.TBM_GETPOS, 0, 0);
ignoreSelection = true;
- int /*long*/ code = callWindowProc (handle, OS.WM_MOUSEWHEEL, wParam, lParam);
+ long /*int*/ code = callWindowProc (handle, OS.WM_MOUSEWHEEL, wParam, lParam);
ignoreSelection = false;
int newPosition = (int)/*64*/OS.SendMessage (handle, OS.TBM_GETPOS, 0, 0);
if (oldPosition != newPosition) {
@@ -509,7 +509,7 @@ LRESULT WM_MOUSEWHEEL (int /*long*/ wParam, int /*long*/ lParam) {
return new LRESULT (code);
}
-LRESULT WM_PAINT (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT WM_PAINT (long /*int*/ wParam, long /*int*/ lParam) {
/*
* Bug in Windows. For some reason, when WM_CTLCOLORSTATIC
* is used to implement transparency and returns a NULL brush,
@@ -541,12 +541,12 @@ LRESULT WM_PAINT (int /*long*/ wParam, int /*long*/ lParam) {
return super.WM_PAINT (wParam, lParam);
}
-LRESULT WM_SIZE (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT WM_SIZE (long /*int*/ wParam, long /*int*/ lParam) {
if (ignoreResize) return null;
return super.WM_SIZE (wParam, lParam);
}
-LRESULT wmScrollChild (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT wmScrollChild (long /*int*/ wParam, long /*int*/ lParam) {
/* Do nothing when scrolling is ending */
int code = OS.LOWORD (wParam);
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/ScrollBar.java b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/ScrollBar.java
index cf21cc258d..60f692a04b 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/ScrollBar.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/ScrollBar.java
@@ -182,7 +182,7 @@ void createWidget () {
}
void destroyWidget () {
- int /*long*/ hwnd = hwndScrollBar ();
+ long /*int*/ hwnd = hwndScrollBar ();
int type = scrollBarType ();
if (OS.IsWinCE) {
SCROLLINFO info = new SCROLLINFO ();
@@ -271,7 +271,7 @@ public int getMaximum () {
SCROLLINFO info = new SCROLLINFO ();
info.cbSize = SCROLLINFO.sizeof;
info.fMask = OS.SIF_RANGE;
- int /*long*/ hwnd = hwndScrollBar ();
+ long /*int*/ hwnd = hwndScrollBar ();
int type = scrollBarType ();
OS.GetScrollInfo (hwnd, type, info);
return info.nMax;
@@ -292,7 +292,7 @@ public int getMinimum () {
SCROLLINFO info = new SCROLLINFO ();
info.cbSize = SCROLLINFO.sizeof;
info.fMask = OS.SIF_RANGE;
- int /*long*/ hwnd = hwndScrollBar ();
+ long /*int*/ hwnd = hwndScrollBar ();
int type = scrollBarType ();
OS.GetScrollInfo (hwnd, type, info);
return info.nMin;
@@ -345,7 +345,7 @@ public int getSelection () {
SCROLLINFO info = new SCROLLINFO ();
info.cbSize = SCROLLINFO.sizeof;
info.fMask = OS.SIF_POS;
- int /*long*/ hwnd = hwndScrollBar ();
+ long /*int*/ hwnd = hwndScrollBar ();
int type = scrollBarType ();
OS.GetScrollInfo (hwnd, type, info);
return info.nPos;
@@ -397,7 +397,7 @@ public int getThumb () {
SCROLLINFO info = new SCROLLINFO ();
info.cbSize = SCROLLINFO.sizeof;
info.fMask = OS.SIF_PAGE;
- int /*long*/ hwnd = hwndScrollBar ();
+ long /*int*/ hwnd = hwndScrollBar ();
int type = scrollBarType ();
OS.GetScrollInfo (hwnd, type, info);
if (info.nPage != 0) --info.nPage;
@@ -530,7 +530,7 @@ public boolean getVisible () {
return (state & HIDDEN) == 0;
}
-int /*long*/ hwndScrollBar () {
+long /*int*/ hwndScrollBar () {
return parent.scrolledHandle ();
}
@@ -634,7 +634,7 @@ public void setEnabled (boolean enabled) {
*/
// if (OS.IsWinCE) error (SWT.ERROR_NOT_IMPLEMENTED);
if (!OS.IsWinCE) {
- int /*long*/ hwnd = hwndScrollBar ();
+ long /*int*/ hwnd = hwndScrollBar ();
int type = scrollBarType ();
int flags = enabled ? OS.ESB_ENABLE_BOTH : OS.ESB_DISABLE_BOTH;
OS.EnableScrollBar (hwnd, type, flags);
@@ -683,7 +683,7 @@ public void setMaximum (int value) {
if (value < 0) return;
SCROLLINFO info = new SCROLLINFO ();
info.cbSize = SCROLLINFO.sizeof;
- int /*long*/ hwnd = hwndScrollBar ();
+ long /*int*/ hwnd = hwndScrollBar ();
int type = scrollBarType ();
info.fMask = OS.SIF_RANGE | OS.SIF_DISABLENOSCROLL;
OS.GetScrollInfo (hwnd, type, info);
@@ -710,7 +710,7 @@ public void setMinimum (int value) {
if (value < 0) return;
SCROLLINFO info = new SCROLLINFO ();
info.cbSize = SCROLLINFO.sizeof;
- int /*long*/ hwnd = hwndScrollBar ();
+ long /*int*/ hwnd = hwndScrollBar ();
int type = scrollBarType ();
info.fMask = OS.SIF_RANGE | OS.SIF_DISABLENOSCROLL;
OS.GetScrollInfo (hwnd, type, info);
@@ -738,7 +738,7 @@ public void setPageIncrement (int value) {
pageIncrement = value;
}
-boolean SetScrollInfo (int /*long*/ hwnd, int flags, SCROLLINFO info, boolean fRedraw) {
+boolean SetScrollInfo (long /*int*/ hwnd, int flags, SCROLLINFO info, boolean fRedraw) {
/*
* Bug in Windows. For some reason, when SetScrollInfo()
* is used with SIF_POS and the scroll bar is hidden,
@@ -844,7 +844,7 @@ public void setSelection (int selection) {
checkWidget();
SCROLLINFO info = new SCROLLINFO ();
info.cbSize = SCROLLINFO.sizeof;
- int /*long*/ hwnd = hwndScrollBar ();
+ long /*int*/ hwnd = hwndScrollBar ();
int type = scrollBarType ();
info.fMask = OS.SIF_POS;
info.nPos = selection;
@@ -873,7 +873,7 @@ public void setThumb (int value) {
if (value < 1) return;
SCROLLINFO info = new SCROLLINFO ();
info.cbSize = SCROLLINFO.sizeof;
- int /*long*/ hwnd = hwndScrollBar ();
+ long /*int*/ hwnd = hwndScrollBar ();
int type = scrollBarType ();
info.fMask = OS.SIF_PAGE | OS.SIF_RANGE | OS.SIF_DISABLENOSCROLL;
OS.GetScrollInfo (hwnd, type, info);
@@ -920,7 +920,7 @@ public void setValues (int selection, int minimum, int maximum, int thumb, int i
info.nMax = maximum;
info.nPage = thumb;
if (info.nPage != 0) info.nPage++;
- int /*long*/ hwnd = hwndScrollBar ();
+ long /*int*/ hwnd = hwndScrollBar ();
int type = scrollBarType ();
SetScrollInfo (hwnd, type, info, true);
}
@@ -953,7 +953,7 @@ public void setVisible (boolean visible) {
if (OS.IsWinCE) {
SCROLLINFO info = new SCROLLINFO ();
info.cbSize = SCROLLINFO.sizeof;
- int /*long*/ hwnd = hwndScrollBar ();
+ long /*int*/ hwnd = hwndScrollBar ();
int type = scrollBarType ();
info.fMask = OS.SIF_RANGE | OS.SIF_PAGE;
if (visible) info.fMask |= OS.SIF_DISABLENOSCROLL;
@@ -990,7 +990,7 @@ public void setVisible (boolean visible) {
* of the scroll bar will get the correct value.
*/
state = visible ? state & ~HIDDEN : state | HIDDEN;
- int /*long*/ hwnd = hwndScrollBar ();
+ long /*int*/ hwnd = hwndScrollBar ();
int type = scrollBarType ();
if (OS.ShowScrollBar (hwnd, type, visible)) {
/*
@@ -1020,7 +1020,7 @@ public void setVisible (boolean visible) {
}
}
-LRESULT wmScrollChild (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT wmScrollChild (long /*int*/ wParam, long /*int*/ lParam) {
/* Do nothing when scrolling is ending */
int code = OS.LOWORD (wParam);
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Scrollable.java b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Scrollable.java
index 0b2e0add0d..af1bcc82ee 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Scrollable.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Scrollable.java
@@ -75,7 +75,7 @@ public Scrollable (Composite parent, int style) {
super (parent, style);
}
-int /*long*/ callWindowProc (int /*long*/ hwnd, int msg, int /*long*/ wParam, int /*long*/ lParam) {
+long /*int*/ callWindowProc (long /*int*/ hwnd, int msg, long /*int*/ wParam, long /*int*/ lParam) {
if (handle == 0) return 0;
return OS.DefWindowProc (hwnd, msg, wParam, lParam);
}
@@ -109,7 +109,7 @@ int /*long*/ callWindowProc (int /*long*/ hwnd, int msg, int /*long*/ wParam, in
*/
public Rectangle computeTrim (int x, int y, int width, int height) {
checkWidget ();
- int /*long*/ scrolledHandle = scrolledHandle ();
+ long /*int*/ scrolledHandle = scrolledHandle ();
RECT rect = new RECT ();
OS.SetRect (rect, x, y, x + width, y + height);
int bits1 = OS.GetWindowLong (scrolledHandle, OS.GWL_STYLE);
@@ -137,7 +137,7 @@ void createWidget () {
}
void destroyScrollBar (int type) {
- int /*long*/ hwnd = scrolledHandle ();
+ long /*int*/ hwnd = scrolledHandle ();
int bits = OS.GetWindowLong (hwnd, OS.GWL_STYLE);
if ((type & SWT.HORIZONTAL) != 0) {
style &= ~SWT.H_SCROLL;
@@ -168,7 +168,7 @@ public Rectangle getClientArea () {
checkWidget ();
forceResize ();
RECT rect = new RECT ();
- int /*long*/ scrolledHandle = scrolledHandle ();
+ long /*int*/ scrolledHandle = scrolledHandle ();
OS.GetClientRect (scrolledHandle, rect);
int x = rect.left, y = rect.top;
int width = rect.right - rect.left;
@@ -258,7 +258,7 @@ void reskinChildren (int flags) {
super.reskinChildren (flags);
}
-int /*long*/ scrolledHandle () {
+long /*int*/ scrolledHandle () {
return handle;
}
@@ -287,11 +287,11 @@ TCHAR windowClass () {
return display.windowClass;
}
-int /*long*/ windowProc () {
+long /*int*/ windowProc () {
return display.windowProc;
}
-LRESULT WM_HSCROLL (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT WM_HSCROLL (long /*int*/ wParam, long /*int*/ lParam) {
LRESULT result = super.WM_HSCROLL (wParam, lParam);
if (result != null) return result;
@@ -308,19 +308,19 @@ LRESULT WM_HSCROLL (int /*long*/ wParam, int /*long*/ lParam) {
return result;
}
-LRESULT WM_MOUSEWHEEL (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT WM_MOUSEWHEEL (long /*int*/ wParam, long /*int*/ lParam) {
return wmScrollWheel ((state & CANVAS) != 0, wParam, lParam);
}
-LRESULT WM_SIZE (int /*long*/ wParam, int /*long*/ lParam) {
- int /*long*/ code = callWindowProc (handle, OS.WM_SIZE, wParam, lParam);
+LRESULT WM_SIZE (long /*int*/ wParam, long /*int*/ lParam) {
+ long /*int*/ code = callWindowProc (handle, OS.WM_SIZE, wParam, lParam);
super.WM_SIZE (wParam, lParam);
// widget may be disposed at this point
if (code == 0) return LRESULT.ZERO;
return new LRESULT (code);
}
-LRESULT WM_VSCROLL (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT WM_VSCROLL (long /*int*/ wParam, long /*int*/ lParam) {
LRESULT result = super.WM_VSCROLL (wParam, lParam);
if (result != null) return result;
/*
@@ -336,7 +336,7 @@ LRESULT WM_VSCROLL (int /*long*/ wParam, int /*long*/ lParam) {
return result;
}
-LRESULT wmNCPaint (int /*long*/ hwnd, int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT wmNCPaint (long /*int*/ hwnd, long /*int*/ wParam, long /*int*/ lParam) {
LRESULT result = super.wmNCPaint (hwnd, wParam, lParam);
if (result != null) return result;
/*
@@ -374,11 +374,11 @@ LRESULT wmNCPaint (int /*long*/ hwnd, int /*long*/ wParam, int /*long*/ lParam)
cornerRect.left = cornerRect.right - (hVisible ? OS.GetSystemMetrics (OS.SM_CXVSCROLL) : 0);
}
if (cornerRect.left != cornerRect.right && cornerRect.top != cornerRect.bottom) {
- int /*long*/ hDC = OS.GetWindowDC (hwnd);
+ long /*int*/ hDC = OS.GetWindowDC (hwnd);
OS.FillRect (hDC, cornerRect, OS.COLOR_BTNFACE + 1);
Decorations shell = menuShell ();
if ((shell.style & SWT.RESIZE) != 0) {
- int /*long*/ hwndScroll = shell.scrolledHandle ();
+ long /*int*/ hwndScroll = shell.scrolledHandle ();
boolean drawGripper = hwnd == hwndScroll;
if (!drawGripper) {
RECT shellRect = new RECT ();
@@ -398,7 +398,7 @@ LRESULT wmNCPaint (int /*long*/ hwnd, int /*long*/ wParam, int /*long*/ lParam)
return result;
}
-LRESULT wmScrollWheel (boolean update, int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT wmScrollWheel (boolean update, long /*int*/ wParam, long /*int*/ lParam) {
int scrollRemainder = display.scrollRemainder;
LRESULT result = super.WM_MOUSEWHEEL (wParam, lParam);
if (result != null) return result;
@@ -457,7 +457,7 @@ LRESULT wmScrollWheel (boolean update, int /*long*/ wParam, int /*long*/ lParam)
*/
int vPosition = verticalBar == null ? 0 : verticalBar.getSelection ();
int hPosition = horizontalBar == null ? 0 : horizontalBar.getSelection ();
- int /*long*/ code = callWindowProc (handle, OS.WM_MOUSEWHEEL, wParam, lParam);
+ long /*int*/ code = callWindowProc (handle, OS.WM_MOUSEWHEEL, wParam, lParam);
if (verticalBar != null) {
int position = verticalBar.getSelection ();
if (position != vPosition) {
@@ -477,7 +477,7 @@ LRESULT wmScrollWheel (boolean update, int /*long*/ wParam, int /*long*/ lParam)
return new LRESULT (code);
}
-LRESULT wmScroll (ScrollBar bar, boolean update, int /*long*/ hwnd, int msg, int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT wmScroll (ScrollBar bar, boolean update, long /*int*/ hwnd, int msg, long /*int*/ wParam, long /*int*/ lParam) {
LRESULT result = null;
if (update) {
int type = msg == OS.WM_HSCROLL ? OS.SB_HORZ : OS.SB_VERT;
@@ -522,7 +522,7 @@ LRESULT wmScroll (ScrollBar bar, boolean update, int /*long*/ hwnd, int msg, int
}
OS.SetScrollInfo (hwnd, type, info, true);
} else {
- int /*long*/ code = callWindowProc (hwnd, msg, wParam, lParam);
+ long /*int*/ code = callWindowProc (hwnd, msg, wParam, lParam);
result = code == 0 ? LRESULT.ZERO : new LRESULT (code);
}
bar.wmScrollChild (wParam, lParam);
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Shell.java b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Shell.java
index eb6a6aca64..bff0bfaf6d 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Shell.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Shell.java
@@ -119,17 +119,17 @@ import org.eclipse.swt.events.*;
public class Shell extends Decorations {
Menu activeMenu;
ToolTip [] toolTips;
- int /*long*/ hIMC, hwndMDIClient, lpstrTip, toolTipHandle, balloonTipHandle;
+ long /*int*/ hIMC, hwndMDIClient, lpstrTip, toolTipHandle, balloonTipHandle;
int minWidth = SWT.DEFAULT, minHeight = SWT.DEFAULT;
- int /*long*/ [] brushes;
+ long /*int*/ [] brushes;
boolean showWithParent, fullScreen, wasMaximized, modified, center;
String toolTitle, balloonTitle;
- int /*long*/ toolIcon, balloonIcon;
- int /*long*/ windowProc;
+ long /*int*/ toolIcon, balloonIcon;
+ long /*int*/ windowProc;
Control lastActive;
SHACTIVATEINFO psai;
- static /*final*/ int /*long*/ ToolTipProc;
- static final int /*long*/ DialogProc;
+ static /*final*/ long /*int*/ ToolTipProc;
+ static final long /*int*/ DialogProc;
static final TCHAR DialogClass = new TCHAR (0, OS.IsWinCE ? "Dialog" : "#32770", true);
final static int [] SYSTEM_COLORS = {
OS.COLOR_BTNFACE,
@@ -274,7 +274,7 @@ public Shell (Display display, int style) {
this (display, null, style, 0, false);
}
-Shell (Display display, Shell parent, int style, int /*long*/ handle, boolean embedded) {
+Shell (Display display, Shell parent, int style, long /*int*/ handle, boolean embedded) {
super ();
checkSubclass ();
if (display == null) display = Display.getCurrent ();
@@ -392,7 +392,7 @@ public Shell (Shell parent, int style) {
*
* @noreference This method is not intended to be referenced by clients.
*/
-public static Shell win32_new (Display display, int /*long*/ handle) {
+public static Shell win32_new (Display display, long /*int*/ handle) {
return new Shell (display, null, SWT.NO_TRIM, handle, true);
}
@@ -415,7 +415,7 @@ public static Shell win32_new (Display display, int /*long*/ handle) {
*
* @since 3.3
*/
-public static Shell internal_new (Display display, int /*long*/ handle) {
+public static Shell internal_new (Display display, long /*int*/ handle) {
return new Shell (display, null, SWT.NO_TRIM, handle, false);
}
@@ -467,12 +467,12 @@ public void addShellListener (ShellListener listener) {
addListener (SWT.Deactivate, typedListener);
}
-int /*long*/ balloonTipHandle () {
+long /*int*/ balloonTipHandle () {
if (balloonTipHandle == 0) createBalloonTipHandle ();
return balloonTipHandle;
}
-int /*long*/ callWindowProc (int /*long*/ hwnd, int msg, int /*long*/ wParam, int /*long*/ lParam) {
+long /*int*/ callWindowProc (long /*int*/ hwnd, int msg, long /*int*/ wParam, long /*int*/ lParam) {
if (handle == 0) return 0;
if (hwnd == toolTipHandle || hwnd == balloonTipHandle) {
return OS.CallWindowProc (ToolTipProc, hwnd, msg, wParam, lParam);
@@ -730,7 +730,7 @@ void enableWidget (boolean enabled) {
}
}
-int /*long*/ findBrush (int /*long*/ value, int lbStyle) {
+long /*int*/ findBrush (long /*int*/ value, int lbStyle) {
if (lbStyle == OS.BS_SOLID) {
for (int i=0; i<SYSTEM_COLORS.length; i++) {
if (value == OS.GetSysColor (SYSTEM_COLORS [i])) {
@@ -738,10 +738,10 @@ int /*long*/ findBrush (int /*long*/ value, int lbStyle) {
}
}
}
- if (brushes == null) brushes = new int /*long*/ [BRUSHES_SIZE];
+ if (brushes == null) brushes = new long /*int*/ [BRUSHES_SIZE];
LOGBRUSH logBrush = new LOGBRUSH ();
for (int i=0; i<brushes.length; i++) {
- int /*long*/ hBrush = brushes [i];
+ long /*int*/ hBrush = brushes [i];
if (hBrush == 0) break;
OS.GetObject (hBrush, LOGBRUSH.sizeof, logBrush);
switch (logBrush.lbStyle) {
@@ -758,7 +758,7 @@ int /*long*/ findBrush (int /*long*/ value, int lbStyle) {
}
}
int length = brushes.length;
- int /*long*/ hBrush = brushes [--length];
+ long /*int*/ hBrush = brushes [--length];
if (hBrush != 0) OS.DeleteObject (hBrush);
System.arraycopy (brushes, 0, brushes, 1, length);
switch (lbStyle) {
@@ -800,7 +800,7 @@ void fixActiveShell () {
* application). The fix is to activate the disabled parent
* shell before disposing or hiding the active shell.
*/
- int /*long*/ hwndParent = OS.GetParent (handle);
+ long /*int*/ hwndParent = OS.GetParent (handle);
if (hwndParent != 0 && handle == OS.GetActiveWindow ()) {
if (!OS.IsWindowEnabled (hwndParent) && OS.IsWindowVisible (hwndParent)) {
OS.SetActiveWindow (hwndParent);
@@ -922,7 +922,7 @@ ToolTip getCurrentToolTip () {
return null;
}
-ToolTip getCurrentToolTip (int /*long*/ hwndToolTip) {
+ToolTip getCurrentToolTip (long /*int*/ hwndToolTip) {
if (hwndToolTip == 0) return null;
if (OS.SendMessage (hwndToolTip, OS.TTM_GETCURRENTTOOL, 0, 0) != 0) {
TOOLINFO lpti = new TOOLINFO ();
@@ -978,7 +978,7 @@ public boolean getFullScreen () {
public int getImeInputMode () {
checkWidget ();
if (!OS.IsDBLocale) return 0;
- int /*long*/ hIMC = OS.ImmGetContext (handle);
+ long /*int*/ hIMC = OS.ImmGetContext (handle);
int [] lpfdwConversion = new int [1], lpfdwSentence = new int [1];
boolean open = OS.ImmGetOpenStatus (hIMC);
if (open) open = OS.ImmGetConversionStatus (hIMC, lpfdwConversion, lpfdwSentence);
@@ -1171,7 +1171,7 @@ public boolean isVisible () {
return getVisible ();
}
-int /*long*/ hwndMDIClient () {
+long /*int*/ hwndMDIClient () {
if (hwndMDIClient == 0) {
int widgetStyle = OS.MDIS_ALLCHILDSTYLES | OS.WS_CHILD | OS.WS_CLIPCHILDREN | OS.WS_CLIPSIBLINGS;
hwndMDIClient = OS.CreateWindowEx (
@@ -1305,7 +1305,7 @@ void releaseWidget () {
activeMenu = null;
display.clearModal (this);
if (lpstrTip != 0) {
- int /*long*/ hHeap = OS.GetProcessHeap ();
+ long /*int*/ hHeap = OS.GetProcessHeap ();
OS.HeapFree (hHeap, 0, lpstrTip);
}
lpstrTip = 0;
@@ -1365,9 +1365,9 @@ void reskinChildren (int flags) {
super.reskinChildren (flags);
}
-LRESULT selectPalette (int /*long*/ hPalette) {
- int /*long*/ hDC = OS.GetDC (handle);
- int /*long*/ hOld = OS.SelectPalette (hDC, hPalette, false);
+LRESULT selectPalette (long /*int*/ hPalette) {
+ long /*int*/ hDC = OS.GetDC (handle);
+ long /*int*/ hOld = OS.SelectPalette (hDC, hPalette, false);
int result = OS.RealizePalette (hDC);
if (result > 0) {
OS.InvalidateRect (handle, null, true);
@@ -1379,7 +1379,7 @@ LRESULT selectPalette (int /*long*/ hPalette) {
return (result > 0) ? LRESULT.ONE : LRESULT.ZERO;
}
-boolean sendKeyEvent (int type, int msg, int /*long*/ wParam, int /*long*/ lParam, Event event) {
+boolean sendKeyEvent (int type, int msg, long /*int*/ wParam, long /*int*/ lParam, Event event) {
if (!isEnabled () || !isActive ()) return false;
return super.sendKeyEvent (type, msg, wParam, lParam, event);
}
@@ -1578,7 +1578,7 @@ public void setImeInputMode (int mode) {
checkWidget ();
if (!OS.IsDBLocale) return;
boolean imeOn = mode != SWT.NONE;
- int /*long*/ hIMC = OS.ImmGetContext (handle);
+ long /*int*/ hIMC = OS.ImmGetContext (handle);
OS.ImmSetOpenStatus (hIMC, imeOn);
if (imeOn) {
int [] lpfdwConversion = new int [1], lpfdwSentence = new int [1];
@@ -1596,7 +1596,7 @@ public void setImeInputMode (int mode) {
}
boolean fullShape = (mode & SWT.DBCS) != 0;
if ((mode & SWT.NATIVE) != 0) {
- int /*long*/ hkl = OS.GetKeyboardLayout (0);
+ long /*int*/ hkl = OS.GetKeyboardLayout (0);
int langid = OS.PRIMARYLANGID (OS.LOWORD (hkl));
if (langid == OS.LANG_JAPANESE) {
fullShape = true;
@@ -1703,7 +1703,7 @@ public void setModified (boolean modified) {
}
void setItemEnabled (int cmd, boolean enabled) {
- int /*long*/ hMenu = OS.GetSystemMenu (handle, false);
+ long /*int*/ hMenu = OS.GetSystemMenu (handle, false);
if (hMenu == 0) return;
int flags = OS.MF_ENABLED;
if (!enabled) flags = OS.MF_DISABLED | OS.MF_GRAYED;
@@ -1740,13 +1740,13 @@ public void setRegion (Region region) {
super.setRegion (region);
}
-void setToolTipText (int /*long*/ hwnd, String text) {
+void setToolTipText (long /*int*/ hwnd, String text) {
if (OS.IsWinCE) return;
TOOLINFO lpti = new TOOLINFO ();
lpti.cbSize = TOOLINFO.sizeof;
lpti.hwnd = handle;
lpti.uId = hwnd;
- int /*long*/ hwndToolTip = toolTipHandle ();
+ long /*int*/ hwndToolTip = toolTipHandle ();
if (text == null) {
OS.SendMessage (hwndToolTip, OS.TTM_DELTOOL, 0, lpti);
} else {
@@ -1768,7 +1768,7 @@ void setToolTipText (NMTTDISPINFO lpnmtdi, byte [] buffer) {
* shell trimmings.
*/
if (!hasCursor ()) return;
- int /*long*/ hHeap = OS.GetProcessHeap ();
+ long /*int*/ hHeap = OS.GetProcessHeap ();
if (lpstrTip != 0) OS.HeapFree (hHeap, 0, lpstrTip);
int byteCount = buffer.length;
lpstrTip = OS.HeapAlloc (hHeap, OS.HEAP_ZERO_MEMORY, byteCount);
@@ -1784,7 +1784,7 @@ void setToolTipText (NMTTDISPINFO lpnmtdi, char [] buffer) {
* shell trimmings.
*/
if (!hasCursor ()) return;
- int /*long*/ hHeap = OS.GetProcessHeap ();
+ long /*int*/ hHeap = OS.GetProcessHeap ();
if (lpstrTip != 0) OS.HeapFree (hHeap, 0, lpstrTip);
int byteCount = buffer.length * 2;
lpstrTip = OS.HeapAlloc (hHeap, OS.HEAP_ZERO_MEMORY, byteCount);
@@ -1792,7 +1792,7 @@ void setToolTipText (NMTTDISPINFO lpnmtdi, char [] buffer) {
lpnmtdi.lpszText = lpstrTip;
}
-void setToolTipTitle (int /*long*/ hwndToolTip, String text, int icon) {
+void setToolTipTitle (long /*int*/ hwndToolTip, String text, int icon) {
/*
* Bug in Windows. For some reason, when TTM_SETTITLE
* is used to set the title of a tool tip, Windows leaks
@@ -1864,7 +1864,7 @@ public void setVisible (boolean visible) {
bringToTop ();
if (isDisposed ()) return;
}
- int /*long*/ hwndShell = OS.GetActiveWindow ();
+ long /*int*/ hwndShell = OS.GetActiveWindow ();
if (hwndShell == 0) {
if (parent != null) hwndShell = parent.handle;
}
@@ -1905,7 +1905,7 @@ public void setVisible (boolean visible) {
/* Make the foreign window parent appear in the task bar */
if (visible) {
if (parent != null && (parent.state & FOREIGN_HANDLE) != 0) {
- int /*long*/ hwndParent = parent.handle;
+ long /*int*/ hwndParent = parent.handle;
int style = OS.GetWindowLong (hwndParent, OS.GWL_EXSTYLE);
if ((style & OS.WS_EX_TOOLWINDOW) != 0) {
OS.SetWindowLong (hwndParent, OS.GWL_EXSTYLE, style & ~OS.WS_EX_TOOLWINDOW);
@@ -1924,7 +1924,7 @@ public void setVisible (boolean visible) {
void subclass () {
super.subclass ();
if (ToolTipProc != 0) {
- int /*long*/ newProc = display.windowProc;
+ long /*int*/ newProc = display.windowProc;
if (toolTipHandle != 0) {
OS.SetWindowLongPtr (toolTipHandle, OS.GWLP_WNDPROC, newProc);
}
@@ -1934,7 +1934,7 @@ void subclass () {
}
}
-int /*long*/ toolTipHandle () {
+long /*int*/ toolTipHandle () {
if (toolTipHandle == 0) createToolTipHandle ();
return toolTipHandle;
}
@@ -1976,7 +1976,7 @@ CREATESTRUCT widgetCreateStruct () {
return null;
}
-int /*long*/ widgetParent () {
+long /*int*/ widgetParent () {
if (handle != 0) return handle;
return parent != null ? parent.handle : 0;
}
@@ -2033,7 +2033,7 @@ TCHAR windowClass () {
return parent != null ? DialogClass : super.windowClass ();
}
-int /*long*/ windowProc () {
+long /*int*/ windowProc () {
if (windowProc != 0) return windowProc;
if (OS.IsSP) return DialogProc;
if ((style & SWT.TOOL) != 0) {
@@ -2043,7 +2043,7 @@ int /*long*/ windowProc () {
return parent != null ? DialogProc : super.windowProc ();
}
-int /*long*/ windowProc (int /*long*/ hwnd, int msg, int /*long*/ wParam, int /*long*/ lParam) {
+long /*int*/ windowProc (long /*int*/ hwnd, int msg, long /*int*/ wParam, long /*int*/ lParam) {
if (handle == 0) return 0;
if (hwnd == toolTipHandle || hwnd == balloonTipHandle) {
switch (msg) {
@@ -2108,7 +2108,7 @@ int widgetStyle () {
return bits | OS.WS_OVERLAPPED | OS.WS_CAPTION;
}
-LRESULT WM_ACTIVATE (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT WM_ACTIVATE (long /*int*/ wParam, long /*int*/ lParam) {
if (OS.IsPPC) {
/*
* Note: this does not work when we get WM_ACTIVATE prior
@@ -2116,7 +2116,7 @@ LRESULT WM_ACTIVATE (int /*long*/ wParam, int /*long*/ lParam) {
*/
if (hooks (SWT.HardKeyDown) || hooks (SWT.HardKeyUp)) {
int fActive = OS.LOWORD (wParam);
- int /*long*/ hwnd = fActive != 0 ? handle : 0;
+ long /*int*/ hwnd = fActive != 0 ? handle : 0;
for (int bVk=OS.VK_APP1; bVk<=OS.VK_APP6; bVk++) {
OS.SHSetAppKeyWndAssoc ((byte) bVk, hwnd);
}
@@ -2152,7 +2152,7 @@ LRESULT WM_ACTIVATE (int /*long*/ wParam, int /*long*/ lParam) {
return parent != null ? LRESULT.ZERO : result;
}
-LRESULT WM_COMMAND (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT WM_COMMAND (long /*int*/ wParam, long /*int*/ lParam) {
if (OS.IsPPC) {
/*
* Note in WinCE PPC: Close the Shell when the "Done Button" has
@@ -2177,12 +2177,12 @@ LRESULT WM_COMMAND (int /*long*/ wParam, int /*long*/ lParam) {
*/
if (OS.IsPPC || OS.IsSP) {
if (menuBar != null) {
- int /*long*/ hwndCB = menuBar.hwndCB;
+ long /*int*/ hwndCB = menuBar.hwndCB;
if (lParam != 0 && hwndCB != 0) {
if (lParam == hwndCB) {
return super.WM_COMMAND (wParam, 0);
} else {
- int /*long*/ hwndChild = OS.GetWindow (hwndCB, OS.GW_CHILD);
+ long /*int*/ hwndChild = OS.GetWindow (hwndCB, OS.GW_CHILD);
if (lParam == hwndChild) return super.WM_COMMAND (wParam, 0);
}
}
@@ -2191,7 +2191,7 @@ LRESULT WM_COMMAND (int /*long*/ wParam, int /*long*/ lParam) {
return super.WM_COMMAND (wParam, lParam);
}
-LRESULT WM_DESTROY (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT WM_DESTROY (long /*int*/ wParam, long /*int*/ lParam) {
LRESULT result = super.WM_DESTROY (wParam, lParam);
/*
* When the shell is a WS_CHILD window of a non-SWT
@@ -2207,7 +2207,7 @@ LRESULT WM_DESTROY (int /*long*/ wParam, int /*long*/ lParam) {
return result;
}
-LRESULT WM_ERASEBKGND (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT WM_ERASEBKGND (long /*int*/ wParam, long /*int*/ lParam) {
LRESULT result = super.WM_ERASEBKGND (wParam, lParam);
if (result != null) return result;
/*
@@ -2225,7 +2225,7 @@ LRESULT WM_ERASEBKGND (int /*long*/ wParam, int /*long*/ lParam) {
return result;
}
-LRESULT WM_ENTERIDLE (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT WM_ENTERIDLE (long /*int*/ wParam, long /*int*/ lParam) {
LRESULT result = super.WM_ENTERIDLE (wParam, lParam);
if (result != null) return result;
Display display = this.display;
@@ -2235,7 +2235,7 @@ LRESULT WM_ENTERIDLE (int /*long*/ wParam, int /*long*/ lParam) {
return result;
}
-LRESULT WM_GETMINMAXINFO (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT WM_GETMINMAXINFO (long /*int*/ wParam, long /*int*/ lParam) {
LRESULT result = super.WM_GETMINMAXINFO (wParam, lParam);
if (result != null) return result;
if (minWidth != SWT.DEFAULT || minHeight != SWT.DEFAULT) {
@@ -2249,7 +2249,7 @@ LRESULT WM_GETMINMAXINFO (int /*long*/ wParam, int /*long*/ lParam) {
return result;
}
-LRESULT WM_MOUSEACTIVATE (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT WM_MOUSEACTIVATE (long /*int*/ wParam, long /*int*/ lParam) {
LRESULT result = super.WM_MOUSEACTIVATE (wParam, lParam);
if (result != null) return result;
@@ -2303,7 +2303,7 @@ LRESULT WM_MOUSEACTIVATE (int /*long*/ wParam, int /*long*/ lParam) {
int pos = OS.GetMessagePos ();
OS.POINTSTOPOINT (pt, pos);
}
- int /*long*/ hwnd = OS.WindowFromPoint (pt);
+ long /*int*/ hwnd = OS.WindowFromPoint (pt);
if (hwnd == 0) return null;
Control control = display.findControl (hwnd);
@@ -2324,12 +2324,12 @@ LRESULT WM_MOUSEACTIVATE (int /*long*/ wParam, int /*long*/ lParam) {
}
}
- int /*long*/ code = callWindowProc (handle, OS.WM_MOUSEACTIVATE, wParam, lParam);
+ long /*int*/ code = callWindowProc (handle, OS.WM_MOUSEACTIVATE, wParam, lParam);
setActiveControl (control);
return new LRESULT (code);
}
-LRESULT WM_MOVE (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT WM_MOVE (long /*int*/ wParam, long /*int*/ lParam) {
LRESULT result = super.WM_MOVE (wParam, lParam);
if (result != null) return result;
ToolTip tip = getCurrentToolTip ();
@@ -2337,23 +2337,23 @@ LRESULT WM_MOVE (int /*long*/ wParam, int /*long*/ lParam) {
return result;
}
-LRESULT WM_NCHITTEST (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT WM_NCHITTEST (long /*int*/ wParam, long /*int*/ lParam) {
if (!OS.IsWindowEnabled (handle)) return null;
if (!isEnabled () || !isActive ()) {
if (!Display.TrimEnabled) return new LRESULT (OS.HTNOWHERE);
- int /*long*/ hittest = callWindowProc (handle, OS.WM_NCHITTEST, wParam, lParam);
+ long /*int*/ hittest = callWindowProc (handle, OS.WM_NCHITTEST, wParam, lParam);
if (hittest == OS.HTCLIENT || hittest == OS.HTMENU) hittest = OS.HTBORDER;
return new LRESULT (hittest);
}
if (menuBar != null && !menuBar.getEnabled ()) {
- int /*long*/ hittest = callWindowProc (handle, OS.WM_NCHITTEST, wParam, lParam);
+ long /*int*/ hittest = callWindowProc (handle, OS.WM_NCHITTEST, wParam, lParam);
if (hittest == OS.HTMENU) hittest = OS.HTBORDER;
return new LRESULT (hittest);
}
return null;
}
-LRESULT WM_NCLBUTTONDOWN (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT WM_NCLBUTTONDOWN (long /*int*/ wParam, long /*int*/ lParam) {
LRESULT result = super.WM_NCLBUTTONDOWN (wParam, lParam);
if (result != null) return result;
/*
@@ -2365,11 +2365,11 @@ LRESULT WM_NCLBUTTONDOWN (int /*long*/ wParam, int /*long*/ lParam) {
*/
if (!display.ignoreRestoreFocus) return result;
Display display = this.display;
- int /*long*/ hwndActive = 0;
+ long /*int*/ hwndActive = 0;
boolean fixActive = OS.IsWin95 && display.lastHittest == OS.HTCAPTION;
if (fixActive) hwndActive = OS.SetActiveWindow (handle);
display.lockActiveWindow = true;
- int /*long*/ code = callWindowProc (handle, OS.WM_NCLBUTTONDOWN, wParam, lParam);
+ long /*int*/ code = callWindowProc (handle, OS.WM_NCLBUTTONDOWN, wParam, lParam);
display.lockActiveWindow = false;
if (fixActive) OS.SetActiveWindow (hwndActive);
Control focusControl = display.lastHittestControl;
@@ -2381,21 +2381,21 @@ LRESULT WM_NCLBUTTONDOWN (int /*long*/ wParam, int /*long*/ lParam) {
return new LRESULT (code);
}
-LRESULT WM_PALETTECHANGED (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT WM_PALETTECHANGED (long /*int*/ wParam, long /*int*/ lParam) {
if (wParam != handle) {
- int /*long*/ hPalette = display.hPalette;
+ long /*int*/ hPalette = display.hPalette;
if (hPalette != 0) return selectPalette (hPalette);
}
return super.WM_PALETTECHANGED (wParam, lParam);
}
-LRESULT WM_QUERYNEWPALETTE (int /*long*/ wParam, int /*long*/ lParam) {
- int /*long*/ hPalette = display.hPalette;
+LRESULT WM_QUERYNEWPALETTE (long /*int*/ wParam, long /*int*/ lParam) {
+ long /*int*/ hPalette = display.hPalette;
if (hPalette != 0) return selectPalette (hPalette);
return super.WM_QUERYNEWPALETTE (wParam, lParam);
}
-LRESULT WM_SETCURSOR (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT WM_SETCURSOR (long /*int*/ wParam, long /*int*/ lParam) {
/*
* Feature in Windows. When the shell is disabled
* by a Windows standard dialog (like a MessageBox
@@ -2409,7 +2409,7 @@ LRESULT WM_SETCURSOR (int /*long*/ wParam, int /*long*/ lParam) {
if (!Display.TrimEnabled) {
Shell modalShell = display.getModalShell ();
if (modalShell != null && !isActive ()) {
- int /*long*/ hwndModal = modalShell.handle;
+ long /*int*/ hwndModal = modalShell.handle;
if (OS.IsWindowEnabled (hwndModal)) {
OS.SetActiveWindow (hwndModal);
}
@@ -2417,7 +2417,7 @@ LRESULT WM_SETCURSOR (int /*long*/ wParam, int /*long*/ lParam) {
}
if (!OS.IsWindowEnabled (handle)) {
if (!OS.IsWinCE) {
- int /*long*/ hwndPopup = OS.GetLastActivePopup (handle);
+ long /*int*/ hwndPopup = OS.GetLastActivePopup (handle);
if (hwndPopup != 0 && hwndPopup != handle) {
if (display.getControl (hwndPopup) == null) {
if (OS.IsWindowEnabled (hwndPopup)) {
@@ -2467,7 +2467,7 @@ LRESULT WM_SETCURSOR (int /*long*/ wParam, int /*long*/ lParam) {
return super.WM_SETCURSOR (wParam, lParam);
}
-LRESULT WM_SETTINGCHANGE (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT WM_SETTINGCHANGE (long /*int*/ wParam, long /*int*/ lParam) {
LRESULT result = super.WM_SETTINGCHANGE (wParam, lParam);
if (result != null) return result;
if (OS.IsPPC) {
@@ -2492,7 +2492,7 @@ LRESULT WM_SETTINGCHANGE (int /*long*/ wParam, int /*long*/ lParam) {
return result;
}
-LRESULT WM_SHOWWINDOW (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT WM_SHOWWINDOW (long /*int*/ wParam, long /*int*/ lParam) {
LRESULT result = super.WM_SHOWWINDOW (wParam, lParam);
if (result != null) return result;
/*
@@ -2514,7 +2514,7 @@ LRESULT WM_SHOWWINDOW (int /*long*/ wParam, int /*long*/ lParam) {
return result;
}
-LRESULT WM_SYSCOMMAND (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT WM_SYSCOMMAND (long /*int*/ wParam, long /*int*/ lParam) {
LRESULT result = super.WM_SYSCOMMAND (wParam, lParam);
if (result != null) return result;
/*
@@ -2548,7 +2548,7 @@ LRESULT WM_SYSCOMMAND (int /*long*/ wParam, int /*long*/ lParam) {
return result;
}
-LRESULT WM_WINDOWPOSCHANGING (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT WM_WINDOWPOSCHANGING (long /*int*/ wParam, long /*int*/ lParam) {
LRESULT result = super.WM_WINDOWPOSCHANGING (wParam,lParam);
if (result != null) return result;
WINDOWPOS lpwp = new WINDOWPOS ();
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Slider.java b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Slider.java
index e20f00c890..6f1fa17fe8 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Slider.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Slider.java
@@ -71,7 +71,7 @@ import org.eclipse.swt.events.*;
public class Slider extends Control {
int increment, pageIncrement;
boolean ignoreFocus;
- static final int /*long*/ ScrollBarProc;
+ static final long /*int*/ ScrollBarProc;
static final TCHAR ScrollBarClass = new TCHAR (0, "SCROLLBAR", true);
static {
WNDCLASS lpWndClass = new WNDCLASS ();
@@ -152,7 +152,7 @@ public void addSelectionListener (SelectionListener listener) {
addListener (SWT.DefaultSelection,typedListener);
}
-int /*long*/ callWindowProc (int /*long*/ hwnd, int msg, int /*long*/ wParam, int /*long*/ lParam) {
+long /*int*/ callWindowProc (long /*int*/ hwnd, int msg, long /*int*/ wParam, long /*int*/ lParam) {
if (handle == 0) return 0;
/*
* Feature in Windows. Windows runs a modal message
@@ -473,7 +473,7 @@ public void setPageIncrement (int value) {
pageIncrement = value;
}
-boolean SetScrollInfo (int /*long*/ hwnd, int flags, SCROLLINFO info, boolean fRedraw) {
+boolean SetScrollInfo (long /*int*/ hwnd, int flags, SCROLLINFO info, boolean fRedraw) {
/*
* Feature in Windows. Using SIF_DISABLENOSCROLL,
* SetScrollInfo () can change enabled and disabled
@@ -625,11 +625,11 @@ TCHAR windowClass () {
return ScrollBarClass;
}
-int /*long*/ windowProc () {
+long /*int*/ windowProc () {
return ScrollBarProc;
}
-LRESULT WM_KEYDOWN (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT WM_KEYDOWN (long /*int*/ wParam, long /*int*/ lParam) {
LRESULT result = super.WM_KEYDOWN (wParam, lParam);
if (result != null) return result;
if ((style & SWT.VERTICAL) != 0) return result;
@@ -647,7 +647,7 @@ LRESULT WM_KEYDOWN (int /*long*/ wParam, int /*long*/ lParam) {
case OS.VK_LEFT:
case OS.VK_RIGHT: {
int key = wParam == OS.VK_LEFT ? OS.VK_RIGHT : OS.VK_LEFT;
- int /*long*/ code = callWindowProc (handle, OS.WM_KEYDOWN, key, lParam);
+ long /*int*/ code = callWindowProc (handle, OS.WM_KEYDOWN, key, lParam);
return new LRESULT (code);
}
}
@@ -655,7 +655,7 @@ LRESULT WM_KEYDOWN (int /*long*/ wParam, int /*long*/ lParam) {
return result;
}
-LRESULT WM_LBUTTONDBLCLK (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT WM_LBUTTONDBLCLK (long /*int*/ wParam, long /*int*/ lParam) {
/*
* Feature in Windows. Windows uses the WS_TABSTOP
* style for the scroll bar to decide that focus
@@ -688,7 +688,7 @@ LRESULT WM_LBUTTONDBLCLK (int /*long*/ wParam, int /*long*/ lParam) {
return result;
}
-LRESULT WM_LBUTTONDOWN (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT WM_LBUTTONDOWN (long /*int*/ wParam, long /*int*/ lParam) {
/*
* Feature in Windows. Windows uses the WS_TABSTOP
* style for the scroll bar to decide that focus
@@ -721,12 +721,12 @@ LRESULT WM_LBUTTONDOWN (int /*long*/ wParam, int /*long*/ lParam) {
return result;
}
-LRESULT WM_SETFOCUS (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT WM_SETFOCUS (long /*int*/ wParam, long /*int*/ lParam) {
if (ignoreFocus) return null;
return super.WM_SETFOCUS (wParam, lParam);
}
-LRESULT wmScrollChild (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT wmScrollChild (long /*int*/ wParam, long /*int*/ lParam) {
/* Do nothing when scrolling is ending */
int code = OS.LOWORD (wParam);
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Spinner.java b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Spinner.java
index 82dd8c81da..fe4030ef0e 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Spinner.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Spinner.java
@@ -42,12 +42,12 @@ import org.eclipse.swt.events.*;
* @noextend This class is not intended to be subclassed by clients.
*/
public class Spinner extends Composite {
- int /*long*/ hwndText, hwndUpDown;
+ long /*int*/ hwndText, hwndUpDown;
boolean ignoreModify, ignoreCharacter;
int pageIncrement, digits;
- static final int /*long*/ EditProc;
+ static final long /*int*/ EditProc;
static final TCHAR EditClass = new TCHAR (0, "EDIT", true);
- static final int /*long*/ UpDownProc;
+ static final long /*int*/ UpDownProc;
static final TCHAR UpDownClass = new TCHAR (0, OS.UPDOWN_CLASS, true);
static {
WNDCLASS lpWndClass = new WNDCLASS ();
@@ -107,7 +107,7 @@ public Spinner (Composite parent, int style) {
super (parent, checkStyle (style));
}
-int /*long*/ callWindowProc (int /*long*/ hwnd, int msg, int /*long*/ wParam, int /*long*/ lParam) {
+long /*int*/ callWindowProc (long /*int*/ hwnd, int msg, long /*int*/ wParam, long /*int*/ lParam) {
if (handle == 0) return 0;
if (hwnd == hwndText) {
return OS.CallWindowProc (EditProc, hwnd, msg, wParam, lParam);
@@ -129,7 +129,7 @@ static int checkStyle (int style) {
return style & ~(SWT.H_SCROLL | SWT.V_SCROLL);
}
-boolean checkHandle (int /*long*/ hwnd) {
+boolean checkHandle (long /*int*/ hwnd) {
return hwnd == handle || hwnd == hwndText || hwnd == hwndUpDown;
}
@@ -140,7 +140,7 @@ protected void checkSubclass () {
void createHandle () {
super.createHandle ();
state &= ~(CANVAS | THEME_BACKGROUND);
- int /*long*/ hInstance = OS.GetModuleHandle (null);
+ long /*int*/ hInstance = OS.GetModuleHandle (null);
int textExStyle = (style & SWT.BORDER) != 0 ? OS.WS_EX_CLIENTEDGE : 0;
int textStyle = OS.WS_CHILD | OS.WS_VISIBLE | OS.ES_AUTOHSCROLL | OS.WS_CLIPSIBLINGS;
if ((style & SWT.READ_ONLY) != 0) textStyle |= OS.ES_READONLY;
@@ -183,7 +183,7 @@ void createHandle () {
SetWindowPos (hwndText, hwndUpDown, 0, 0, 0, 0, flags);
OS.SetWindowLongPtr (hwndUpDown, OS.GWLP_ID, hwndUpDown);
if (OS.IsDBLocale) {
- int /*long*/ hIMC = OS.ImmGetContext (handle);
+ long /*int*/ hIMC = OS.ImmGetContext (handle);
OS.ImmAssociateContext (hwndText, hIMC);
OS.ImmAssociateContext (hwndUpDown, hIMC);
OS.ImmReleaseContext (handle, hIMC);
@@ -280,7 +280,7 @@ void addVerifyListener (VerifyListener listener) {
addListener (SWT.Verify, typedListener);
}
-int /*long*/ borderHandle () {
+long /*int*/ borderHandle () {
return hwndText;
}
@@ -288,8 +288,8 @@ public Point computeSize (int wHint, int hHint, boolean changed) {
checkWidget ();
int width = 0, height = 0;
if (wHint == SWT.DEFAULT || hHint == SWT.DEFAULT) {
- int /*long*/ newFont, oldFont = 0;
- int /*long*/ hDC = OS.GetDC (hwndText);
+ long /*int*/ newFont, oldFont = 0;
+ long /*int*/ hDC = OS.GetDC (hwndText);
newFont = OS.SendMessage (hwndText, OS.WM_GETFONT, 0, 0);
if (newFont != 0) oldFont = OS.SelectObject (hDC, newFont);
TEXTMETRIC tm = OS.IsUnicode ? (TEXTMETRIC) new TEXTMETRICW () : new TEXTMETRICA ();
@@ -350,7 +350,7 @@ public Rectangle computeTrim (int x, int y, int width, int height) {
* the single-line text widget in an editable combo
* box.
*/
- int /*long*/ margins = OS.SendMessage (hwndText, OS.EM_GETMARGINS, 0, 0);
+ long /*int*/ margins = OS.SendMessage (hwndText, OS.EM_GETMARGINS, 0, 0);
x -= OS.LOWORD (margins);
width += OS.LOWORD (margins) + OS.HIWORD (margins);
if ((style & SWT.BORDER) != 0) {
@@ -414,7 +414,7 @@ void deregister () {
}
boolean hasFocus () {
- int /*long*/ hwndFocus = OS.GetFocus ();
+ long /*int*/ hwndFocus = OS.GetFocus ();
if (hwndFocus == handle) return true;
if (hwndFocus == hwndText) return true;
if (hwndFocus == hwndUpDown) return true;
@@ -730,7 +730,7 @@ void removeVerifyListener (VerifyListener listener) {
eventTable.unhook (SWT.Verify, listener);
}
-boolean sendKeyEvent (int type, int msg, int /*long*/ wParam, int /*long*/ lParam, Event event) {
+boolean sendKeyEvent (int type, int msg, long /*int*/ wParam, long /*int*/ lParam, Event event) {
if (!super.sendKeyEvent (type, msg, wParam, lParam, event)) {
return false;
}
@@ -813,7 +813,7 @@ boolean sendKeyEvent (int type, int msg, int /*long*/ wParam, int /*long*/ lPara
return false;
}
-void setBackgroundImage (int /*long*/ hBitmap) {
+void setBackgroundImage (long /*int*/ hBitmap) {
super.setBackgroundImage (hBitmap);
OS.InvalidateRect (hwndText, null, true);
}
@@ -877,14 +877,14 @@ void setForegroundPixel (int pixel) {
public void setIncrement (int value) {
checkWidget ();
if (value < 1) return;
- int /*long*/ hHeap = OS.GetProcessHeap ();
+ long /*int*/ hHeap = OS.GetProcessHeap ();
int count = (int)/*64*/OS.SendMessage (hwndUpDown, OS.UDM_GETACCEL, 0, (UDACCEL)null);
- int /*long*/ udaccels = OS.HeapAlloc (hHeap, OS.HEAP_ZERO_MEMORY, UDACCEL.sizeof * count);
+ long /*int*/ udaccels = OS.HeapAlloc (hHeap, OS.HEAP_ZERO_MEMORY, UDACCEL.sizeof * count);
OS.SendMessage (hwndUpDown, OS.UDM_GETACCEL, count, udaccels);
int first = -1;
UDACCEL udaccel = new UDACCEL ();
for (int i = 0; i < count; i++) {
- int /*long*/ offset = udaccels + (i * UDACCEL.sizeof);
+ long /*int*/ offset = udaccels + (i * UDACCEL.sizeof);
OS.MoveMemory (udaccel, offset, UDACCEL.sizeof);
if (first == -1) first = udaccel.nInc;
udaccel.nInc = udaccel.nInc / first * value;
@@ -1102,7 +1102,7 @@ public void setValues (int selection, int minimum, int maximum, int digits, int
void subclass () {
super.subclass ();
- int /*long*/ newProc = display.windowProc;
+ long /*int*/ newProc = display.windowProc;
OS.SetWindowLongPtr (hwndText, OS.GWLP_WNDPROC, newProc);
OS.SetWindowLongPtr (hwndUpDown, OS.GWLP_WNDPROC, newProc);
}
@@ -1176,7 +1176,7 @@ int widgetExtStyle () {
return super.widgetExtStyle () & ~OS.WS_EX_CLIENTEDGE;
}
-int /*long*/ windowProc (int /*long*/ hwnd, int msg, int /*long*/ wParam, int /*long*/ lParam) {
+long /*int*/ windowProc (long /*int*/ hwnd, int msg, long /*int*/ wParam, long /*int*/ lParam) {
if (hwnd == hwndText || hwnd == hwndUpDown) {
LRESULT result = null;
switch (msg) {
@@ -1236,30 +1236,30 @@ int /*long*/ windowProc (int /*long*/ hwnd, int msg, int /*long*/ wParam, int /*
return super.windowProc (hwnd, msg, wParam, lParam);
}
-LRESULT WM_ERASEBKGND (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT WM_ERASEBKGND (long /*int*/ wParam, long /*int*/ lParam) {
super.WM_ERASEBKGND (wParam, lParam);
drawBackground (wParam);
return LRESULT.ONE;
}
-LRESULT WM_KILLFOCUS (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT WM_KILLFOCUS (long /*int*/ wParam, long /*int*/ lParam) {
return null;
}
-LRESULT WM_SETFOCUS (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT WM_SETFOCUS (long /*int*/ wParam, long /*int*/ lParam) {
OS.SetFocus (hwndText);
OS.SendMessage (hwndText, OS.EM_SETSEL, 0, -1);
return null;
}
-LRESULT WM_SETFONT (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT WM_SETFONT (long /*int*/ wParam, long /*int*/ lParam) {
LRESULT result = super.WM_SETFONT (wParam, lParam);
if (result != null) return result;
OS.SendMessage (hwndText, OS.WM_SETFONT, wParam, lParam);
return result;
}
-LRESULT WM_SIZE (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT WM_SIZE (long /*int*/ wParam, long /*int*/ lParam) {
LRESULT result = super.WM_SIZE (wParam, lParam);
if (isDisposed ()) return result;
int width = OS.LOWORD (lParam), height = OS.HIWORD (lParam);
@@ -1272,7 +1272,7 @@ LRESULT WM_SIZE (int /*long*/ wParam, int /*long*/ lParam) {
return result;
}
-LRESULT wmIMEChar(int /*long*/ hwnd, int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT wmIMEChar(long /*int*/ hwnd, long /*int*/ wParam, long /*int*/ lParam) {
/* Process a DBCS character */
Display display = this.display;
@@ -1291,7 +1291,7 @@ LRESULT wmIMEChar(int /*long*/ hwnd, int /*long*/ wParam, int /*long*/ lParam) {
* them to the application.
*/
ignoreCharacter = true;
- int /*long*/ result = callWindowProc (hwnd, OS.WM_IME_CHAR, wParam, lParam);
+ long /*int*/ result = callWindowProc (hwnd, OS.WM_IME_CHAR, wParam, lParam);
MSG msg = new MSG ();
int flags = OS.PM_REMOVE | OS.PM_NOYIELD | OS.PM_QS_INPUT | OS.PM_QS_POSTMESSAGE;
while (OS.PeekMessage (msg, hwnd, OS.WM_CHAR, OS.WM_CHAR, flags)) {
@@ -1306,7 +1306,7 @@ LRESULT wmIMEChar(int /*long*/ hwnd, int /*long*/ wParam, int /*long*/ lParam) {
return new LRESULT (result);
}
-LRESULT wmChar (int /*long*/ hwnd, int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT wmChar (long /*int*/ hwnd, long /*int*/ wParam, long /*int*/ lParam) {
if (ignoreCharacter) return null;
LRESULT result = super.wmChar (hwnd, wParam, lParam);
if (result != null) return result;
@@ -1327,7 +1327,7 @@ LRESULT wmChar (int /*long*/ hwnd, int /*long*/ wParam, int /*long*/ lParam) {
return result;
}
-LRESULT wmClipboard (int /*long*/ hwndText, int msg, int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT wmClipboard (long /*int*/ hwndText, int msg, long /*int*/ wParam, long /*int*/ lParam) {
if ((style & SWT.READ_ONLY) != 0) return null;
// if (!hooks (SWT.Verify) && !filters (SWT.Verify)) return null;
boolean call = false;
@@ -1377,11 +1377,11 @@ LRESULT wmClipboard (int /*long*/ hwndText, int msg, int /*long*/ wParam, int /*
}
TCHAR buffer = new TCHAR (getCodePage (), newText, true);
if (msg == OS.WM_SETTEXT) {
- int /*long*/ hHeap = OS.GetProcessHeap ();
+ long /*int*/ hHeap = OS.GetProcessHeap ();
int byteCount = buffer.length () * TCHAR.sizeof;
- int /*long*/ pszText = OS.HeapAlloc (hHeap, OS.HEAP_ZERO_MEMORY, byteCount);
+ long /*int*/ pszText = OS.HeapAlloc (hHeap, OS.HEAP_ZERO_MEMORY, byteCount);
OS.MoveMemory (pszText, buffer, byteCount);
- int /*long*/ code = OS.CallWindowProc (EditProc, hwndText, msg, wParam, pszText);
+ long /*int*/ code = OS.CallWindowProc (EditProc, hwndText, msg, wParam, pszText);
OS.HeapFree (hHeap, 0, pszText);
return new LRESULT (code);
} else {
@@ -1393,7 +1393,7 @@ LRESULT wmClipboard (int /*long*/ hwndText, int msg, int /*long*/ wParam, int /*
return null;
}
-LRESULT wmCommandChild (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT wmCommandChild (long /*int*/ wParam, long /*int*/ lParam) {
int code = OS.HIWORD (wParam);
switch (code) {
case OS.EN_CHANGE:
@@ -1416,7 +1416,7 @@ LRESULT wmCommandChild (int /*long*/ wParam, int /*long*/ lParam) {
return super.wmCommandChild (wParam, lParam);
}
-LRESULT wmKeyDown (int /*long*/ hwnd, int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT wmKeyDown (long /*int*/ hwnd, long /*int*/ wParam, long /*int*/ lParam) {
if (ignoreCharacter) return null;
LRESULT result = super.wmKeyDown (hwnd, wParam, lParam);
if (result != null) return result;
@@ -1461,7 +1461,7 @@ LRESULT wmKeyDown (int /*long*/ hwnd, int /*long*/ wParam, int /*long*/ lParam)
return result;
}
-LRESULT wmKillFocus (int /*long*/ hwnd, int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT wmKillFocus (long /*int*/ hwnd, long /*int*/ wParam, long /*int*/ lParam) {
boolean [] parseFail = new boolean [1];
int value = getSelectionText (parseFail);
if (parseFail [0]) {
@@ -1475,7 +1475,7 @@ LRESULT wmKillFocus (int /*long*/ hwnd, int /*long*/ wParam, int /*long*/ lParam
return super.wmKillFocus (hwnd, wParam, lParam);
}
-LRESULT wmNotifyChild (NMHDR hdr, int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT wmNotifyChild (NMHDR hdr, long /*int*/ wParam, long /*int*/ lParam) {
switch (hdr.code) {
case OS.UDN_DELTAPOS:
NMUPDOWN lpnmud = new NMUPDOWN ();
@@ -1504,7 +1504,7 @@ LRESULT wmNotifyChild (NMHDR hdr, int /*long*/ wParam, int /*long*/ lParam) {
return super.wmNotifyChild (hdr, wParam, lParam);
}
-LRESULT wmScrollChild (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT wmScrollChild (long /*int*/ wParam, long /*int*/ lParam) {
int code = OS.LOWORD (wParam);
switch (code) {
case OS.SB_THUMBPOSITION:
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/TabFolder.java b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/TabFolder.java
index f469bcdd25..e1e8b9990a 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/TabFolder.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/TabFolder.java
@@ -50,7 +50,7 @@ import org.eclipse.swt.events.*;
public class TabFolder extends Composite {
TabItem [] items;
ImageList imageList;
- static final int /*long*/ TabFolderProc;
+ static final long /*int*/ TabFolderProc;
static final TCHAR TabFolderClass = new TCHAR (0, OS.WC_TABCONTROL, true);
boolean createdAsRTL;
@@ -84,12 +84,12 @@ public class TabFolder extends Composite {
* code, other than SWT, could create a control with
* this class name, and fail unexpectedly.
*/
- int /*long*/ hInstance = OS.GetModuleHandle (null);
- int /*long*/ hHeap = OS.GetProcessHeap ();
+ long /*int*/ hInstance = OS.GetModuleHandle (null);
+ long /*int*/ hHeap = OS.GetProcessHeap ();
lpWndClass.hInstance = hInstance;
lpWndClass.style &= ~(OS.CS_HREDRAW | OS.CS_VREDRAW | OS.CS_GLOBALCLASS);
int byteCount = TabFolderClass.length () * TCHAR.sizeof;
- int /*long*/ lpszClassName = OS.HeapAlloc (hHeap, OS.HEAP_ZERO_MEMORY, byteCount);
+ long /*int*/ lpszClassName = OS.HeapAlloc (hHeap, OS.HEAP_ZERO_MEMORY, byteCount);
OS.MoveMemory (lpszClassName, TabFolderClass, byteCount);
lpWndClass.lpszClassName = lpszClassName;
OS.RegisterClass (lpWndClass);
@@ -162,7 +162,7 @@ public void addSelectionListener(SelectionListener listener) {
addListener(SWT.DefaultSelection,typedListener);
}
-int /*long*/ callWindowProc (int /*long*/ hwnd, int msg, int /*long*/ wParam, int /*long*/ lParam) {
+long /*int*/ callWindowProc (long /*int*/ hwnd, int msg, long /*int*/ wParam, long /*int*/ lParam) {
if (handle == 0) return 0;
return OS.CallWindowProc (TabFolderProc, hwnd, msg, wParam, lParam);
}
@@ -269,7 +269,7 @@ void createHandle () {
* is set. The fix is to set TTM_SETMAXTIPWIDTH to
* a large value.
*/
- int /*long*/ hwndToolTip = OS.SendMessage (handle, OS.TCM_GETTOOLTIPS, 0, 0);
+ long /*int*/ hwndToolTip = OS.SendMessage (handle, OS.TCM_GETTOOLTIPS, 0, 0);
OS.SendMessage (hwndToolTip, OS.TTM_SETMAXTIPWIDTH, 0, 0x7FFF);
createdAsRTL = (style & SWT.RIGHT_TO_LEFT) != 0;
@@ -307,7 +307,7 @@ void destroyItem (TabItem item) {
}
}
-void drawThemeBackground (int /*long*/ hDC, int /*long*/ hwnd, RECT rect) {
+void drawThemeBackground (long /*int*/ hDC, long /*int*/ hwnd, RECT rect) {
RECT rect2 = new RECT ();
OS.GetClientRect (handle, rect2);
OS.MapWindowPoints (handle, hwnd, rect2, 2);
@@ -467,7 +467,7 @@ int imageIndex (Image image) {
Rectangle bounds = image.getBounds ();
imageList = display.getImageList (style & SWT.RIGHT_TO_LEFT, bounds.width, bounds.height);
int index = imageList.add (image);
- int /*long*/ hImageList = imageList.getHandle ();
+ long /*int*/ hImageList = imageList.getHandle ();
OS.SendMessage (handle, OS.TCM_SETIMAGELIST, 0, hImageList);
return index;
}
@@ -750,7 +750,7 @@ String toolTipText (NMTTDISPINFO hdr) {
return null;
}
int index = (int)/*64*/hdr.idFrom;
- int /*long*/ hwndToolTip = OS.SendMessage (handle, OS.TCM_GETTOOLTIPS, 0, 0);
+ long /*int*/ hwndToolTip = OS.SendMessage (handle, OS.TCM_GETTOOLTIPS, 0, 0);
if (hwndToolTip == hdr.hwndFrom) {
/*
* Bug in Windows. For some reason the reading order
@@ -793,7 +793,7 @@ boolean traversePage (boolean next) {
void updateOrientation () {
super.updateOrientation ();
- int /*long*/ hwndChild = OS.GetWindow (handle, OS.GW_CHILD);
+ long /*int*/ hwndChild = OS.GetWindow (handle, OS.GW_CHILD);
while (hwndChild != 0) {
TCHAR buffer = new TCHAR (0, 128);
OS.GetClassName (hwndChild, buffer, buffer.length ());
@@ -820,7 +820,7 @@ void updateOrientation () {
Point size = imageList.getImageSize ();
display.releaseImageList (imageList);
imageList = display.getImageList (style & SWT.RIGHT_TO_LEFT, size.x, size.y);
- int /*long*/ hImageList = imageList.getHandle ();
+ long /*int*/ hImageList = imageList.getHandle ();
OS.SendMessage (handle, OS.TCM_SETIMAGELIST, 0, hImageList);
TCITEM tcItem = new TCITEM ();
tcItem.mask = OS.TCIF_IMAGE;
@@ -854,11 +854,11 @@ TCHAR windowClass () {
return TabFolderClass;
}
-int /*long*/ windowProc () {
+long /*int*/ windowProc () {
return TabFolderProc;
}
-LRESULT WM_GETDLGCODE (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT WM_GETDLGCODE (long /*int*/ wParam, long /*int*/ lParam) {
LRESULT result = super.WM_GETDLGCODE (wParam, lParam);
/*
* Return DLGC_BUTTON so that mnemonics will be
@@ -869,7 +869,7 @@ LRESULT WM_GETDLGCODE (int /*long*/ wParam, int /*long*/ lParam) {
return new LRESULT (OS.DLGC_BUTTON | OS.DLGC_WANTARROWS);
}
-LRESULT WM_GETOBJECT (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT WM_GETOBJECT (long /*int*/ wParam, long /*int*/ lParam) {
/*
* Ensure that there is an accessible object created for this
* control because support for publishing the keyboard shortcut
@@ -879,7 +879,7 @@ LRESULT WM_GETOBJECT (int /*long*/ wParam, int /*long*/ lParam) {
return super.WM_GETOBJECT (wParam, lParam);
}
-LRESULT WM_KEYDOWN (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT WM_KEYDOWN (long /*int*/ wParam, long /*int*/ lParam) {
LRESULT result = super.WM_KEYDOWN (wParam, lParam);
if (result != null) return result;
switch ((int)/*64*/wParam) {
@@ -894,7 +894,7 @@ LRESULT WM_KEYDOWN (int /*long*/ wParam, int /*long*/ lParam) {
*/
boolean isRTL = (style & SWT.RIGHT_TO_LEFT) != 0;
if (isRTL != createdAsRTL) {
- int /*long*/ code = callWindowProc (handle, OS.WM_KEYDOWN, wParam == OS.VK_RIGHT ? OS.VK_LEFT : OS.VK_RIGHT, lParam);
+ long /*int*/ code = callWindowProc (handle, OS.WM_KEYDOWN, wParam == OS.VK_RIGHT ? OS.VK_LEFT : OS.VK_RIGHT, lParam);
return new LRESULT (code);
}
break;
@@ -902,7 +902,7 @@ LRESULT WM_KEYDOWN (int /*long*/ wParam, int /*long*/ lParam) {
return result;
}
-LRESULT WM_MOUSELEAVE (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT WM_MOUSELEAVE (long /*int*/ wParam, long /*int*/ lParam) {
LRESULT result = super.WM_MOUSELEAVE (wParam, lParam);
if (result != null) return result;
/*
@@ -919,7 +919,7 @@ LRESULT WM_MOUSELEAVE (int /*long*/ wParam, int /*long*/ lParam) {
if (OS.COMCTL32_MAJOR >= 6) {
TOOLINFO lpti = new TOOLINFO ();
lpti.cbSize = TOOLINFO.sizeof;
- int /*long*/ hwndToolTip = OS.SendMessage (handle, OS.TCM_GETTOOLTIPS, 0, 0);
+ long /*int*/ hwndToolTip = OS.SendMessage (handle, OS.TCM_GETTOOLTIPS, 0, 0);
if (OS.SendMessage (hwndToolTip, OS.TTM_GETCURRENTTOOL, 0, lpti) != 0) {
if ((lpti.uFlags & OS.TTF_IDISHWND) == 0) {
OS.SendMessage (hwndToolTip, OS.TTM_DELTOOL, 0, lpti);
@@ -930,7 +930,7 @@ LRESULT WM_MOUSELEAVE (int /*long*/ wParam, int /*long*/ lParam) {
return result;
}
-LRESULT WM_NCHITTEST (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT WM_NCHITTEST (long /*int*/ wParam, long /*int*/ lParam) {
LRESULT result = super.WM_NCHITTEST (wParam, lParam);
if (result != null) return result;
/*
@@ -945,11 +945,11 @@ LRESULT WM_NCHITTEST (int /*long*/ wParam, int /*long*/ lParam) {
* default window proc that returns HTCLIENT when
* the mouse is in the client area.
*/
- int /*long*/ hittest = OS.DefWindowProc (handle, OS.WM_NCHITTEST, wParam, lParam);
+ long /*int*/ hittest = OS.DefWindowProc (handle, OS.WM_NCHITTEST, wParam, lParam);
return new LRESULT (hittest);
}
-LRESULT WM_NOTIFY (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT WM_NOTIFY (long /*int*/ wParam, long /*int*/ lParam) {
/*
* Feature in Windows. When the tab folder window
* proc processes WM_NOTIFY, it forwards this
@@ -973,7 +973,7 @@ LRESULT WM_NOTIFY (int /*long*/ wParam, int /*long*/ lParam) {
return LRESULT.ZERO;
}
-LRESULT WM_PARENTNOTIFY (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT WM_PARENTNOTIFY (long /*int*/ wParam, long /*int*/ lParam) {
LRESULT result = super.WM_PARENTNOTIFY (wParam, lParam);
if (result != null) return result;
/*
@@ -992,7 +992,7 @@ LRESULT WM_PARENTNOTIFY (int /*long*/ wParam, int /*long*/ lParam) {
switch (code) {
case OS.WM_CREATE: {
int id = OS.HIWORD (wParam);
- int /*long*/ hwnd = lParam;
+ long /*int*/ hwnd = lParam;
if (id == ID_UPDOWN) {
int bits = OS.GetWindowLong (hwnd, OS.GWL_EXSTYLE);
OS.SetWindowLong (hwnd, OS.GWL_EXSTYLE, bits | OS.WS_EX_LAYOUTRTL);
@@ -1004,7 +1004,7 @@ LRESULT WM_PARENTNOTIFY (int /*long*/ wParam, int /*long*/ lParam) {
return result;
}
-LRESULT WM_SIZE (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT WM_SIZE (long /*int*/ wParam, long /*int*/ lParam) {
LRESULT result = super.WM_SIZE (wParam, lParam);
/*
* It is possible (but unlikely), that application
@@ -1025,7 +1025,7 @@ LRESULT WM_SIZE (int /*long*/ wParam, int /*long*/ lParam) {
return result;
}
-LRESULT WM_WINDOWPOSCHANGING (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT WM_WINDOWPOSCHANGING (long /*int*/ wParam, long /*int*/ lParam) {
LRESULT result = super.WM_WINDOWPOSCHANGING (wParam, lParam);
if (result != null) return result;
if (!OS.IsWindowVisible (handle)) return result;
@@ -1074,7 +1074,7 @@ LRESULT WM_WINDOWPOSCHANGING (int /*long*/ wParam, int /*long*/ lParam) {
return result;
}
-LRESULT wmNotifyChild (NMHDR hdr, int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT wmNotifyChild (NMHDR hdr, long /*int*/ wParam, long /*int*/ lParam) {
int code = hdr.code;
switch (code) {
case OS.TCN_SELCHANGE:
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/TabItem.java b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/TabItem.java
index b3d441e71f..35f1845a52 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/TabItem.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/TabItem.java
@@ -132,11 +132,11 @@ void _setText (int index, String string) {
if (j < i) string = new String (text, 0, j);
}
}
- int /*long*/ hwnd = parent.handle;
- int /*long*/ hHeap = OS.GetProcessHeap ();
+ long /*int*/ hwnd = parent.handle;
+ long /*int*/ hHeap = OS.GetProcessHeap ();
TCHAR buffer = new TCHAR (parent.getCodePage (), string, true);
int byteCount = buffer.length () * TCHAR.sizeof;
- int /*long*/ pszText = OS.HeapAlloc (hHeap, OS.HEAP_ZERO_MEMORY, byteCount);
+ long /*int*/ pszText = OS.HeapAlloc (hHeap, OS.HEAP_ZERO_MEMORY, byteCount);
OS.MoveMemory (pszText, buffer, byteCount);
TCITEM tcItem = new TCITEM ();
tcItem.mask = OS.TCIF_TEXT;
@@ -302,7 +302,7 @@ public void setImage (Image image) {
if (OS.COMCTL32_MAJOR >= 6) {
if (text.indexOf ('&') != -1) _setText (index, text);
}
- int /*long*/ hwnd = parent.handle;
+ long /*int*/ hwnd = parent.handle;
TCITEM tcItem = new TCITEM ();
tcItem.mask = OS.TCIF_IMAGE;
tcItem.iImage = parent.imageIndex (image);
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Table.java b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Table.java
index 1f528b680b..751731cf82 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Table.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Table.java
@@ -79,12 +79,12 @@ public class Table extends Composite {
TableItem currentItem;
TableColumn sortColumn;
RECT focusRect;
- int /*long*/ headerToolTipHandle;
+ long /*int*/ headerToolTipHandle;
boolean ignoreCustomDraw, ignoreDrawForeground, ignoreDrawBackground, ignoreDrawFocus, ignoreDrawSelection, ignoreDrawHot;
boolean customDraw, dragStarted, explorerTheme, firstColumnImage, fixScrollWidth, tipRequested, wasSelected, wasResized, painted;
boolean ignoreActivate, ignoreSelect, ignoreShrink, ignoreResize, ignoreColumnMove, ignoreColumnResize, fullRowSelect;
int itemHeight, lastIndexOf, lastWidth, sortDirection, resizeCount, selectionForeground, hotIndex;
- static /*final*/ int /*long*/ HeaderProc;
+ static /*final*/ long /*int*/ HeaderProc;
static final int INSET = 4;
static final int GRID_WIDTH = 1;
static final int SORT_WIDTH = 10;
@@ -97,7 +97,7 @@ public class Table extends Composite {
static final int DRAG_IMAGE_SIZE = 301;
static final boolean EXPLORER_THEME = true;
static boolean COMPRESS_ITEMS = true;
- static final int /*long*/ TableProc;
+ static final long /*int*/ TableProc;
static final TCHAR TableClass = new TCHAR (0, OS.WC_LISTVIEW, true);
static {
WNDCLASS lpWndClass = new WNDCLASS ();
@@ -426,11 +426,11 @@ public void addSelectionListener (SelectionListener listener) {
addListener (SWT.DefaultSelection,typedListener);
}
-int /*long*/ callWindowProc (int /*long*/ hwnd, int msg, int /*long*/ wParam, int /*long*/ lParam) {
+long /*int*/ callWindowProc (long /*int*/ hwnd, int msg, long /*int*/ wParam, long /*int*/ lParam) {
return callWindowProc (hwnd, msg, wParam, lParam, false);
}
-int /*long*/ callWindowProc (int /*long*/ hwnd, int msg, int /*long*/ wParam, int /*long*/ lParam, boolean forceSelect) {
+long /*int*/ callWindowProc (long /*int*/ hwnd, int msg, long /*int*/ wParam, long /*int*/ lParam, boolean forceSelect) {
if (handle == 0) return 0;
if (handle != hwnd) {
return OS.CallWindowProc (HeaderProc, hwnd, msg, wParam, lParam);
@@ -520,7 +520,7 @@ int /*long*/ callWindowProc (int /*long*/ hwnd, int msg, int /*long*/ wParam, in
if (msg == OS.WM_PAINT) {
int bits0 = OS.GetWindowLong (handle, OS.GWL_STYLE);
if ((bits0 & OS.LVS_NOCOLUMNHEADER) == 0) {
- int /*long*/ hwndParent = OS.GetParent (handle), hwndOwner = 0;
+ long /*int*/ hwndParent = OS.GetParent (handle), hwndOwner = 0;
while (hwndParent != 0) {
int bits1 = OS.GetWindowLong (hwndParent, OS.GWL_EXSTYLE);
if ((bits1 & OS.WS_EX_COMPOSITED) != 0) {
@@ -554,10 +554,10 @@ int /*long*/ callWindowProc (int /*long*/ hwnd, int msg, int /*long*/ wParam, in
}
}
}
- int /*long*/ code = 0;
+ long /*int*/ code = 0;
if (fixPaint) {
PAINTSTRUCT ps = new PAINTSTRUCT ();
- int /*long*/ hDC = OS.BeginPaint (hwnd, ps);
+ long /*int*/ hDC = OS.BeginPaint (hwnd, ps);
code = OS.CallWindowProc (TableProc, hwnd, OS.WM_PAINT, hDC, lParam);
OS.EndPaint (hwnd, ps);
} else {
@@ -600,7 +600,7 @@ int /*long*/ callWindowProc (int /*long*/ hwnd, int msg, int /*long*/ wParam, in
OS.SendMessage (handle, OS.LVM_SETBKCOLOR, 0, OS.CLR_NONE);
OS.DefWindowProc (handle, OS.WM_SETREDRAW, 1, 0);
OS.InvalidateRect (handle, null, true);
- int /*long*/ hwndHeader = OS.SendMessage (handle, OS.LVM_GETHEADER, 0, 0);
+ long /*int*/ hwndHeader = OS.SendMessage (handle, OS.LVM_GETHEADER, 0, 0);
if (hwndHeader != 0) OS.InvalidateRect (hwndHeader, null, true);
}
//FALL THROUGH
@@ -658,8 +658,8 @@ static int checkStyle (int style) {
return checkBits (style, SWT.SINGLE, SWT.MULTI, 0, 0, 0, 0);
}
-LRESULT CDDS_ITEMPOSTPAINT (NMLVCUSTOMDRAW nmcd, int /*long*/ wParam, int /*long*/ lParam) {
- int /*long*/ hDC = nmcd.hdc;
+LRESULT CDDS_ITEMPOSTPAINT (NMLVCUSTOMDRAW nmcd, long /*int*/ wParam, long /*int*/ lParam) {
+ long /*int*/ hDC = nmcd.hdc;
if (explorerTheme && !ignoreCustomDraw) {
hotIndex = -1;
if (hooks (SWT.EraseItem) && nmcd.left != nmcd.right) {
@@ -694,7 +694,7 @@ LRESULT CDDS_ITEMPOSTPAINT (NMLVCUSTOMDRAW nmcd, int /*long*/ wParam, int /*long
boolean oldIgnore = ignoreCustomDraw;
ignoreCustomDraw = true;
OS.SendMessage (handle, OS. LVM_GETITEMRECT, nmcd.dwItemSpec, rect);
- int /*long*/ hwndHeader = OS.SendMessage (handle, OS.LVM_GETHEADER, 0, 0);
+ long /*int*/ hwndHeader = OS.SendMessage (handle, OS.LVM_GETHEADER, 0, 0);
int index = (int)/*64*/OS.SendMessage (hwndHeader, OS.HDM_ORDERTOINDEX, 0, 0);
RECT itemRect = new RECT ();
if (index == 0) {
@@ -719,7 +719,7 @@ LRESULT CDDS_ITEMPOSTPAINT (NMLVCUSTOMDRAW nmcd, int /*long*/ wParam, int /*long
return null;
}
-LRESULT CDDS_ITEMPREPAINT (NMLVCUSTOMDRAW nmcd, int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT CDDS_ITEMPREPAINT (NMLVCUSTOMDRAW nmcd, long /*int*/ wParam, long /*int*/ lParam) {
/*
* Bug in Windows. When the table has the extended style
* LVS_EX_FULLROWSELECT and LVM_SETBKCOLOR is used with
@@ -751,7 +751,7 @@ LRESULT CDDS_ITEMPREPAINT (NMLVCUSTOMDRAW nmcd, int /*long*/ wParam, int /*long*
hotIndex = (nmcd.uItemState & OS.CDIS_HOT) != 0 ? (int)/*64*/nmcd.dwItemSpec : -1;
if (hooks (SWT.EraseItem) && nmcd.left != nmcd.right) {
OS.SaveDC (nmcd.hdc);
- int /*long*/ hrgn = OS.CreateRectRgn (0, 0, 0, 0);
+ long /*int*/ hrgn = OS.CreateRectRgn (0, 0, 0, 0);
OS.SelectClipRgn (nmcd.hdc, hrgn);
OS.DeleteObject (hrgn);
}
@@ -759,7 +759,7 @@ LRESULT CDDS_ITEMPREPAINT (NMLVCUSTOMDRAW nmcd, int /*long*/ wParam, int /*long*
return new LRESULT (OS.CDRF_NOTIFYSUBITEMDRAW | OS.CDRF_NOTIFYPOSTPAINT);
}
-LRESULT CDDS_POSTPAINT (NMLVCUSTOMDRAW nmcd, int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT CDDS_POSTPAINT (NMLVCUSTOMDRAW nmcd, long /*int*/ wParam, long /*int*/ lParam) {
if (ignoreCustomDraw) return null;
/*
* Bug in Windows. When the table has the extended style
@@ -781,7 +781,7 @@ LRESULT CDDS_POSTPAINT (NMLVCUSTOMDRAW nmcd, int /*long*/ wParam, int /*long*/ l
* has a tooltip, the tooltip is hidden. The fix is to clear
* the tooltip before setting the bits and then reset it.
*/
- int /*long*/ hwndToolTip = OS.SendMessage (handle, OS.LVM_SETTOOLTIPS, 0, 0);
+ long /*int*/ hwndToolTip = OS.SendMessage (handle, OS.LVM_SETTOOLTIPS, 0, 0);
if (OS.IsWinCE) {
RECT rect = new RECT ();
boolean damaged = OS.GetUpdateRect (handle, rect, true);
@@ -789,7 +789,7 @@ LRESULT CDDS_POSTPAINT (NMLVCUSTOMDRAW nmcd, int /*long*/ wParam, int /*long*/ l
OS.ValidateRect (handle, null);
if (damaged) OS.InvalidateRect (handle, rect, true);
} else {
- int /*long*/ rgn = OS.CreateRectRgn (0, 0, 0, 0);
+ long /*int*/ rgn = OS.CreateRectRgn (0, 0, 0, 0);
int result = OS.GetUpdateRgn (handle, rgn, true);
OS.SendMessage (handle, OS.LVM_SETEXTENDEDLISTVIEWSTYLE, bits, bits);
OS.ValidateRect (handle, null);
@@ -809,7 +809,7 @@ LRESULT CDDS_POSTPAINT (NMLVCUSTOMDRAW nmcd, int /*long*/ wParam, int /*long*/ l
return null;
}
-LRESULT CDDS_PREPAINT (NMLVCUSTOMDRAW nmcd, int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT CDDS_PREPAINT (NMLVCUSTOMDRAW nmcd, long /*int*/ wParam, long /*int*/ lParam) {
if (ignoreCustomDraw) {
return new LRESULT (OS.CDRF_NOTIFYITEMDRAW | OS.CDRF_NOTIFYPOSTPAINT);
}
@@ -833,7 +833,7 @@ LRESULT CDDS_PREPAINT (NMLVCUSTOMDRAW nmcd, int /*long*/ wParam, int /*long*/ lP
* has a tooltip, the tooltip is hidden. The fix is to clear
* the tooltip before setting the bits and then reset it.
*/
- int /*long*/ hwndToolTip = OS.SendMessage (handle, OS.LVM_SETTOOLTIPS, 0, 0);
+ long /*int*/ hwndToolTip = OS.SendMessage (handle, OS.LVM_SETTOOLTIPS, 0, 0);
if (OS.IsWinCE) {
RECT rect = new RECT ();
boolean damaged = OS.GetUpdateRect (handle, rect, true);
@@ -841,7 +841,7 @@ LRESULT CDDS_PREPAINT (NMLVCUSTOMDRAW nmcd, int /*long*/ wParam, int /*long*/ lP
OS.ValidateRect (handle, null);
if (damaged) OS.InvalidateRect (handle, rect, true);
} else {
- int /*long*/ rgn = OS.CreateRectRgn (0, 0, 0, 0);
+ long /*int*/ rgn = OS.CreateRectRgn (0, 0, 0, 0);
int result = OS.GetUpdateRgn (handle, rgn, true);
OS.SendMessage (handle, OS.LVM_SETEXTENDEDLISTVIEWSTYLE, bits, 0);
OS.ValidateRect (handle, null);
@@ -867,7 +867,7 @@ LRESULT CDDS_PREPAINT (NMLVCUSTOMDRAW nmcd, int /*long*/ wParam, int /*long*/ lP
* The fix is to draw the background using custom draw.
*/
if (explorerTheme && columnCount == 0) {
- int /*long*/ hDC = nmcd.hdc;
+ long /*int*/ hDC = nmcd.hdc;
RECT rect = new RECT ();
OS.SetRect (rect, nmcd.left, nmcd.top, nmcd.right, nmcd.bottom);
if (OS.IsWindowEnabled (handle) || findImageControl () != null) {
@@ -898,7 +898,7 @@ LRESULT CDDS_PREPAINT (NMLVCUSTOMDRAW nmcd, int /*long*/ wParam, int /*long*/ lP
int clrSortBk = getSortColumnPixel ();
RECT columnRect = new RECT (), headerRect = new RECT ();
OS.GetClientRect (handle, columnRect);
- int /*long*/ hwndHeader = OS.SendMessage (handle, OS.LVM_GETHEADER, 0, 0);
+ long /*int*/ hwndHeader = OS.SendMessage (handle, OS.LVM_GETHEADER, 0, 0);
if (OS.SendMessage (hwndHeader, OS.HDM_GETITEMRECT, index, headerRect) != 0) {
OS.MapWindowPoints (hwndHeader, handle, headerRect, 2);
columnRect.left = headerRect.left;
@@ -918,10 +918,10 @@ LRESULT CDDS_PREPAINT (NMLVCUSTOMDRAW nmcd, int /*long*/ wParam, int /*long*/ lP
return new LRESULT (OS.CDRF_NOTIFYITEMDRAW | OS.CDRF_NOTIFYPOSTPAINT);
}
-LRESULT CDDS_SUBITEMPOSTPAINT (NMLVCUSTOMDRAW nmcd, int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT CDDS_SUBITEMPOSTPAINT (NMLVCUSTOMDRAW nmcd, long /*int*/ wParam, long /*int*/ lParam) {
if (ignoreCustomDraw) return null;
if (nmcd.left == nmcd.right) return new LRESULT (OS.CDRF_DODEFAULT);
- int /*long*/ hDC = nmcd.hdc;
+ long /*int*/ hDC = nmcd.hdc;
if (ignoreDrawForeground) OS.RestoreDC (hDC, -1);
if (OS.IsWindowVisible (handle)) {
/*
@@ -937,7 +937,7 @@ LRESULT CDDS_SUBITEMPOSTPAINT (NMLVCUSTOMDRAW nmcd, int /*long*/ wParam, int /*l
if (oldColumn == -1) {
int newColumn = indexOf (sortColumn);
int result = 0;
- int /*long*/ rgn = 0;
+ long /*int*/ rgn = 0;
if (!OS.IsWinCE && OS.WIN32_VERSION >= OS.VERSION (6, 0)) {
rgn = OS.CreateRectRgn (0, 0, 0, 0);
result = OS.GetUpdateRgn (handle, rgn, true);
@@ -967,8 +967,8 @@ LRESULT CDDS_SUBITEMPOSTPAINT (NMLVCUSTOMDRAW nmcd, int /*long*/ wParam, int /*l
return null;
}
-LRESULT CDDS_SUBITEMPREPAINT (NMLVCUSTOMDRAW nmcd, int /*long*/ wParam, int /*long*/ lParam) {
- int /*long*/ hDC = nmcd.hdc;
+LRESULT CDDS_SUBITEMPREPAINT (NMLVCUSTOMDRAW nmcd, long /*int*/ wParam, long /*int*/ lParam) {
+ long /*int*/ hDC = nmcd.hdc;
if (explorerTheme && !ignoreCustomDraw && hooks (SWT.EraseItem) && (nmcd.left != nmcd.right)) {
OS.RestoreDC (hDC, -1);
}
@@ -984,7 +984,7 @@ LRESULT CDDS_SUBITEMPREPAINT (NMLVCUSTOMDRAW nmcd, int /*long*/ wParam, int /*lo
*/
TableItem item = _getItem ((int)/*64*/nmcd.dwItemSpec);
if (item == null || item.isDisposed ()) return null;
- int /*long*/ hFont = item.fontHandle (nmcd.iSubItem);
+ long /*int*/ hFont = item.fontHandle (nmcd.iSubItem);
if (hFont != -1) OS.SelectObject (hDC, hFont);
if (ignoreCustomDraw || (nmcd.left == nmcd.right)) {
return new LRESULT (hFont == -1 ? OS.CDRF_DODEFAULT : OS.CDRF_NEWFONT);
@@ -1031,7 +1031,7 @@ LRESULT CDDS_SUBITEMPREPAINT (NMLVCUSTOMDRAW nmcd, int /*long*/ wParam, int /*lo
lvItem.mask = OS.LVIF_STATE;
lvItem.stateMask = OS.LVIS_SELECTED;
lvItem.iItem = (int)/*64*/nmcd.dwItemSpec;
- int /*long*/ result = OS.SendMessage (handle, OS.LVM_GETITEM, 0, lvItem);
+ long /*int*/ result = OS.SendMessage (handle, OS.LVM_GETITEM, 0, lvItem);
if ((result != 0 && (lvItem.state & OS.LVIS_SELECTED) != 0)) {
int clrSelection = -1;
if (nmcd.iSubItem == 0) {
@@ -1071,7 +1071,7 @@ LRESULT CDDS_SUBITEMPREPAINT (NMLVCUSTOMDRAW nmcd, int /*long*/ wParam, int /*lo
boolean hasAttributes = true;
if (hFont == -1 && clrText == -1 && clrTextBk == -1) {
if (item.cellForeground == null && item.cellBackground == null && item.cellFont == null) {
- int /*long*/ hwndHeader = OS.SendMessage (handle, OS.LVM_GETHEADER, 0, 0);
+ long /*int*/ hwndHeader = OS.SendMessage (handle, OS.LVM_GETHEADER, 0, 0);
int count = (int)/*64*/OS.SendMessage (hwndHeader, OS.HDM_GETITEMCOUNT, 0, 0);
if (count == 1) hasAttributes = false;
}
@@ -1111,7 +1111,7 @@ LRESULT CDDS_SUBITEMPREPAINT (NMLVCUSTOMDRAW nmcd, int /*long*/ wParam, int /*lo
int oldColumn = (int)/*64*/OS.SendMessage (handle, OS.LVM_GETSELECTEDCOLUMN, 0, 0);
if (oldColumn != -1 && oldColumn == nmcd.iSubItem) {
int result = 0;
- int /*long*/ rgn = 0;
+ long /*int*/ rgn = 0;
if (!OS.IsWinCE && OS.WIN32_VERSION >= OS.VERSION (6, 0)) {
rgn = OS.CreateRectRgn (0, 0, 0, 0);
result = OS.GetUpdateRgn (handle, rgn, true);
@@ -1176,7 +1176,7 @@ boolean checkData (TableItem item, int index, boolean redraw) {
return true;
}
-boolean checkHandle (int /*long*/ hwnd) {
+boolean checkHandle (long /*int*/ hwnd) {
if (hwnd == handle) return true;
return hwnd == OS.SendMessage (handle, OS.LVM_GETHEADER, 0, 0);
}
@@ -1469,7 +1469,7 @@ public Point computeSize (int wHint, int hHint, boolean changed) {
// OS.ReleaseDC (handle, hDC);
// }
// }
- int /*long*/ hwndHeader = OS.SendMessage (handle, OS.LVM_GETHEADER, 0, 0);
+ long /*int*/ hwndHeader = OS.SendMessage (handle, OS.LVM_GETHEADER, 0, 0);
RECT rect = new RECT ();
OS.GetWindowRect (hwndHeader, rect);
int height = rect.bottom - rect.top;
@@ -1484,10 +1484,10 @@ public Point computeSize (int wHint, int hHint, boolean changed) {
}
bits |= width & 0xFFFF;
}
- int /*long*/ result = OS.SendMessage (handle, OS.LVM_APPROXIMATEVIEWRECT, -1, OS.MAKELPARAM (bits, 0xFFFF));
+ long /*int*/ result = OS.SendMessage (handle, OS.LVM_APPROXIMATEVIEWRECT, -1, OS.MAKELPARAM (bits, 0xFFFF));
int width = OS.LOWORD (result);
- int /*long*/ empty = OS.SendMessage (handle, OS.LVM_APPROXIMATEVIEWRECT, 0, 0);
- int /*long*/ oneItem = OS.SendMessage (handle, OS.LVM_APPROXIMATEVIEWRECT, 1, 0);
+ long /*int*/ empty = OS.SendMessage (handle, OS.LVM_APPROXIMATEVIEWRECT, 0, 0);
+ long /*int*/ oneItem = OS.SendMessage (handle, OS.LVM_APPROXIMATEVIEWRECT, 1, 0);
int itemHeight = OS.HIWORD (oneItem) - OS.HIWORD (empty);
height += (int)/*64*/OS.SendMessage (handle, OS.LVM_GETITEMCOUNT, 0, 0) * itemHeight;
if (width == 0) width = DEFAULT_WIDTH;
@@ -1519,7 +1519,7 @@ void createHandle () {
/* Get the header window proc */
if (HeaderProc == 0) {
- int /*long*/ hwndHeader = OS.SendMessage (handle, OS.LVM_GETHEADER, 0, 0);
+ long /*int*/ hwndHeader = OS.SendMessage (handle, OS.LVM_GETHEADER, 0, 0);
HeaderProc = OS.GetWindowLongPtr (hwndHeader, OS.GWLP_WNDPROC);
}
@@ -1549,8 +1549,8 @@ void createHandle () {
/* Set the checkbox image list */
if ((style & SWT.CHECK) != 0) {
- int /*long*/ empty = OS.SendMessage (handle, OS.LVM_APPROXIMATEVIEWRECT, 0, 0);
- int /*long*/ oneItem = OS.SendMessage (handle, OS.LVM_APPROXIMATEVIEWRECT, 1, 0);
+ long /*int*/ empty = OS.SendMessage (handle, OS.LVM_APPROXIMATEVIEWRECT, 0, 0);
+ long /*int*/ oneItem = OS.SendMessage (handle, OS.LVM_APPROXIMATEVIEWRECT, 1, 0);
int width = OS.HIWORD (oneItem) - OS.HIWORD (empty), height = width;
setCheckboxImageList (width, height, false);
OS.SendMessage (handle, OS. LVM_SETCALLBACKMASK, OS.LVIS_STATEIMAGEMASK, 0);
@@ -1568,7 +1568,7 @@ void createHandle () {
* The control will not destroy a font that it did not
* create.
*/
- int /*long*/ hFont = OS.GetStockObject (OS.SYSTEM_FONT);
+ long /*int*/ hFont = OS.GetStockObject (OS.SYSTEM_FONT);
OS.SendMessage (handle, OS.WM_SETFONT, hFont, 0);
/*
@@ -1580,8 +1580,8 @@ void createHandle () {
*/
LVCOLUMN lvColumn = new LVCOLUMN ();
lvColumn.mask = OS.LVCF_TEXT | OS.LVCF_WIDTH;
- int /*long*/ hHeap = OS.GetProcessHeap ();
- int /*long*/ pszText = OS.HeapAlloc (hHeap, OS.HEAP_ZERO_MEMORY, TCHAR.sizeof);
+ long /*int*/ hHeap = OS.GetProcessHeap ();
+ long /*int*/ pszText = OS.HeapAlloc (hHeap, OS.HEAP_ZERO_MEMORY, TCHAR.sizeof);
lvColumn.pszText = pszText;
OS.SendMessage (handle, OS.LVM_INSERTCOLUMN, 0, lvColumn);
OS.HeapFree (hHeap, 0, pszText);
@@ -1604,10 +1604,10 @@ void createHandle () {
*/
if (OS.WIN32_VERSION >= OS.VERSION (4, 10)) {
if ((style & SWT.RIGHT_TO_LEFT) != 0) {
- int /*long*/ hwndHeader = OS.SendMessage (handle, OS.LVM_GETHEADER, 0, 0);
+ long /*int*/ hwndHeader = OS.SendMessage (handle, OS.LVM_GETHEADER, 0, 0);
int bits2 = OS.GetWindowLong (hwndHeader, OS.GWL_EXSTYLE);
OS.SetWindowLong (hwndHeader, OS.GWL_EXSTYLE, bits2 | OS.WS_EX_LAYOUTRTL);
- int /*long*/ hwndTooltop = OS.SendMessage (handle, OS.LVM_GETTOOLTIPS, 0, 0);
+ long /*int*/ hwndTooltop = OS.SendMessage (handle, OS.LVM_GETTOOLTIPS, 0, 0);
int bits3 = OS.GetWindowLong (hwndTooltop, OS.GWL_EXSTYLE);
OS.SetWindowLong (hwndTooltop, OS.GWL_EXSTYLE, bits3 | OS.WS_EX_LAYOUTRTL);
}
@@ -1734,9 +1734,9 @@ void createItem (TableColumn column, int index) {
OS.SendMessage (handle, OS.LVM_GETCOLUMN, 1, lvColumn);
int width = lvColumn.cx;
int cchTextMax = 1024;
- int /*long*/ hHeap = OS.GetProcessHeap ();
+ long /*int*/ hHeap = OS.GetProcessHeap ();
int byteCount = cchTextMax * TCHAR.sizeof;
- int /*long*/ pszText = OS.HeapAlloc (hHeap, OS.HEAP_ZERO_MEMORY, byteCount);
+ long /*int*/ pszText = OS.HeapAlloc (hHeap, OS.HEAP_ZERO_MEMORY, byteCount);
lvColumn.mask = OS.LVCF_TEXT | OS.LVCF_IMAGE | OS.LVCF_WIDTH | OS.LVCF_FMT;
lvColumn.pszText = pszText;
lvColumn.cchTextMax = cchTextMax;
@@ -1789,7 +1789,7 @@ void createItem (TableColumn column, int index) {
/* Add the tool tip item for the header */
if (headerToolTipHandle != 0) {
RECT rect = new RECT ();
- int /*long*/ hwndHeader = OS.SendMessage (handle, OS.LVM_GETHEADER, 0, 0);
+ long /*int*/ hwndHeader = OS.SendMessage (handle, OS.LVM_GETHEADER, 0, 0);
if (OS.SendMessage (hwndHeader, OS.HDM_GETITEMRECT, index, rect) != 0) {
TOOLINFO lpti = new TOOLINFO ();
lpti.cbSize = TOOLINFO.sizeof;
@@ -1852,7 +1852,7 @@ int defaultBackground () {
void deregister () {
super.deregister ();
- int /*long*/ hwndHeader = OS.SendMessage (handle, OS.LVM_GETHEADER, 0, 0);
+ long /*int*/ hwndHeader = OS.SendMessage (handle, OS.LVM_GETHEADER, 0, 0);
if (hwndHeader != 0) display.removeControl (hwndHeader);
}
@@ -2008,9 +2008,9 @@ void destroyItem (TableColumn column) {
if (columnCount > 1) {
index = 1;
int cchTextMax = 1024;
- int /*long*/ hHeap = OS.GetProcessHeap ();
+ long /*int*/ hHeap = OS.GetProcessHeap ();
int byteCount = cchTextMax * TCHAR.sizeof;
- int /*long*/ pszText = OS.HeapAlloc (hHeap, OS.HEAP_ZERO_MEMORY, byteCount);
+ long /*int*/ pszText = OS.HeapAlloc (hHeap, OS.HEAP_ZERO_MEMORY, byteCount);
LVCOLUMN lvColumn = new LVCOLUMN ();
lvColumn.mask = OS.LVCF_TEXT | OS.LVCF_IMAGE | OS.LVCF_WIDTH | OS.LVCF_FMT;
lvColumn.pszText = pszText;
@@ -2021,8 +2021,8 @@ void destroyItem (TableColumn column) {
OS.SendMessage (handle, OS.LVM_SETCOLUMN, 0, lvColumn);
if (pszText != 0) OS.HeapFree (hHeap, 0, pszText);
} else {
- int /*long*/ hHeap = OS.GetProcessHeap ();
- int /*long*/ pszText = OS.HeapAlloc (hHeap, OS.HEAP_ZERO_MEMORY, TCHAR.sizeof);
+ long /*int*/ hHeap = OS.GetProcessHeap ();
+ long /*int*/ pszText = OS.HeapAlloc (hHeap, OS.HEAP_ZERO_MEMORY, TCHAR.sizeof);
LVCOLUMN lvColumn = new LVCOLUMN ();
lvColumn.mask = OS.LVCF_TEXT | OS.LVCF_IMAGE | OS.LVCF_WIDTH | OS.LVCF_FMT;
lvColumn.pszText = pszText;
@@ -2034,7 +2034,7 @@ void destroyItem (TableColumn column) {
HDITEM hdItem = new HDITEM ();
hdItem.mask = OS.HDI_FORMAT;
hdItem.fmt = OS.HDF_LEFT;
- int /*long*/ hwndHeader = OS.SendMessage (handle, OS.LVM_GETHEADER, 0, 0);
+ long /*int*/ hwndHeader = OS.SendMessage (handle, OS.LVM_GETHEADER, 0, 0);
OS.SendMessage (hwndHeader, OS.HDM_SETITEM, index, hdItem);
}
}
@@ -2198,7 +2198,7 @@ void destroyItem (TableItem item) {
if (index == count) return;
setDeferResize (true);
ignoreSelect = ignoreShrink = true;
- int /*long*/ code = OS.SendMessage (handle, OS.LVM_DELETEITEM, index, 0);
+ long /*int*/ code = OS.SendMessage (handle, OS.LVM_DELETEITEM, index, 0);
ignoreSelect = ignoreShrink = false;
if (code == 0) error (SWT.ERROR_ITEM_NOT_REMOVED);
_removeItem (index, count);
@@ -2215,11 +2215,11 @@ void fixCheckboxImageList (boolean fixScroll) {
* the state image list to be the same size as the image list.
*/
if ((style & SWT.CHECK) == 0) return;
- int /*long*/ hImageList = OS.SendMessage (handle, OS.LVM_GETIMAGELIST, OS.LVSIL_SMALL, 0);
+ long /*int*/ hImageList = OS.SendMessage (handle, OS.LVM_GETIMAGELIST, OS.LVSIL_SMALL, 0);
if (hImageList == 0) return;
int [] cx = new int [1], cy = new int [1];
OS.ImageList_GetIconSize (hImageList, cx, cy);
- int /*long*/ hStateList = OS.SendMessage (handle, OS.LVM_GETIMAGELIST, OS.LVSIL_STATE, 0);
+ long /*int*/ hStateList = OS.SendMessage (handle, OS.LVM_GETIMAGELIST, OS.LVSIL_STATE, 0);
if (hStateList == 0) return;
int [] stateCx = new int [1], stateCy = new int [1];
OS.ImageList_GetIconSize (hStateList, stateCx, stateCy);
@@ -2229,7 +2229,7 @@ void fixCheckboxImageList (boolean fixScroll) {
void fixCheckboxImageListColor (boolean fixScroll) {
if ((style & SWT.CHECK) == 0) return;
- int /*long*/ hStateList = OS.SendMessage (handle, OS.LVM_GETIMAGELIST, OS.LVSIL_STATE, 0);
+ long /*int*/ hStateList = OS.SendMessage (handle, OS.LVM_GETIMAGELIST, OS.LVSIL_STATE, 0);
if (hStateList == 0) return;
int [] cx = new int [1], cy = new int [1];
OS.ImageList_GetIconSize (hStateList, cx, cy);
@@ -2268,18 +2268,18 @@ void fixItemHeight (boolean fixScroll) {
setRedraw (false);
setTopIndex (0);
}
- int /*long*/ hOldList = OS.SendMessage (handle, OS.LVM_GETIMAGELIST, OS.LVSIL_SMALL, 0);
+ long /*int*/ hOldList = OS.SendMessage (handle, OS.LVM_GETIMAGELIST, OS.LVSIL_SMALL, 0);
if (hOldList != 0) return;
- int /*long*/ hwndHeader = OS.SendMessage (handle, OS.LVM_GETHEADER, 0, 0);
+ long /*int*/ hwndHeader = OS.SendMessage (handle, OS.LVM_GETHEADER, 0, 0);
RECT rect = new RECT ();
OS.GetWindowRect (hwndHeader, rect);
int height = rect.bottom - rect.top - 1;
- int /*long*/ hImageList = OS.ImageList_Create (1, height, 0, 0, 0);
+ long /*int*/ hImageList = OS.ImageList_Create (1, height, 0, 0, 0);
OS.SendMessage (handle, OS.LVM_SETIMAGELIST, OS.LVSIL_SMALL, hImageList);
fixCheckboxImageList (false);
OS.SendMessage (handle, OS.LVM_SETIMAGELIST, OS.LVSIL_SMALL, 0);
if (headerImageList != null) {
- int /*long*/ hHeaderImageList = headerImageList.getHandle ();
+ long /*int*/ hHeaderImageList = headerImageList.getHandle ();
OS.SendMessage (hwndHeader, OS.HDM_SETIMAGELIST, 0, hHeaderImageList);
}
OS.ImageList_Destroy (hImageList);
@@ -2445,7 +2445,7 @@ public int getGridLineWidth () {
*/
public int getHeaderHeight () {
checkWidget ();
- int /*long*/ hwndHeader = OS.SendMessage (handle, OS.LVM_GETHEADER, 0, 0);
+ long /*int*/ hwndHeader = OS.SendMessage (handle, OS.LVM_GETHEADER, 0, 0);
if (hwndHeader == 0) return 0;
RECT rect = new RECT ();
OS.GetWindowRect (hwndHeader, rect);
@@ -2540,7 +2540,7 @@ public TableItem getItem (Point point) {
RECT rect = new RECT ();
rect.left = OS.LVIR_ICON;
ignoreCustomDraw = true;
- int /*long*/ code = OS.SendMessage (handle, OS.LVM_GETITEMRECT, 0, rect);
+ long /*int*/ code = OS.SendMessage (handle, OS.LVM_GETITEMRECT, 0, rect);
ignoreCustomDraw = false;
if (code != 0) {
pinfo.x = rect.left;
@@ -2575,7 +2575,7 @@ public TableItem getItem (Point point) {
if (pinfo.iItem == 0) {
int bits = OS.GetWindowLong (handle, OS.GWL_STYLE);
if ((bits & OS.LVS_NOCOLUMNHEADER) == 0) {
- int /*long*/ hwndHeader = OS.SendMessage (handle, OS.LVM_GETHEADER, 0, 0);
+ long /*int*/ hwndHeader = OS.SendMessage (handle, OS.LVM_GETHEADER, 0, 0);
if (hwndHeader != 0) {
RECT rect = new RECT ();
OS.GetWindowRect (hwndHeader, rect);
@@ -2621,8 +2621,8 @@ public int getItemCount () {
public int getItemHeight () {
checkWidget ();
if (!painted && hooks (SWT.MeasureItem)) hitTestSelection (0, 0, 0);
- int /*long*/ empty = OS.SendMessage (handle, OS.LVM_APPROXIMATEVIEWRECT, 0, 0);
- int /*long*/ oneItem = OS.SendMessage (handle, OS.LVM_APPROXIMATEVIEWRECT, 1, 0);
+ long /*int*/ empty = OS.SendMessage (handle, OS.LVM_APPROXIMATEVIEWRECT, 0, 0);
+ long /*int*/ oneItem = OS.SendMessage (handle, OS.LVM_APPROXIMATEVIEWRECT, 1, 0);
return OS.HIWORD (oneItem) - OS.HIWORD (empty);
}
@@ -2853,8 +2853,8 @@ public int getTopIndex () {
}
boolean hasChildren () {
- int /*long*/ hwndHeader = OS.SendMessage (handle, OS.LVM_GETHEADER, 0, 0);
- int /*long*/ hwndChild = OS.GetWindow (handle, OS.GW_CHILD);
+ long /*int*/ hwndHeader = OS.SendMessage (handle, OS.LVM_GETHEADER, 0, 0);
+ long /*int*/ hwndChild = OS.GetWindow (handle, OS.GW_CHILD);
while (hwndChild != 0) {
if (hwndChild != hwndHeader) return true;
hwndChild = OS.GetWindow (hwndChild, OS.GW_HWNDNEXT);
@@ -2869,10 +2869,10 @@ boolean hitTestSelection (int index, int x, int y) {
boolean result = false;
if (0 <= index && index < count) {
TableItem item = _getItem (index);
- int /*long*/ hDC = OS.GetDC (handle);
- int /*long*/ oldFont = 0, newFont = OS.SendMessage (handle, OS.WM_GETFONT, 0, 0);
+ long /*int*/ hDC = OS.GetDC (handle);
+ long /*int*/ oldFont = 0, newFont = OS.SendMessage (handle, OS.WM_GETFONT, 0, 0);
if (newFont != 0) oldFont = OS.SelectObject (hDC, newFont);
- int /*long*/ hFont = item.fontHandle (0);
+ long /*int*/ hFont = item.fontHandle (0);
if (hFont != -1) hFont = OS.SelectObject (hDC, hFont);
Event event = sendMeasureItemEvent (item, index, 0, hDC);
if (event.getBounds ().contains (x, y)) result = true;
@@ -2896,7 +2896,7 @@ int imageIndex (Image image, int column) {
imageList = display.getImageList (style & SWT.RIGHT_TO_LEFT, bounds.width, bounds.height);
int index = imageList.indexOf (image);
if (index == -1) index = imageList.add (image);
- int /*long*/ hImageList = imageList.getHandle ();
+ long /*int*/ hImageList = imageList.getHandle ();
/*
* Bug in Windows. Making any change to an item that
* changes the item height of a table while the table
@@ -2913,8 +2913,8 @@ int imageIndex (Image image, int column) {
}
OS.SendMessage (handle, OS.LVM_SETIMAGELIST, OS.LVSIL_SMALL, hImageList);
if (headerImageList != null) {
- int /*long*/ hwndHeader = OS.SendMessage (handle, OS.LVM_GETHEADER, 0, 0);
- int /*long*/ hHeaderImageList = headerImageList.getHandle ();
+ long /*int*/ hwndHeader = OS.SendMessage (handle, OS.LVM_GETHEADER, 0, 0);
+ long /*int*/ hHeaderImageList = headerImageList.getHandle ();
OS.SendMessage (hwndHeader, OS.HDM_SETIMAGELIST, 0, hHeaderImageList);
}
fixCheckboxImageList (false);
@@ -2937,8 +2937,8 @@ int imageIndexHeader (Image image) {
headerImageList = display.getImageList (style & SWT.RIGHT_TO_LEFT, bounds.width, bounds.height);
int index = headerImageList.indexOf (image);
if (index == -1) index = headerImageList.add (image);
- int /*long*/ hImageList = headerImageList.getHandle ();
- int /*long*/ hwndHeader = OS.SendMessage (handle, OS.LVM_GETHEADER, 0, 0);
+ long /*int*/ hImageList = headerImageList.getHandle ();
+ long /*int*/ hwndHeader = OS.SendMessage (handle, OS.LVM_GETHEADER, 0, 0);
OS.SendMessage (hwndHeader, OS.HDM_SETIMAGELIST, 0, hImageList);
return index;
}
@@ -3046,13 +3046,13 @@ public boolean isSelected (int index) {
lvItem.mask = OS.LVIF_STATE;
lvItem.stateMask = OS.LVIS_SELECTED;
lvItem.iItem = index;
- int /*long*/ result = OS.SendMessage (handle, OS.LVM_GETITEM, 0, lvItem);
+ long /*int*/ result = OS.SendMessage (handle, OS.LVM_GETITEM, 0, lvItem);
return (result != 0) && ((lvItem.state & OS.LVIS_SELECTED) != 0);
}
void register () {
super.register ();
- int /*long*/ hwndHeader = OS.SendMessage (handle, OS.LVM_GETHEADER, 0, 0);
+ long /*int*/ hwndHeader = OS.SendMessage (handle, OS.LVM_GETHEADER, 0, 0);
if (hwndHeader != 0) display.addControl (hwndHeader, this);
}
@@ -3118,12 +3118,12 @@ void releaseWidget () {
display.releaseImageList (imageList);
}
if (headerImageList != null) {
- int /*long*/ hwndHeader = OS.SendMessage (handle, OS.LVM_GETHEADER, 0, 0);
+ long /*int*/ hwndHeader = OS.SendMessage (handle, OS.LVM_GETHEADER, 0, 0);
OS.SendMessage (hwndHeader, OS.HDM_SETIMAGELIST, 0, 0);
display.releaseImageList (headerImageList);
}
imageList = headerImageList = null;
- int /*long*/ hStateList = OS.SendMessage (handle, OS.LVM_GETIMAGELIST, OS.LVSIL_STATE, 0);
+ long /*int*/ hStateList = OS.SendMessage (handle, OS.LVM_GETIMAGELIST, OS.LVSIL_STATE, 0);
OS.SendMessage (handle, OS.LVM_SETIMAGELIST, OS.LVSIL_STATE, 0);
if (hStateList != 0) OS.ImageList_Destroy (hStateList);
if (headerToolTipHandle != 0) OS.DestroyWindow (headerToolTipHandle);
@@ -3165,7 +3165,7 @@ public void remove (int [] indices) {
TableItem item = _getItem (index, false);
if (item != null && !item.isDisposed ()) item.release (false);
ignoreSelect = ignoreShrink = true;
- int /*long*/ code = OS.SendMessage (handle, OS.LVM_DELETEITEM, index, 0);
+ long /*int*/ code = OS.SendMessage (handle, OS.LVM_DELETEITEM, index, 0);
ignoreSelect = ignoreShrink = false;
if (code == 0) error (SWT.ERROR_ITEM_NOT_REMOVED);
_removeItem(index, count);
@@ -3199,7 +3199,7 @@ public void remove (int index) {
if (item != null && !item.isDisposed ()) item.release (false);
setDeferResize (true);
ignoreSelect = ignoreShrink = true;
- int /*long*/ code = OS.SendMessage (handle, OS.LVM_DELETEITEM, index, 0);
+ long /*int*/ code = OS.SendMessage (handle, OS.LVM_DELETEITEM, index, 0);
ignoreSelect = ignoreShrink = false;
if (code == 0) error (SWT.ERROR_ITEM_NOT_REMOVED);
_removeItem (index, count);
@@ -3240,7 +3240,7 @@ public void remove (int start, int end) {
TableItem item = _getItem (index, false);
if (item != null && !item.isDisposed ()) item.release (false);
ignoreSelect = ignoreShrink = true;
- int /*long*/ code = OS.SendMessage (handle, OS.LVM_DELETEITEM, start, 0);
+ long /*int*/ code = OS.SendMessage (handle, OS.LVM_DELETEITEM, start, 0);
ignoreSelect = ignoreShrink = false;
if (code == 0) break;
index++;
@@ -3293,7 +3293,7 @@ public void removeAll () {
int index = itemCount - 1;
while (index >= 0) {
ignoreSelect = ignoreShrink = true;
- int /*long*/ code = OS.SendMessage (handle, OS.LVM_DELETEITEM, index, 0);
+ long /*int*/ code = OS.SendMessage (handle, OS.LVM_DELETEITEM, index, 0);
ignoreSelect = ignoreShrink = false;
if (code == 0) break;
--index;
@@ -3312,7 +3312,7 @@ public void removeAll () {
if (index != -1) error (SWT.ERROR_ITEM_NOT_REMOVED);
} else {
ignoreSelect = ignoreShrink = true;
- int /*long*/ code = OS.SendMessage (handle, OS.LVM_DELETEALLITEMS, 0, 0);
+ long /*int*/ code = OS.SendMessage (handle, OS.LVM_DELETEALLITEMS, 0, 0);
ignoreSelect = ignoreShrink = false;
if (code == 0) error (SWT.ERROR_ITEM_NOT_REMOVED);
}
@@ -3504,8 +3504,8 @@ public void selectAll () {
ignoreSelect = false;
}
-void sendEraseItemEvent (TableItem item, NMLVCUSTOMDRAW nmcd, int /*long*/ lParam, Event measureEvent) {
- int /*long*/ hDC = nmcd.hdc;
+void sendEraseItemEvent (TableItem item, NMLVCUSTOMDRAW nmcd, long /*int*/ lParam, Event measureEvent) {
+ long /*int*/ hDC = nmcd.hdc;
int clrText = item.cellForeground != null ? item.cellForeground [nmcd.iSubItem] : -1;
if (clrText == -1) clrText = item.foreground;
int clrTextBk = -1;
@@ -3529,7 +3529,7 @@ void sendEraseItemEvent (TableItem item, NMLVCUSTOMDRAW nmcd, int /*long*/ lPara
lvItem.mask = OS.LVIF_STATE;
lvItem.stateMask = OS.LVIS_SELECTED;
lvItem.iItem = (int)/*64*/nmcd.dwItemSpec;
- int /*long*/ result = OS.SendMessage (handle, OS.LVM_GETITEM, 0, lvItem);
+ long /*int*/ result = OS.SendMessage (handle, OS.LVM_GETITEM, 0, lvItem);
boolean selected = (result != 0 && (lvItem.state & OS.LVIS_SELECTED) != 0);
GCData data = new GCData ();
data.device = display;
@@ -3634,7 +3634,7 @@ void sendEraseItemEvent (TableItem item, NMLVCUSTOMDRAW nmcd, int /*long*/ lPara
OS.MoveMemory (lParam, nmcd, NMLVCUSTOMDRAW.sizeof);
}
}
- int /*long*/ hwndHeader = OS.SendMessage (handle, OS.LVM_GETHEADER, 0, 0);
+ long /*int*/ hwndHeader = OS.SendMessage (handle, OS.LVM_GETHEADER, 0, 0);
boolean firstColumn = nmcd.iSubItem == OS.SendMessage (hwndHeader, OS.HDM_ORDERTOINDEX, 0, 0);
if (ignoreDrawForeground && ignoreDrawHot && !drawDrophilited) {
if (!ignoreDrawBackground && drawBackground) {
@@ -3679,7 +3679,7 @@ void sendEraseItemEvent (TableItem item, NMLVCUSTOMDRAW nmcd, int /*long*/ lPara
rect.right += EXPLORER_EXTRA;
pClipRect.right += EXPLORER_EXTRA;
}
- int /*long*/ hTheme = OS.OpenThemeData (handle, Display.LISTVIEW);
+ long /*int*/ hTheme = OS.OpenThemeData (handle, Display.LISTVIEW);
int iStateId = selected ? OS.LISS_SELECTED : OS.LISS_HOT;
if (OS.GetFocus () != handle && selected && !drawHot) iStateId = OS.LISS_SELECTEDNOTFOCUS;
if (drawDrophilited) iStateId = OS.LISS_SELECTED;
@@ -3731,7 +3731,7 @@ Event sendEraseItemEvent (TableItem item, NMTTCUSTOMDRAW nmcd, int column, RECT
return event;
}
-Event sendMeasureItemEvent (TableItem item, int row, int column, int /*long*/ hDC) {
+Event sendMeasureItemEvent (TableItem item, int row, int column, long /*int*/ hDC) {
GCData data = new GCData ();
data.device = display;
data.font = item.getFont (column);
@@ -3752,7 +3752,7 @@ Event sendMeasureItemEvent (TableItem item, int row, int column, int /*long*/ hD
lvItem.mask = OS.LVIF_STATE;
lvItem.stateMask = OS.LVIS_SELECTED;
lvItem.iItem = (int)/*64*/row;
- int /*long*/ result = OS.SendMessage (handle, OS.LVM_GETITEM, 0, lvItem);
+ long /*int*/ result = OS.SendMessage (handle, OS.LVM_GETITEM, 0, lvItem);
boolean selected = (result != 0 && (lvItem.state & OS.LVIS_SELECTED) != 0);
if (selected && (column == 0 || (style & SWT.FULL_SELECTION) != 0)) {
if (OS.GetFocus () == handle || display.getHighContrast ()) {
@@ -3772,15 +3772,15 @@ Event sendMeasureItemEvent (TableItem item, int row, int column, int /*long*/ hD
int width = (int)/*64*/OS.SendMessage (handle, OS.LVM_GETCOLUMNWIDTH, 0, 0);
if (event.x + event.width > width) setScrollWidth (event.x + event.width);
}
- int /*long*/ empty = OS.SendMessage (handle, OS.LVM_APPROXIMATEVIEWRECT, 0, 0);
- int /*long*/ oneItem = OS.SendMessage (handle, OS.LVM_APPROXIMATEVIEWRECT, 1, 0);
+ long /*int*/ empty = OS.SendMessage (handle, OS.LVM_APPROXIMATEVIEWRECT, 0, 0);
+ long /*int*/ oneItem = OS.SendMessage (handle, OS.LVM_APPROXIMATEVIEWRECT, 1, 0);
int itemHeight = OS.HIWORD (oneItem) - OS.HIWORD (empty);
if (event.height > itemHeight) setItemHeight (event.height);
}
return event;
}
-LRESULT sendMouseDownEvent (int type, int button, int msg, int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT sendMouseDownEvent (int type, int button, int msg, long /*int*/ wParam, long /*int*/ lParam) {
Display display = this.display;
display.captureChanged = false;
if (!sendMouseEvent (type, button, handle, msg, wParam, lParam)) {
@@ -3820,7 +3820,7 @@ LRESULT sendMouseDownEvent (int type, int button, int msg, int /*long*/ wParam,
RECT rect = new RECT ();
rect.left = OS.LVIR_ICON;
ignoreCustomDraw = true;
- int /*long*/ code = OS.SendMessage (handle, OS.LVM_GETITEMRECT, 0, rect);
+ long /*int*/ code = OS.SendMessage (handle, OS.LVM_GETITEMRECT, 0, rect);
ignoreCustomDraw = false;
if (code != 0) {
pinfo.x = rect.left;
@@ -3931,7 +3931,7 @@ LRESULT sendMouseDownEvent (int type, int button, int msg, int /*long*/ wParam,
dragStarted = false;
display.dragCancelled = false;
if (!dragDetect) display.runDragDrop = false;
- int /*long*/ code = callWindowProc (handle, msg, wParam, lParam, forceSelect);
+ long /*int*/ code = callWindowProc (handle, msg, wParam, lParam, forceSelect);
if (!dragDetect) display.runDragDrop = true;
if (fullRowSelect) {
fullRowSelect = false;
@@ -3957,7 +3957,7 @@ LRESULT sendMouseDownEvent (int type, int button, int msg, int /*long*/ wParam,
}
void sendPaintItemEvent (TableItem item, NMLVCUSTOMDRAW nmcd) {
- int /*long*/ hDC = nmcd.hdc;
+ long /*int*/ hDC = nmcd.hdc;
GCData data = new GCData ();
data.device = display;
data.font = item.getFont (nmcd.iSubItem);
@@ -3970,7 +3970,7 @@ void sendPaintItemEvent (TableItem item, NMLVCUSTOMDRAW nmcd) {
lvItem.mask = OS.LVIF_STATE;
lvItem.stateMask = OS.LVIS_SELECTED;
lvItem.iItem = (int)/*64*/nmcd.dwItemSpec;
- int /*long*/ result = OS.SendMessage (handle, OS.LVM_GETITEM, 0, lvItem);
+ long /*int*/ result = OS.SendMessage (handle, OS.LVM_GETITEM, 0, lvItem);
boolean selected = result != 0 && (lvItem.state & OS.LVIS_SELECTED) != 0;
boolean drawSelected = false, drawBackground = false, drawHot = false;
if (nmcd.iSubItem == 0 || (style & SWT.FULL_SELECTION) != 0) {
@@ -4086,7 +4086,7 @@ Event sendPaintItemEvent (TableItem item, NMTTCUSTOMDRAW nmcd, int column, RECT
return event;
}
-void setBackgroundImage (int /*long*/ hBitmap) {
+void setBackgroundImage (long /*int*/ hBitmap) {
super.setBackgroundImage (hBitmap);
if (hBitmap != 0) {
setBackgroundTransparent (true);
@@ -4249,7 +4249,7 @@ void setBounds (int x, int y, int width, int height, int flags, boolean defer) {
public void setColumnOrder (int [] order) {
checkWidget ();
if (order == null) error (SWT.ERROR_NULL_ARGUMENT);
- int /*long*/ hwndHeader = OS.SendMessage (handle, OS.LVM_GETHEADER, 0, 0);
+ long /*int*/ hwndHeader = OS.SendMessage (handle, OS.LVM_GETHEADER, 0, 0);
if (columnCount == 0) {
if (order.length != 0) error (SWT.ERROR_INVALID_ARGUMENT);
return;
@@ -4327,7 +4327,7 @@ void setDeferResize (boolean defer) {
OS.SendMessage (handle, OS.LVM_SETBKCOLOR, 0, OS.CLR_NONE);
OS.DefWindowProc (handle, OS.WM_SETREDRAW, 1, 0);
if (OS.IsWinCE) {
- int /*long*/ hwndHeader = OS.SendMessage (handle, OS.LVM_GETHEADER, 0, 0);
+ long /*int*/ hwndHeader = OS.SendMessage (handle, OS.LVM_GETHEADER, 0, 0);
if (hwndHeader != 0) OS.InvalidateRect (hwndHeader, null, true);
OS.InvalidateRect (handle, null, true);
} else {
@@ -4357,7 +4357,7 @@ void setCheckboxImageList (int width, int height, boolean fixScroll) {
if (OS.IsWinCE) {
flags |= OS.ILC_COLOR;
} else {
- int /*long*/ hDC = OS.GetDC (handle);
+ long /*int*/ hDC = OS.GetDC (handle);
int bits = OS.GetDeviceCaps (hDC, OS.BITSPIXEL);
int planes = OS.GetDeviceCaps (hDC, OS.PLANES);
OS.ReleaseDC (handle, hDC);
@@ -4373,11 +4373,11 @@ void setCheckboxImageList (int width, int height, boolean fixScroll) {
}
if ((style & SWT.RIGHT_TO_LEFT) != 0) flags |= OS.ILC_MIRROR;
if (OS.COMCTL32_MAJOR < 6 || !OS.IsAppThemed ()) flags |= OS.ILC_MASK;
- int /*long*/ hStateList = OS.ImageList_Create (width, height, flags, count, count);
- int /*long*/ hDC = OS.GetDC (handle);
- int /*long*/ memDC = OS.CreateCompatibleDC (hDC);
- int /*long*/ hBitmap = OS.CreateCompatibleBitmap (hDC, width * count, height);
- int /*long*/ hOldBitmap = OS.SelectObject (memDC, hBitmap);
+ long /*int*/ hStateList = OS.ImageList_Create (width, height, flags, count, count);
+ long /*int*/ hDC = OS.GetDC (handle);
+ long /*int*/ memDC = OS.CreateCompatibleDC (hDC);
+ long /*int*/ hBitmap = OS.CreateCompatibleBitmap (hDC, width * count, height);
+ long /*int*/ hOldBitmap = OS.SelectObject (memDC, hBitmap);
RECT rect = new RECT ();
OS.SetRect (rect, 0, 0, width * count, height);
int clrBackground;
@@ -4391,10 +4391,10 @@ void setCheckboxImageList (int width, int height, boolean fixScroll) {
clrBackground = 0x0200FF00;
}
}
- int /*long*/ hBrush = OS.CreateSolidBrush (clrBackground);
+ long /*int*/ hBrush = OS.CreateSolidBrush (clrBackground);
OS.FillRect (memDC, rect, hBrush);
OS.DeleteObject (hBrush);
- int /*long*/ oldFont = OS.SelectObject (hDC, defaultFont ());
+ long /*int*/ oldFont = OS.SelectObject (hDC, defaultFont ());
TEXTMETRIC tm = OS.IsUnicode ? (TEXTMETRIC) new TEXTMETRICW () : new TEXTMETRICA ();
OS.GetTextMetrics (hDC, tm);
OS.SelectObject (hDC, oldFont);
@@ -4403,7 +4403,7 @@ void setCheckboxImageList (int width, int height, boolean fixScroll) {
int left = (width - itemWidth) / 2, top = (height - itemHeight) / 2 + 1;
OS.SetRect (rect, left, top, left + itemWidth, top + itemHeight);
if (OS.COMCTL32_MAJOR >= 6 && OS.IsAppThemed ()) {
- int /*long*/ hTheme = display.hButtonTheme ();
+ long /*int*/ hTheme = display.hButtonTheme ();
OS.DrawThemeBackground (hTheme, memDC, OS.BP_CHECKBOX, OS.CBS_UNCHECKEDNORMAL, rect, null);
rect.left += width; rect.right += width;
OS.DrawThemeBackground (hTheme, memDC, OS.BP_CHECKBOX, OS.CBS_CHECKEDNORMAL, rect, null);
@@ -4459,7 +4459,7 @@ void setCheckboxImageList (int width, int height, boolean fixScroll) {
setRedraw (false);
setTopIndex (0);
}
- int /*long*/ hOldStateList = OS.SendMessage (handle, OS.LVM_GETIMAGELIST, OS.LVSIL_STATE, 0);
+ long /*int*/ hOldStateList = OS.SendMessage (handle, OS.LVM_GETIMAGELIST, OS.LVSIL_STATE, 0);
OS.SendMessage (handle, OS.LVM_SETIMAGELIST, OS.LVSIL_STATE, hStateList);
if (hOldStateList != 0) OS.ImageList_Destroy (hOldStateList);
/*
@@ -4469,7 +4469,7 @@ void setCheckboxImageList (int width, int height, boolean fixScroll) {
* LVSIL_SMALL image list.
*/
if (!OS.IsWinCE && OS.WIN32_VERSION >= OS.VERSION (6, 0)) {
- int /*long*/ hImageList = OS.SendMessage (handle, OS.LVM_GETIMAGELIST, OS.LVSIL_SMALL, 0);
+ long /*int*/ hImageList = OS.SendMessage (handle, OS.LVM_GETIMAGELIST, OS.LVSIL_SMALL, 0);
OS.SendMessage (handle, OS.LVM_SETIMAGELIST, OS.LVSIL_SMALL, hImageList);
}
if (fixScroll && topIndex != 0) {
@@ -4530,7 +4530,7 @@ public void setFont (Font font) {
* to be redrawn but not the column headers. The fix is
* to force a redraw of the column headers.
*/
- int /*long*/ hwndHeader = OS.SendMessage (handle, OS.LVM_GETHEADER, 0, 0);
+ long /*int*/ hwndHeader = OS.SendMessage (handle, OS.LVM_GETHEADER, 0, 0);
OS.InvalidateRect (hwndHeader, null, true);
}
@@ -4632,7 +4632,7 @@ public void setItemCount (int count) {
if (item != null && !item.isDisposed ()) item.release (false);
if (!isVirtual) {
ignoreSelect = ignoreShrink = true;
- int /*long*/ code = OS.SendMessage (handle, OS.LVM_DELETEITEM, count, 0);
+ long /*int*/ code = OS.SendMessage (handle, OS.LVM_DELETEITEM, count, 0);
ignoreSelect = ignoreShrink = false;
if (code == 0) break;
}
@@ -4685,7 +4685,7 @@ void setItemHeight (boolean fixScroll) {
* WM_SETFONT which recomputes and assigns the default item
* height.
*/
- int /*long*/ hFont = OS.SendMessage (handle, OS.WM_GETFONT, 0, 0);
+ long /*int*/ hFont = OS.SendMessage (handle, OS.WM_GETFONT, 0, 0);
OS.SendMessage (handle, OS.WM_SETFONT, hFont, 0);
} else {
/*
@@ -4806,7 +4806,7 @@ public void setRedraw (boolean redraw) {
*/
setDeferResize (true);
OS.SendMessage (handle, OS.WM_SETREDRAW, 1, 0);
- int /*long*/ hwndHeader = OS.SendMessage (handle, OS.LVM_GETHEADER, 0, 0);
+ long /*int*/ hwndHeader = OS.SendMessage (handle, OS.LVM_GETHEADER, 0, 0);
if (hwndHeader != 0) OS.SendMessage (hwndHeader, OS.WM_SETREDRAW, 1, 0);
if ((state & HIDDEN) != 0) {
state &= ~HIDDEN;
@@ -4827,7 +4827,7 @@ public void setRedraw (boolean redraw) {
} else {
if (drawCount++ == 0) {
OS.SendMessage (handle, OS.WM_SETREDRAW, 0, 0);
- int /*long*/ hwndHeader = OS.SendMessage (handle, OS.LVM_GETHEADER, 0, 0);
+ long /*int*/ hwndHeader = OS.SendMessage (handle, OS.LVM_GETHEADER, 0, 0);
if (hwndHeader != 0) OS.SendMessage (hwndHeader, OS.WM_SETREDRAW, 0, 0);
/*
@@ -4867,7 +4867,7 @@ void setScrollWidth (int width) {
if (redraw) {
OS.DefWindowProc (handle, OS.WM_SETREDRAW, 1, 0);
if (OS.IsWinCE) {
- int /*long*/ hwndHeader = OS.SendMessage (handle, OS.LVM_GETHEADER, 0, 0);
+ long /*int*/ hwndHeader = OS.SendMessage (handle, OS.LVM_GETHEADER, 0, 0);
if (hwndHeader != 0) OS.InvalidateRect (hwndHeader, null, true);
OS.InvalidateRect (handle, null, true);
} else {
@@ -4898,7 +4898,7 @@ boolean setScrollWidth (TableItem item, boolean force) {
int itemCount = (int)/*64*/OS.SendMessage (handle, OS.LVM_GETITEMCOUNT, 0, 0);
while (index < itemCount) {
String string = null;
- int /*long*/ hFont = -1;
+ long /*int*/ hFont = -1;
if (item != null) {
string = item.text;
imageIndent = Math.max (imageIndent, item.imageIndent);
@@ -4913,8 +4913,8 @@ boolean setScrollWidth (TableItem item, boolean force) {
}
if (string != null && string.length () != 0) {
if (hFont != -1) {
- int /*long*/ hDC = OS.GetDC (handle);
- int /*long*/ oldFont = OS.SelectObject (hDC, hFont);
+ long /*int*/ hDC = OS.GetDC (handle);
+ long /*int*/ oldFont = OS.SelectObject (hDC, hFont);
int flags = OS.DT_CALCRECT | OS.DT_SINGLELINE | OS.DT_NOPREFIX;
TCHAR buffer = new TCHAR (getCodePage (), string, false);
RECT rect = new RECT ();
@@ -4944,13 +4944,13 @@ boolean setScrollWidth (TableItem item, boolean force) {
TCHAR buffer = new TCHAR (getCodePage (), " ", true);
newWidth = Math.max (newWidth, (int)/*64*/OS.SendMessage (handle, OS.LVM_GETSTRINGWIDTH, 0, buffer));
}
- int /*long*/ hStateList = OS.SendMessage (handle, OS.LVM_GETIMAGELIST, OS.LVSIL_STATE, 0);
+ long /*int*/ hStateList = OS.SendMessage (handle, OS.LVM_GETIMAGELIST, OS.LVSIL_STATE, 0);
if (hStateList != 0) {
int [] cx = new int [1], cy = new int [1];
OS.ImageList_GetIconSize (hStateList, cx, cy);
newWidth += cx [0] + INSET;
}
- int /*long*/ hImageList = OS.SendMessage (handle, OS.LVM_GETIMAGELIST, OS.LVSIL_SMALL, 0);
+ long /*int*/ hImageList = OS.SendMessage (handle, OS.LVM_GETIMAGELIST, OS.LVSIL_SMALL, 0);
if (hImageList != 0) {
int [] cx = new int [1], cy = new int [1];
OS.ImageList_GetIconSize (hImageList, cx, cy);
@@ -5213,12 +5213,12 @@ void setTableEmpty () {
* Windows to reserve the smallest possible space when an image
* list is removed.
*/
- int /*long*/ hImageList = OS.ImageList_Create (1, 1, 0, 0, 0);
+ long /*int*/ hImageList = OS.ImageList_Create (1, 1, 0, 0, 0);
OS.SendMessage (handle, OS.LVM_SETIMAGELIST, OS.LVSIL_SMALL, hImageList);
OS.SendMessage (handle, OS.LVM_SETIMAGELIST, OS.LVSIL_SMALL, 0);
if (headerImageList != null) {
- int /*long*/ hHeaderImageList = headerImageList.getHandle ();
- int /*long*/ hwndHeader = OS.SendMessage (handle, OS.LVM_GETHEADER, 0, 0);
+ long /*int*/ hHeaderImageList = headerImageList.getHandle ();
+ long /*int*/ hwndHeader = OS.SendMessage (handle, OS.LVM_GETHEADER, 0, 0);
OS.SendMessage (hwndHeader, OS.HDM_SETIMAGELIST, 0, hHeaderImageList);
}
OS.ImageList_Destroy (hImageList);
@@ -5504,7 +5504,7 @@ public void showSelection () {
void subclass () {
super.subclass ();
if (HeaderProc != 0) {
- int /*long*/ hwndHeader = OS.SendMessage (handle, OS.LVM_GETHEADER, 0, 0);
+ long /*int*/ hwndHeader = OS.SendMessage (handle, OS.LVM_GETHEADER, 0, 0);
OS.SetWindowLongPtr (hwndHeader, OS.GWLP_WNDPROC, display.windowProc);
}
}
@@ -5523,7 +5523,7 @@ RECT toolTipRect (RECT rect) {
if (!OS.IsWinCE && OS.WIN32_VERSION >= OS.VERSION (6, 0)) {
OS.SetRect (toolRect, rect.left - 1, rect.top - 1, rect.right + 1, rect.bottom + 1);
} else {
- int /*long*/ hwndToolTip = OS.SendMessage (handle, OS.LVM_GETTOOLTIPS, 0, 0);
+ long /*int*/ hwndToolTip = OS.SendMessage (handle, OS.LVM_GETTOOLTIPS, 0, 0);
OS.SetRect (toolRect, rect.left, rect.top, rect.right, rect.bottom);
int dwStyle = OS.GetWindowLong (hwndToolTip, OS.GWL_STYLE);
int dwExStyle = OS.GetWindowLong (hwndToolTip, OS.GWL_EXSTYLE);
@@ -5533,7 +5533,7 @@ RECT toolTipRect (RECT rect) {
}
String toolTipText (NMTTDISPINFO hdr) {
- int /*long*/ hwndToolTip = OS.SendMessage (handle, OS.LVM_GETTOOLTIPS, 0, 0);
+ long /*int*/ hwndToolTip = OS.SendMessage (handle, OS.LVM_GETTOOLTIPS, 0, 0);
if (hwndToolTip == hdr.hwndFrom && toolTipText != null) return ""; //$NON-NLS-1$
if (headerToolTipHandle == hdr.hwndFrom) {
for (int i=0; i<columnCount; i++) {
@@ -5547,7 +5547,7 @@ String toolTipText (NMTTDISPINFO hdr) {
void unsubclass () {
super.unsubclass ();
if (HeaderProc != 0) {
- int /*long*/ hwndHeader = OS.SendMessage (handle, OS.LVM_GETHEADER, 0, 0);
+ long /*int*/ hwndHeader = OS.SendMessage (handle, OS.LVM_GETHEADER, 0, 0);
OS.SetWindowLongPtr (hwndHeader, OS.GWLP_WNDPROC, HeaderProc);
}
}
@@ -5565,8 +5565,8 @@ void update (boolean all) {
* NOTE: The header tooltip can subclass the header proc so the
* current proc must be restored or header tooltips stop working.
*/
- int /*long*/ oldHeaderProc = 0, oldTableProc = 0;
- int /*long*/ hwndHeader = OS.SendMessage (handle, OS.LVM_GETHEADER, 0, 0);
+ long /*int*/ oldHeaderProc = 0, oldTableProc = 0;
+ long /*int*/ hwndHeader = OS.SendMessage (handle, OS.LVM_GETHEADER, 0, 0);
boolean fixSubclass = isOptimizedRedraw ();
if (fixSubclass) {
oldTableProc = OS.SetWindowLongPtr (handle, OS.GWLP_WNDPROC, TableProc);
@@ -5581,7 +5581,7 @@ void update (boolean all) {
void updateHeaderToolTips () {
if (headerToolTipHandle == 0) return;
- int /*long*/ hwndHeader = OS.SendMessage (handle, OS.LVM_GETHEADER, 0, 0);
+ long /*int*/ hwndHeader = OS.SendMessage (handle, OS.LVM_GETHEADER, 0, 0);
RECT rect = new RECT ();
TOOLINFO lpti = new TOOLINFO ();
lpti.cbSize = TOOLINFO.sizeof;
@@ -5646,7 +5646,7 @@ void updateMoveable () {
void updateOrientation () {
super.updateOrientation ();
- int /*long*/ hwndHeader = OS.SendMessage (handle, OS.LVM_GETHEADER, 0, 0);
+ long /*int*/ hwndHeader = OS.SendMessage (handle, OS.LVM_GETHEADER, 0, 0);
if (hwndHeader != 0) {
int bits = OS.GetWindowLong (hwndHeader, OS.GWL_EXSTYLE);
if ((style & SWT.RIGHT_TO_LEFT) != 0) {
@@ -5678,7 +5678,7 @@ void updateOrientation () {
}
}
}
- int /*long*/ hImageList = imageList.getHandle ();
+ long /*int*/ hImageList = imageList.getHandle ();
OS.SendMessage (handle, OS.LVM_SETIMAGELIST, OS.LVSIL_SMALL, hImageList);
}
if (hwndHeader != 0) {
@@ -5719,7 +5719,7 @@ void updateOrientation () {
}
}
}
- int /*long*/ hHeaderImageList = headerImageList.getHandle ();
+ long /*int*/ hHeaderImageList = headerImageList.getHandle ();
OS.SendMessage (hwndHeader, OS.HDM_SETIMAGELIST, 0, hHeaderImageList);
}
}
@@ -5744,11 +5744,11 @@ TCHAR windowClass () {
return TableClass;
}
-int /*long*/ windowProc () {
+long /*int*/ windowProc () {
return TableProc;
}
-int /*long*/ windowProc (int /*long*/ hwnd, int msg, int /*long*/ wParam, int /*long*/ lParam) {
+long /*int*/ windowProc (long /*int*/ hwnd, int msg, long /*int*/ wParam, long /*int*/ lParam) {
if (handle == 0) return 0;
if (hwnd != handle) {
switch (msg) {
@@ -5773,7 +5773,7 @@ int /*long*/ windowProc (int /*long*/ hwnd, int msg, int /*long*/ wParam, int /*
*/
if (OS.COMCTL32_MAJOR < 6) {
if (lParam != 0) {
- int /*long*/ hwndHeader = OS.SendMessage (handle, OS.LVM_GETHEADER, 0, 0);
+ long /*int*/ hwndHeader = OS.SendMessage (handle, OS.LVM_GETHEADER, 0, 0);
if (lParam != hwndHeader) OS.InvalidateRect (hwndHeader, null, true);
}
}
@@ -5814,7 +5814,7 @@ int /*long*/ windowProc (int /*long*/ hwnd, int msg, int /*long*/ wParam, int /*
OS.ScreenToClient (hwnd, pt);
pinfo.x = pt.x;
pinfo.y = pt.y;
- int /*long*/ hwndHeader = OS.SendMessage (handle, OS.LVM_GETHEADER, 0, 0);
+ long /*int*/ hwndHeader = OS.SendMessage (handle, OS.LVM_GETHEADER, 0, 0);
int index = (int)/*64*/OS.SendMessage (hwndHeader, OS.HDM_HITTEST, 0, pinfo);
if (0 <= index && index < columnCount && !columns [index].resizable) {
if ((pinfo.flags & (OS.HHT_ONDIVIDER | OS.HHT_ONDIVOPEN)) != 0) {
@@ -5860,12 +5860,12 @@ int /*long*/ windowProc (int /*long*/ hwnd, int msg, int /*long*/ wParam, int /*
rect.left = Math.max (clientRect.left, rect.right - width);
}
}
- int /*long*/ hRgn = OS.CreateRectRgn (rect.left, rect.top, rect.right, rect.bottom);
+ long /*int*/ hRgn = OS.CreateRectRgn (rect.left, rect.top, rect.right, rect.bottom);
while ((selection = (int)/*64*/OS.SendMessage (handle, OS.LVM_GETNEXTITEM, selection, OS.LVNI_SELECTED)) != -1) {
if (rect.bottom - rect.top > DRAG_IMAGE_SIZE) break;
if (rect.bottom > clientRect.bottom) break;
RECT itemRect = item.getBounds (selection, 0, true, true, true);
- int /*long*/ rectRgn = OS.CreateRectRgn (rect.left, itemRect.top, rect.right, itemRect.bottom);
+ long /*int*/ rectRgn = OS.CreateRectRgn (rect.left, itemRect.top, rect.right, itemRect.bottom);
OS.CombineRgn (hRgn, hRgn, rectRgn, OS.RGN_OR);
OS.DeleteObject (rectRgn);
rect.bottom = itemRect.bottom;
@@ -5873,8 +5873,8 @@ int /*long*/ windowProc (int /*long*/ hwnd, int msg, int /*long*/ wParam, int /*
OS.GetRgnBox (hRgn, rect);
/* Create resources */
- int /*long*/ hdc = OS.GetDC (handle);
- int /*long*/ memHdc = OS.CreateCompatibleDC (hdc);
+ long /*int*/ hdc = OS.GetDC (handle);
+ long /*int*/ memHdc = OS.CreateCompatibleDC (hdc);
BITMAPINFOHEADER bmiHeader = new BITMAPINFOHEADER ();
bmiHeader.biSize = BITMAPINFOHEADER.sizeof;
bmiHeader.biWidth = rect.right - rect.left;
@@ -5884,10 +5884,10 @@ int /*long*/ windowProc (int /*long*/ hwnd, int msg, int /*long*/ wParam, int /*
bmiHeader.biCompression = OS.BI_RGB;
byte [] bmi = new byte [BITMAPINFOHEADER.sizeof];
OS.MoveMemory (bmi, bmiHeader, BITMAPINFOHEADER.sizeof);
- int /*long*/ [] pBits = new int /*long*/ [1];
- int /*long*/ memDib = OS.CreateDIBSection (0, bmi, OS.DIB_RGB_COLORS, pBits, 0, 0);
+ long /*int*/ [] pBits = new long /*int*/ [1];
+ long /*int*/ memDib = OS.CreateDIBSection (0, bmi, OS.DIB_RGB_COLORS, pBits, 0, 0);
if (memDib == 0) error (SWT.ERROR_NO_HANDLES);
- int /*long*/ oldMemBitmap = OS.SelectObject (memHdc, memDib);
+ long /*int*/ oldMemBitmap = OS.SelectObject (memHdc, memDib);
int colorKey = 0x0000FD;
POINT pt = new POINT();
OS.SetWindowOrgEx (memHdc, rect.left, rect.top, pt);
@@ -5918,7 +5918,7 @@ int /*long*/ windowProc (int /*long*/ hwnd, int msg, int /*long*/ wParam, int /*
return super.windowProc (hwnd, msg, wParam, lParam);
}
-LRESULT WM_CHAR (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT WM_CHAR (long /*int*/ wParam, long /*int*/ lParam) {
LRESULT result = super.WM_CHAR (wParam, lParam);
if (result != null) return result;
switch ((int)/*64*/wParam) {
@@ -5939,7 +5939,7 @@ LRESULT WM_CHAR (int /*long*/ wParam, int /*long*/ lParam) {
* This allows the application to cancel an operation that is normally
* performed in WM_KEYDOWN from WM_CHAR.
*/
- int /*long*/ code = callWindowProc (handle, OS.WM_KEYDOWN, wParam, lParam);
+ long /*int*/ code = callWindowProc (handle, OS.WM_KEYDOWN, wParam, lParam);
return new LRESULT (code);
case SWT.CR:
/*
@@ -5960,7 +5960,7 @@ LRESULT WM_CHAR (int /*long*/ wParam, int /*long*/ lParam) {
return result;
}
-LRESULT WM_CONTEXTMENU (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT WM_CONTEXTMENU (long /*int*/ wParam, long /*int*/ lParam) {
/*
* Feature in Windows. For some reason, when the right
* mouse button is pressed over an item, Windows sends
@@ -5977,7 +5977,7 @@ LRESULT WM_CONTEXTMENU (int /*long*/ wParam, int /*long*/ lParam) {
return super.WM_CONTEXTMENU (wParam, lParam);
}
-LRESULT WM_ERASEBKGND (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT WM_ERASEBKGND (long /*int*/ wParam, long /*int*/ lParam) {
LRESULT result = super.WM_ERASEBKGND (wParam, lParam);
if (findImageControl () != null) return LRESULT.ONE;
if (!OS.IsWinCE && OS.COMCTL32_MAJOR < 6) {
@@ -5989,7 +5989,7 @@ LRESULT WM_ERASEBKGND (int /*long*/ wParam, int /*long*/ lParam) {
return result;
}
-LRESULT WM_GETOBJECT (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT WM_GETOBJECT (long /*int*/ wParam, long /*int*/ lParam) {
/*
* Ensure that there is an accessible object created for this
* control because support for checked item accessibility is
@@ -6001,7 +6001,7 @@ LRESULT WM_GETOBJECT (int /*long*/ wParam, int /*long*/ lParam) {
return super.WM_GETOBJECT (wParam, lParam);
}
-LRESULT WM_KEYDOWN (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT WM_KEYDOWN (long /*int*/ wParam, long /*int*/ lParam) {
LRESULT result = super.WM_KEYDOWN (wParam, lParam);
if (result != null) return result;
switch ((int)/*64*/wParam) {
@@ -6047,14 +6047,14 @@ LRESULT WM_KEYDOWN (int /*long*/ wParam, int /*long*/ lParam) {
* NOTE: The header tooltip can subclass the header proc so the
* current proc must be restored or header tooltips stop working.
*/
- int /*long*/ oldHeaderProc = 0, oldTableProc = 0;
- int /*long*/ hwndHeader = OS.SendMessage (handle, OS.LVM_GETHEADER, 0, 0);
+ long /*int*/ oldHeaderProc = 0, oldTableProc = 0;
+ long /*int*/ hwndHeader = OS.SendMessage (handle, OS.LVM_GETHEADER, 0, 0);
boolean fixSubclass = isOptimizedRedraw ();
if (fixSubclass) {
oldTableProc = OS.SetWindowLongPtr (handle, OS.GWLP_WNDPROC, TableProc);
oldHeaderProc = OS.SetWindowLongPtr (hwndHeader, OS.GWLP_WNDPROC, HeaderProc);
}
- int /*long*/ code = callWindowProc (handle, OS.WM_KEYDOWN, wParam, lParam);
+ long /*int*/ code = callWindowProc (handle, OS.WM_KEYDOWN, wParam, lParam);
result = code == 0 ? LRESULT.ZERO : new LRESULT (code);
if (fixSubclass) {
OS.SetWindowLongPtr (handle, OS.GWLP_WNDPROC, oldTableProc);
@@ -6069,7 +6069,7 @@ LRESULT WM_KEYDOWN (int /*long*/ wParam, int /*long*/ lParam) {
return result;
}
-LRESULT WM_KILLFOCUS (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT WM_KILLFOCUS (long /*int*/ wParam, long /*int*/ lParam) {
LRESULT result = super.WM_KILLFOCUS (wParam, lParam);
/*
* Bug in Windows. When focus is lost, Windows does not
@@ -6083,7 +6083,7 @@ LRESULT WM_KILLFOCUS (int /*long*/ wParam, int /*long*/ lParam) {
return result;
}
-LRESULT WM_LBUTTONDBLCLK (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT WM_LBUTTONDBLCLK (long /*int*/ wParam, long /*int*/ lParam) {
/*
* Feature in Windows. When the user selects outside of
@@ -6131,7 +6131,7 @@ LRESULT WM_LBUTTONDBLCLK (int /*long*/ wParam, int /*long*/ lParam) {
return LRESULT.ZERO;
}
-LRESULT WM_LBUTTONDOWN (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT WM_LBUTTONDOWN (long /*int*/ wParam, long /*int*/ lParam) {
/*
* Feature in Windows. For some reason, capturing
* the mouse after processing the mouse event for the
@@ -6167,7 +6167,7 @@ LRESULT WM_LBUTTONDOWN (int /*long*/ wParam, int /*long*/ lParam) {
return result;
}
-LRESULT WM_MOUSEHOVER (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT WM_MOUSEHOVER (long /*int*/ wParam, long /*int*/ lParam) {
/*
* Feature in Windows. Despite the fact that hot
* tracking is not enabled, the hot tracking code
@@ -6182,7 +6182,7 @@ LRESULT WM_MOUSEHOVER (int /*long*/ wParam, int /*long*/ lParam) {
return LRESULT.ZERO;
}
-LRESULT WM_PAINT (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT WM_PAINT (long /*int*/ wParam, long /*int*/ lParam) {
_checkShrink();
if (fixScrollWidth) setScrollWidth (null, true);
if (!OS.IsWinCE && OS.COMCTL32_MAJOR < 6) {
@@ -6190,7 +6190,7 @@ LRESULT WM_PAINT (int /*long*/ wParam, int /*long*/ lParam) {
int bits = (int)/*64*/OS.SendMessage (handle, OS.LVM_GETEXTENDEDLISTVIEWSTYLE, 0, 0);
if ((bits & OS.LVS_EX_DOUBLEBUFFER) == 0) {
GC gc = null;
- int /*long*/ paintDC = 0;
+ long /*int*/ paintDC = 0;
PAINTSTRUCT ps = new PAINTSTRUCT ();
boolean hooksPaint = hooks (SWT.Paint) || filters (SWT.Paint);
if (hooksPaint) {
@@ -6205,12 +6205,12 @@ LRESULT WM_PAINT (int /*long*/ wParam, int /*long*/ lParam) {
int width = ps.right - ps.left;
int height = ps.bottom - ps.top;
if (width != 0 && height != 0) {
- int /*long*/ hDC = OS.CreateCompatibleDC (paintDC);
+ long /*int*/ hDC = OS.CreateCompatibleDC (paintDC);
POINT lpPoint1 = new POINT (), lpPoint2 = new POINT ();
OS.SetWindowOrgEx (hDC, ps.left, ps.top, lpPoint1);
OS.SetBrushOrgEx (hDC, ps.left, ps.top, lpPoint2);
- int /*long*/ hBitmap = OS.CreateCompatibleBitmap (paintDC, width, height);
- int /*long*/ hOldBitmap = OS.SelectObject (hDC, hBitmap);
+ long /*int*/ hBitmap = OS.CreateCompatibleBitmap (paintDC, width, height);
+ long /*int*/ hOldBitmap = OS.SelectObject (hDC, hBitmap);
if ((int)/*64*/OS.SendMessage (handle, OS.LVM_GETBKCOLOR, 0, 0) != OS.CLR_NONE) {
RECT rect = new RECT ();
OS.SetRect (rect, ps.left, ps.top, ps.right, ps.bottom);
@@ -6247,7 +6247,7 @@ LRESULT WM_PAINT (int /*long*/ wParam, int /*long*/ lParam) {
return super.WM_PAINT (wParam, lParam);
}
-LRESULT WM_RBUTTONDBLCLK (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT WM_RBUTTONDBLCLK (long /*int*/ wParam, long /*int*/ lParam) {
/*
* Feature in Windows. When the user selects outside of
* a table item, Windows deselects all the items, even
@@ -6271,7 +6271,7 @@ LRESULT WM_RBUTTONDBLCLK (int /*long*/ wParam, int /*long*/ lParam) {
return LRESULT.ZERO;
}
-LRESULT WM_RBUTTONDOWN (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT WM_RBUTTONDOWN (long /*int*/ wParam, long /*int*/ lParam) {
/*
* Feature in Windows. For some reason, capturing
* the mouse after processing the mouse event for the
@@ -6282,7 +6282,7 @@ LRESULT WM_RBUTTONDOWN (int /*long*/ wParam, int /*long*/ lParam) {
return sendMouseDownEvent (SWT.MouseDown, 3, OS.WM_RBUTTONDOWN, wParam, lParam);
}
-LRESULT WM_SETFOCUS (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT WM_SETFOCUS (long /*int*/ wParam, long /*int*/ lParam) {
LRESULT result = super.WM_SETFOCUS (wParam, lParam);
/*
* Bug in Windows. When focus is gained after the
@@ -6317,7 +6317,7 @@ LRESULT WM_SETFOCUS (int /*long*/ wParam, int /*long*/ lParam) {
return result;
}
-LRESULT WM_SETFONT (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT WM_SETFONT (long /*int*/ wParam, long /*int*/ lParam) {
LRESULT result = super.WM_SETFONT (wParam, lParam);
if (result != null) return result;
@@ -6332,7 +6332,7 @@ LRESULT WM_SETFONT (int /*long*/ wParam, int /*long*/ lParam) {
* the header so that all that is necessary here is to
* set the default first.
*/
- int /*long*/ hwndHeader = OS.SendMessage (handle, OS.LVM_GETHEADER, 0, 0);
+ long /*int*/ hwndHeader = OS.SendMessage (handle, OS.LVM_GETHEADER, 0, 0);
OS.SendMessage (hwndHeader, OS.WM_SETFONT, 0, lParam);
if (headerToolTipHandle != 0) {
@@ -6341,7 +6341,7 @@ LRESULT WM_SETFONT (int /*long*/ wParam, int /*long*/ lParam) {
return result;
}
-LRESULT WM_SETREDRAW (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT WM_SETREDRAW (long /*int*/ wParam, long /*int*/ lParam) {
LRESULT result = super.WM_SETREDRAW (wParam, lParam);
if (result != null) return result;
/*
@@ -6364,7 +6364,7 @@ LRESULT WM_SETREDRAW (int /*long*/ wParam, int /*long*/ lParam) {
* which stops all graphics output to the control.
*/
OS.DefWindowProc (handle, OS.WM_SETREDRAW, wParam, lParam);
- int /*long*/ code = callWindowProc (handle, OS.WM_SETREDRAW, wParam, lParam);
+ long /*int*/ code = callWindowProc (handle, OS.WM_SETREDRAW, wParam, lParam);
if (wParam == 0) {
if ((int)/*64*/OS.SendMessage (handle, OS.LVM_GETBKCOLOR, 0, 0) == OS.CLR_NONE) {
OS.SendMessage (handle, OS.LVM_SETBKCOLOR, 0, 0xFFFFFF);
@@ -6373,7 +6373,7 @@ LRESULT WM_SETREDRAW (int /*long*/ wParam, int /*long*/ lParam) {
return code == 0 ? LRESULT.ZERO : new LRESULT (code);
}
-LRESULT WM_SIZE (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT WM_SIZE (long /*int*/ wParam, long /*int*/ lParam) {
if (ignoreResize) return null;
if (hooks (SWT.EraseItem) || hooks (SWT.PaintItem)) {
OS.InvalidateRect (handle, null, true);
@@ -6385,7 +6385,7 @@ LRESULT WM_SIZE (int /*long*/ wParam, int /*long*/ lParam) {
return super.WM_SIZE (wParam, lParam);
}
-LRESULT WM_SYSCOLORCHANGE (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT WM_SYSCOLORCHANGE (long /*int*/ wParam, long /*int*/ lParam) {
LRESULT result = super.WM_SYSCOLORCHANGE (wParam, lParam);
if (result != null) return result;
if (findBackgroundControl () == null) {
@@ -6401,7 +6401,7 @@ LRESULT WM_SYSCOLORCHANGE (int /*long*/ wParam, int /*long*/ lParam) {
return result;
}
-LRESULT WM_HSCROLL (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT WM_HSCROLL (long /*int*/ wParam, long /*int*/ lParam) {
/*
* Bug in Windows. When a table that is drawing grid lines
* is slowly scrolled horizontally to the left, the table does
@@ -6430,8 +6430,8 @@ LRESULT WM_HSCROLL (int /*long*/ wParam, int /*long*/ lParam) {
* NOTE: The header tooltip can subclass the header proc so the
* current proc must be restored or header tooltips stop working.
*/
- int /*long*/ oldHeaderProc = 0, oldTableProc = 0;
- int /*long*/ hwndHeader = OS.SendMessage (handle, OS.LVM_GETHEADER, 0, 0);
+ long /*int*/ oldHeaderProc = 0, oldTableProc = 0;
+ long /*int*/ hwndHeader = OS.SendMessage (handle, OS.LVM_GETHEADER, 0, 0);
boolean fixSubclass = isOptimizedRedraw ();
if (fixSubclass) {
oldTableProc = OS.SetWindowLongPtr (handle, OS.GWLP_WNDPROC, TableProc);
@@ -6517,7 +6517,7 @@ LRESULT WM_HSCROLL (int /*long*/ wParam, int /*long*/ lParam) {
return result;
}
-LRESULT WM_VSCROLL (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT WM_VSCROLL (long /*int*/ wParam, long /*int*/ lParam) {
/*
* When there are many columns in a table, scrolling performance
* can be improved by temporarily unsubclassing the window proc
@@ -6529,8 +6529,8 @@ LRESULT WM_VSCROLL (int /*long*/ wParam, int /*long*/ lParam) {
* NOTE: The header tooltip can subclass the header proc so the
* current proc must be restored or header tooltips stop working.
*/
- int /*long*/ oldHeaderProc = 0, oldTableProc = 0;
- int /*long*/ hwndHeader = OS.SendMessage (handle, OS.LVM_GETHEADER, 0, 0);
+ long /*int*/ oldHeaderProc = 0, oldTableProc = 0;
+ long /*int*/ hwndHeader = OS.SendMessage (handle, OS.LVM_GETHEADER, 0, 0);
boolean fixSubclass = isOptimizedRedraw ();
if (fixSubclass) {
oldTableProc = OS.SetWindowLongPtr (handle, OS.GWLP_WNDPROC, TableProc);
@@ -6617,8 +6617,8 @@ LRESULT WM_VSCROLL (int /*long*/ wParam, int /*long*/ lParam) {
RECT clientRect = new RECT ();
OS.GetClientRect (handle, clientRect);
clientRect.top += headerHeight;
- int /*long*/ empty = OS.SendMessage (handle, OS.LVM_APPROXIMATEVIEWRECT, 0, 0);
- int /*long*/ oneItem = OS.SendMessage (handle, OS.LVM_APPROXIMATEVIEWRECT, 1, 0);
+ long /*int*/ empty = OS.SendMessage (handle, OS.LVM_APPROXIMATEVIEWRECT, 0, 0);
+ long /*int*/ oneItem = OS.SendMessage (handle, OS.LVM_APPROXIMATEVIEWRECT, 1, 0);
int itemHeight = OS.HIWORD (oneItem) - OS.HIWORD (empty);
if (code == OS.SB_LINEDOWN) {
clientRect.top = clientRect.bottom - itemHeight - GRID_WIDTH;
@@ -6636,12 +6636,12 @@ LRESULT WM_VSCROLL (int /*long*/ wParam, int /*long*/ lParam) {
return result;
}
-LRESULT wmMeasureChild (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT wmMeasureChild (long /*int*/ wParam, long /*int*/ lParam) {
MEASUREITEMSTRUCT struct = new MEASUREITEMSTRUCT ();
OS.MoveMemory (struct, lParam, MEASUREITEMSTRUCT.sizeof);
if (itemHeight == -1) {
- int /*long*/ empty = OS.SendMessage (handle, OS.LVM_APPROXIMATEVIEWRECT, 0, 0);
- int /*long*/ oneItem = OS.SendMessage (handle, OS.LVM_APPROXIMATEVIEWRECT, 1, 0);
+ long /*int*/ empty = OS.SendMessage (handle, OS.LVM_APPROXIMATEVIEWRECT, 0, 0);
+ long /*int*/ oneItem = OS.SendMessage (handle, OS.LVM_APPROXIMATEVIEWRECT, 1, 0);
struct.itemHeight = OS.HIWORD (oneItem) - OS.HIWORD (empty);
} else {
struct.itemHeight = itemHeight;
@@ -6650,13 +6650,13 @@ LRESULT wmMeasureChild (int /*long*/ wParam, int /*long*/ lParam) {
return null;
}
-LRESULT wmNotify (NMHDR hdr, int /*long*/ wParam, int /*long*/ lParam) {
- int /*long*/ hwndToolTip = OS.SendMessage (handle, OS.LVM_GETTOOLTIPS, 0, 0);
+LRESULT wmNotify (NMHDR hdr, long /*int*/ wParam, long /*int*/ lParam) {
+ long /*int*/ hwndToolTip = OS.SendMessage (handle, OS.LVM_GETTOOLTIPS, 0, 0);
if (hdr.hwndFrom == hwndToolTip) {
LRESULT result = wmNotifyToolTip (hdr, wParam, lParam);
if (result != null) return result;
}
- int /*long*/ hwndHeader = OS.SendMessage (handle, OS.LVM_GETHEADER, 0, 0);
+ long /*int*/ hwndHeader = OS.SendMessage (handle, OS.LVM_GETHEADER, 0, 0);
if (hdr.hwndFrom == hwndHeader) {
LRESULT result = wmNotifyHeader (hdr, wParam, lParam);
if (result != null) return result;
@@ -6664,7 +6664,7 @@ LRESULT wmNotify (NMHDR hdr, int /*long*/ wParam, int /*long*/ lParam) {
return super.wmNotify (hdr, wParam, lParam);
}
-LRESULT wmNotifyChild (NMHDR hdr, int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT wmNotifyChild (NMHDR hdr, long /*int*/ wParam, long /*int*/ lParam) {
switch (hdr.code) {
case OS.LVN_ODFINDITEMA:
case OS.LVN_ODFINDITEMW: {
@@ -6731,7 +6731,7 @@ LRESULT wmNotifyChild (NMHDR hdr, int /*long*/ wParam, int /*long*/ lParam) {
RECT rect = new RECT ();
rect.left = OS.LVIR_BOUNDS;
ignoreCustomDraw = true;
- int /*long*/ code = OS.SendMessage (handle, OS. LVM_GETITEMRECT, plvfi.iItem, rect);
+ long /*int*/ code = OS.SendMessage (handle, OS. LVM_GETITEMRECT, plvfi.iItem, rect);
ignoreCustomDraw = false;
if (code != 0) OS.InvalidateRect (handle, rect, true);
break;
@@ -6838,7 +6838,7 @@ LRESULT wmNotifyChild (NMHDR hdr, int /*long*/ wParam, int /*long*/ lParam) {
break;
}
case OS.NM_CUSTOMDRAW: {
- int /*long*/ hwndHeader = OS.SendMessage (handle, OS.LVM_GETHEADER, 0, 0);
+ long /*int*/ hwndHeader = OS.SendMessage (handle, OS.LVM_GETHEADER, 0, 0);
if (hdr.hwndFrom == hwndHeader) break;
if (!customDraw && findImageControl () == null) {
/*
@@ -6931,7 +6931,7 @@ LRESULT wmNotifyChild (NMHDR hdr, int /*long*/ wParam, int /*long*/ lParam) {
}
}
if (hooks (SWT.EraseItem) || hooks (SWT.PaintItem)) {
- int /*long*/ hwndHeader = OS.SendMessage (handle, OS.LVM_GETHEADER, 0, 0);
+ long /*int*/ hwndHeader = OS.SendMessage (handle, OS.LVM_GETHEADER, 0, 0);
int count = (int)/*64*/OS.SendMessage (hwndHeader, OS.HDM_GETITEMCOUNT, 0, 0);
if (count != 0) {
forceResize ();
@@ -6988,7 +6988,7 @@ LRESULT wmNotifyChild (NMHDR hdr, int /*long*/ wParam, int /*long*/ lParam) {
return super.wmNotifyChild (hdr, wParam, lParam);
}
-LRESULT wmNotifyHeader (NMHDR hdr, int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT wmNotifyHeader (NMHDR hdr, long /*int*/ wParam, long /*int*/ lParam) {
/*
* Feature in Windows. On NT, the automatically created
* header control is created as a UNICODE window, not an
@@ -7169,7 +7169,7 @@ LRESULT wmNotifyHeader (NMHDR hdr, int /*long*/ wParam, int /*long*/ lParam) {
return null;
}
-LRESULT wmNotifyToolTip (NMHDR hdr, int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT wmNotifyToolTip (NMHDR hdr, long /*int*/ wParam, long /*int*/ lParam) {
if (OS.IsWinCE) return null;
switch (hdr.code) {
case OS.NM_CUSTOMDRAW: {
@@ -7187,7 +7187,7 @@ LRESULT wmNotifyToolTip (NMHDR hdr, int /*long*/ wParam, int /*long*/ lParam) {
LRESULT result = super.wmNotify (hdr, wParam, lParam);
if (result != null) return result;
if (hdr.code != OS.TTN_SHOW) tipRequested = true;
- int /*long*/ code = callWindowProc (handle, OS.WM_NOTIFY, wParam, lParam);
+ long /*int*/ code = callWindowProc (handle, OS.WM_NOTIFY, wParam, lParam);
if (hdr.code != OS.TTN_SHOW) tipRequested = false;
if (toolTipText != null) break;
if (isCustomToolTip ()) {
@@ -7206,10 +7206,10 @@ LRESULT wmNotifyToolTip (NMHDR hdr, int /*long*/ wParam, int /*long*/ lParam) {
*/
if (OS.SendMessage (handle, OS.LVM_SUBITEMHITTEST, 0, pinfo) >= 0) {
TableItem item = _getItem (pinfo.iItem);
- int /*long*/ hDC = OS.GetDC (handle);
- int /*long*/ oldFont = 0, newFont = OS.SendMessage (handle, OS.WM_GETFONT, 0, 0);
+ long /*int*/ hDC = OS.GetDC (handle);
+ long /*int*/ oldFont = 0, newFont = OS.SendMessage (handle, OS.WM_GETFONT, 0, 0);
if (newFont != 0) oldFont = OS.SelectObject (hDC, newFont);
- int /*long*/ hFont = item.fontHandle (pinfo.iSubItem);
+ long /*int*/ hFont = item.fontHandle (pinfo.iSubItem);
if (hFont != -1) hFont = OS.SelectObject (hDC, hFont);
Event event = sendMeasureItemEvent (item, pinfo.iItem, pinfo.iSubItem, hDC);
if (!isDisposed () && !item.isDisposed ()) {
@@ -7218,7 +7218,7 @@ LRESULT wmNotifyToolTip (NMHDR hdr, int /*long*/ wParam, int /*long*/ lParam) {
if (hdr.code == OS.TTN_SHOW) {
RECT toolRect = toolTipRect (itemRect);
OS.MapWindowPoints (handle, 0, toolRect, 2);
- int /*long*/ hwndToolTip = OS.SendMessage (handle, OS.LVM_GETTOOLTIPS, 0, 0);
+ long /*int*/ hwndToolTip = OS.SendMessage (handle, OS.LVM_GETTOOLTIPS, 0, 0);
int flags = OS.SWP_NOACTIVATE | OS.SWP_NOZORDER;
int width = toolRect.right - toolRect.left, height = toolRect.bottom - toolRect.top;
SetWindowPos (hwndToolTip, 0, toolRect.left , toolRect.top, width, height, flags);
@@ -7280,7 +7280,7 @@ LRESULT wmNotifyToolTip (NMHDR hdr, int /*long*/ wParam, int /*long*/ lParam) {
return null;
}
-LRESULT wmNotifyToolTip (NMTTCUSTOMDRAW nmcd, int /*long*/ lParam) {
+LRESULT wmNotifyToolTip (NMTTCUSTOMDRAW nmcd, long /*int*/ lParam) {
if (OS.IsWinCE) return null;
switch (nmcd.dwDrawStage) {
case OS.CDDS_PREPAINT: {
@@ -7308,10 +7308,10 @@ LRESULT wmNotifyToolTip (NMTTCUSTOMDRAW nmcd, int /*long*/ lParam) {
*/
if (OS.SendMessage (handle, OS.LVM_SUBITEMHITTEST, 0, pinfo) >= 0) {
TableItem item = _getItem (pinfo.iItem);
- int /*long*/ hDC = OS.GetDC (handle);
- int /*long*/ hFont = item.fontHandle (pinfo.iSubItem);
+ long /*int*/ hDC = OS.GetDC (handle);
+ long /*int*/ hFont = item.fontHandle (pinfo.iSubItem);
if (hFont == -1) hFont = OS.SendMessage (handle, OS.WM_GETFONT, 0, 0);
- int /*long*/ oldFont = OS.SelectObject (hDC, hFont);
+ long /*int*/ oldFont = OS.SelectObject (hDC, hFont);
boolean drawForeground = true;
RECT cellRect = item.getBounds (pinfo.iItem, pinfo.iSubItem, true, true, false, false, hDC);
if (hooks (SWT.EraseItem)) {
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/TableColumn.java b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/TableColumn.java
index f9ce520915..735d2d9aa3 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/TableColumn.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/TableColumn.java
@@ -308,7 +308,7 @@ public int getWidth () {
checkWidget ();
int index = parent.indexOf (this);
if (index == -1) return 0;
- int /*long*/ hwnd = parent.handle;
+ long /*int*/ hwnd = parent.handle;
return (int)/*64*/OS.SendMessage (hwnd, OS.LVM_GETCOLUMNWIDTH, index, 0);
}
@@ -327,7 +327,7 @@ public void pack () {
checkWidget ();
int index = parent.indexOf (this);
if (index == -1) return;
- int /*long*/ hwnd = parent.handle;
+ long /*int*/ hwnd = parent.handle;
int oldWidth = (int)/*64*/OS.SendMessage (hwnd, OS.LVM_GETCOLUMNWIDTH, index, 0);
TCHAR buffer = new TCHAR (parent.getCodePage (), text, true);
int headerWidth = (int)/*64*/OS.SendMessage (hwnd, OS.LVM_GETSTRINGWIDTH, 0, buffer) + Table.HEADER_MARGIN;
@@ -351,7 +351,7 @@ public void pack () {
}
int margin = 0;
if (OS.COMCTL32_VERSION >= OS.VERSION (5, 80)) {
- int /*long*/ hwndHeader = OS.SendMessage (hwnd, OS.LVM_GETHEADER, 0, 0);
+ long /*int*/ hwndHeader = OS.SendMessage (hwnd, OS.LVM_GETHEADER, 0, 0);
margin = (int)/*64*/OS.SendMessage (hwndHeader, OS.HDM_GETBITMAPMARGIN, 0, 0);
} else {
margin = OS.GetSystemMetrics (OS.SM_CXEDGE) * 3;
@@ -362,17 +362,17 @@ public void pack () {
int columnWidth = 0;
if (parent.hooks (SWT.MeasureItem)) {
RECT headerRect = new RECT ();
- int /*long*/ hwndHeader = OS.SendMessage (hwnd, OS.LVM_GETHEADER, 0, 0);
+ long /*int*/ hwndHeader = OS.SendMessage (hwnd, OS.LVM_GETHEADER, 0, 0);
OS.SendMessage (hwndHeader, OS.HDM_GETITEMRECT, index, headerRect);
OS.MapWindowPoints (hwndHeader, hwnd, headerRect, 2);
- int /*long*/ hDC = OS.GetDC (hwnd);
- int /*long*/ oldFont = 0, newFont = OS.SendMessage (hwnd, OS.WM_GETFONT, 0, 0);
+ long /*int*/ hDC = OS.GetDC (hwnd);
+ long /*int*/ oldFont = 0, newFont = OS.SendMessage (hwnd, OS.WM_GETFONT, 0, 0);
if (newFont != 0) oldFont = OS.SelectObject (hDC, newFont);
int count = (int)/*64*/OS.SendMessage (hwnd, OS.LVM_GETITEMCOUNT, 0, 0);
for (int i=0; i<count; i++) {
TableItem item = parent._getItem (i, false);
if (item != null) {
- int /*long*/ hFont = item.fontHandle (index);
+ long /*int*/ hFont = item.fontHandle (index);
if (hFont != -1) hFont = OS.SelectObject (hDC, hFont);
Event event = parent.sendMeasureItemEvent (item, i, index, hDC);
if (hFont != -1) hFont = OS.SelectObject (hDC, hFont);
@@ -406,7 +406,7 @@ public void pack () {
*/
if (!OS.IsWinCE && OS.WIN32_VERSION < OS.VERSION (6, 0)) {
if (!parent.firstColumnImage) {
- int /*long*/ hImageList = OS.SendMessage (hwnd, OS.LVM_GETIMAGELIST, OS.LVSIL_SMALL, 0);
+ long /*int*/ hImageList = OS.SendMessage (hwnd, OS.LVM_GETIMAGELIST, OS.LVSIL_SMALL, 0);
if (hImageList != 0) {
int [] cx = new int [1], cy = new int [1];
OS.ImageList_GetIconSize (hImageList, cx, cy);
@@ -421,7 +421,7 @@ public void pack () {
* width by the width of the image list.
*/
if ((parent.style & SWT.CHECK) != 0) {
- int /*long*/ hStateList = OS.SendMessage (hwnd, OS.LVM_GETIMAGELIST, OS.LVSIL_STATE, 0);
+ long /*int*/ hStateList = OS.SendMessage (hwnd, OS.LVM_GETIMAGELIST, OS.LVSIL_STATE, 0);
if (hStateList != 0) {
int [] cx = new int [1], cy = new int [1];
OS.ImageList_GetIconSize (hStateList, cx, cy);
@@ -565,7 +565,7 @@ public void setAlignment (int alignment) {
if (index == -1 || index == 0) return;
style &= ~(SWT.LEFT | SWT.RIGHT | SWT.CENTER);
style |= alignment & (SWT.LEFT | SWT.RIGHT | SWT.CENTER);
- int /*long*/ hwnd = parent.handle;
+ long /*int*/ hwnd = parent.handle;
LVCOLUMN lvColumn = new LVCOLUMN ();
lvColumn.mask = OS.LVCF_FMT;
OS.SendMessage (hwnd, OS.LVM_GETCOLUMN, index, lvColumn);
@@ -586,7 +586,7 @@ public void setAlignment (int alignment) {
parent.forceResize ();
RECT rect = new RECT (), headerRect = new RECT ();
OS.GetClientRect (hwnd, rect);
- int /*long*/ hwndHeader = OS.SendMessage (hwnd, OS.LVM_GETHEADER, 0, 0);
+ long /*int*/ hwndHeader = OS.SendMessage (hwnd, OS.LVM_GETHEADER, 0, 0);
OS.SendMessage (hwndHeader, OS.HDM_GETITEMRECT, index, headerRect);
OS.MapWindowPoints (hwndHeader, hwnd, headerRect, 2);
rect.left = headerRect.left;
@@ -609,9 +609,9 @@ public void setImage (Image image) {
void setImage (Image image, boolean sort, boolean right) {
int index = parent.indexOf (this);
if (index == -1) return;
- int /*long*/ hwnd = parent.handle;
+ long /*int*/ hwnd = parent.handle;
if (OS.COMCTL32_MAJOR < 6) {
- int /*long*/ hwndHeader = OS.SendMessage (hwnd, OS.LVM_GETHEADER, 0, 0);
+ long /*int*/ hwndHeader = OS.SendMessage (hwnd, OS.LVM_GETHEADER, 0, 0);
HDITEM hdItem = new HDITEM ();
hdItem.mask = OS.HDI_FORMAT | OS.HDI_IMAGE | OS.HDI_BITMAP;
OS.SendMessage (hwndHeader, OS.HDM_GETITEM, index, hdItem);
@@ -699,8 +699,8 @@ void setSortDirection (int direction) {
if (OS.COMCTL32_MAJOR >= 6) {
int index = parent.indexOf (this);
if (index == -1) return;
- int /*long*/ hwnd = parent.handle;
- int /*long*/ hwndHeader = OS.SendMessage (hwnd, OS.LVM_GETHEADER, 0, 0);
+ long /*int*/ hwnd = parent.handle;
+ long /*int*/ hwndHeader = OS.SendMessage (hwnd, OS.LVM_GETHEADER, 0, 0);
HDITEM hdItem = new HDITEM ();
hdItem.mask = OS.HDI_FORMAT | OS.HDI_IMAGE;
OS.SendMessage (hwndHeader, OS.HDM_GETITEM, index, hdItem);
@@ -792,7 +792,7 @@ public void setText (String string) {
* text does not draw. The fix is to query and then
* set the alignment.
*/
- int /*long*/ hwnd = parent.handle;
+ long /*int*/ hwnd = parent.handle;
LVCOLUMN lvColumn = new LVCOLUMN ();
lvColumn.mask = OS.LVCF_FMT;
OS.SendMessage (hwnd, OS.LVM_GETCOLUMN, index, lvColumn);
@@ -806,14 +806,14 @@ public void setText (String string) {
* with spaces.
*/
boolean replace = !OS.IsWinCE && OS.WIN32_VERSION <= OS.VERSION (4, 10);
- int /*long*/ hHeap = OS.GetProcessHeap ();
+ long /*int*/ hHeap = OS.GetProcessHeap ();
TCHAR buffer = new TCHAR (parent.getCodePage (), fixMnemonic (string, replace), true);
int byteCount = buffer.length () * TCHAR.sizeof;
- int /*long*/ pszText = OS.HeapAlloc (hHeap, OS.HEAP_ZERO_MEMORY, byteCount);
+ long /*int*/ pszText = OS.HeapAlloc (hHeap, OS.HEAP_ZERO_MEMORY, byteCount);
OS.MoveMemory (pszText, buffer, byteCount);
lvColumn.mask |= OS.LVCF_TEXT;
lvColumn.pszText = pszText;
- int /*long*/ result = OS.SendMessage (hwnd, OS.LVM_SETCOLUMN, index, lvColumn);
+ long /*int*/ result = OS.SendMessage (hwnd, OS.LVM_SETCOLUMN, index, lvColumn);
if (pszText != 0) OS.HeapFree (hHeap, 0, pszText);
if (result == 0) error (SWT.ERROR_CANNOT_SET_TEXT);
}
@@ -843,7 +843,7 @@ public void setText (String string) {
public void setToolTipText (String string) {
checkWidget();
toolTipText = string;
- int /*long*/ hwndHeaderToolTip = parent.headerToolTipHandle;
+ long /*int*/ hwndHeaderToolTip = parent.headerToolTipHandle;
if (hwndHeaderToolTip == 0) {
parent.createHeaderToolTips ();
parent.updateHeaderToolTips ();
@@ -865,17 +865,17 @@ public void setWidth (int width) {
if (width < 0) return;
int index = parent.indexOf (this);
if (index == -1) return;
- int /*long*/ hwnd = parent.handle;
+ long /*int*/ hwnd = parent.handle;
if (width != (int)/*64*/OS.SendMessage (hwnd, OS.LVM_GETCOLUMNWIDTH, index, 0)) {
OS.SendMessage (hwnd, OS.LVM_SETCOLUMNWIDTH, index, width);
}
}
void updateToolTip (int index) {
- int /*long*/ hwndHeaderToolTip = parent.headerToolTipHandle;
+ long /*int*/ hwndHeaderToolTip = parent.headerToolTipHandle;
if (hwndHeaderToolTip != 0) {
- int /*long*/ hwnd = parent.handle;
- int /*long*/ hwndHeader = OS.SendMessage (hwnd, OS.LVM_GETHEADER, 0, 0);
+ long /*int*/ hwnd = parent.handle;
+ long /*int*/ hwndHeader = OS.SendMessage (hwnd, OS.LVM_GETHEADER, 0, 0);
RECT rect = new RECT ();
if (OS.SendMessage (hwndHeader, OS.HDM_GETITEMRECT, index, rect) != 0) {
TOOLINFO lpti = new TOOLINFO ();
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/TableItem.java b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/TableItem.java
index 67884d2eee..55fcdd2dc3 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/TableItem.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/TableItem.java
@@ -147,7 +147,7 @@ void destroyWidget () {
releaseHandle ();
}
-int /*long*/ fontHandle (int index) {
+long /*int*/ fontHandle (int index) {
if (cellFont != null && cellFont [index] != null) return cellFont [index].handle;
if (font != null) return font.handle;
return -1;
@@ -243,7 +243,7 @@ RECT getBounds (int row, int column, boolean getText, boolean getImage, boolean
return getBounds (row, column, getText, getImage, fullText, false, 0);
}
-RECT getBounds (int row, int column, boolean getText, boolean getImage, boolean fullText, boolean fullImage, int /*long*/ hDC) {
+RECT getBounds (int row, int column, boolean getText, boolean getImage, boolean fullText, boolean fullImage, long /*int*/ hDC) {
if (!getText && !getImage) return new RECT ();
int columnCount = parent.getColumnCount ();
if (!(0 <= column && column < Math.max (1, columnCount))) {
@@ -251,24 +251,24 @@ RECT getBounds (int row, int column, boolean getText, boolean getImage, boolean
}
if (parent.fixScrollWidth) parent.setScrollWidth (null, true);
RECT rect = new RECT ();
- int /*long*/ hwnd = parent.handle;
+ long /*int*/ hwnd = parent.handle;
int bits = (int)/*64*/OS.SendMessage (hwnd, OS.LVM_GETEXTENDEDLISTVIEWSTYLE, 0, 0);
if (column == 0 && (bits & OS.LVS_EX_FULLROWSELECT) == 0) {
if (parent.explorerTheme) {
rect.left = OS.LVIR_ICON;
parent.ignoreCustomDraw = true;
- int /*long*/ code = OS.SendMessage (hwnd, OS. LVM_GETITEMRECT, row, rect);
+ long /*int*/ code = OS.SendMessage (hwnd, OS. LVM_GETITEMRECT, row, rect);
parent.ignoreCustomDraw = false;
if (code == 0) return new RECT ();
if (getText) {
int width = 0;
- int /*long*/ hFont = fontHandle (column);
+ long /*int*/ hFont = fontHandle (column);
if (hFont == -1 && hDC == 0) {
TCHAR buffer = new TCHAR (parent.getCodePage (), text, true);
width = (int)/*64*/OS.SendMessage (hwnd, OS.LVM_GETSTRINGWIDTH, 0, buffer);
} else {
TCHAR buffer = new TCHAR (parent.getCodePage (), text, false);
- int /*long*/ textDC = hDC != 0 ? hDC : OS.GetDC (hwnd), oldFont = -1;
+ long /*int*/ textDC = hDC != 0 ? hDC : OS.GetDC (hwnd), oldFont = -1;
if (hDC == 0) {
if (hFont == -1) hFont = OS.SendMessage (hwnd, OS.WM_GETFONT, 0, 0);
oldFont = OS.SelectObject (textDC, hFont);
@@ -289,7 +289,7 @@ RECT getBounds (int row, int column, boolean getText, boolean getImage, boolean
if (getText) {
rect.left = OS.LVIR_SELECTBOUNDS;
parent.ignoreCustomDraw = true;
- int /*long*/ code = OS.SendMessage (hwnd, OS.LVM_GETITEMRECT, row, rect);
+ long /*int*/ code = OS.SendMessage (hwnd, OS.LVM_GETITEMRECT, row, rect);
parent.ignoreCustomDraw = false;
if (code == 0) return new RECT ();
if (!getImage) {
@@ -303,14 +303,14 @@ RECT getBounds (int row, int column, boolean getText, boolean getImage, boolean
} else {
rect.left = OS.LVIR_ICON;
parent.ignoreCustomDraw = true;
- int /*long*/ code = OS.SendMessage (hwnd, OS.LVM_GETITEMRECT, row, rect);
+ long /*int*/ code = OS.SendMessage (hwnd, OS.LVM_GETITEMRECT, row, rect);
parent.ignoreCustomDraw = false;
if (code == 0) return new RECT ();
}
}
if (fullText || fullImage) {
RECT headerRect = new RECT ();
- int /*long*/ hwndHeader = OS.SendMessage (hwnd, OS.LVM_GETHEADER, 0, 0);
+ long /*int*/ hwndHeader = OS.SendMessage (hwnd, OS.LVM_GETHEADER, 0, 0);
OS.SendMessage (hwndHeader, OS.HDM_GETITEMRECT, 0, headerRect);
OS.MapWindowPoints (hwndHeader, hwnd, headerRect, 2);
if (getText && fullText) rect.right = headerRect.right;
@@ -334,7 +334,7 @@ RECT getBounds (int row, int column, boolean getText, boolean getImage, boolean
*/
rect.left = getText ? OS.LVIR_LABEL : OS.LVIR_ICON;
parent.ignoreCustomDraw = true;
- int /*long*/ code = OS.SendMessage (hwnd, OS. LVM_GETSUBITEMRECT, row, rect);
+ long /*int*/ code = OS.SendMessage (hwnd, OS. LVM_GETSUBITEMRECT, row, rect);
parent.ignoreCustomDraw = false;
if (code == 0) return new RECT ();
/*
@@ -368,7 +368,7 @@ RECT getBounds (int row, int column, boolean getText, boolean getImage, boolean
}
if (column == 0 && fullImage) {
RECT headerRect = new RECT ();
- int /*long*/ hwndHeader = OS.SendMessage (hwnd, OS.LVM_GETHEADER, 0, 0);
+ long /*int*/ hwndHeader = OS.SendMessage (hwnd, OS.LVM_GETHEADER, 0, 0);
OS.SendMessage (hwndHeader, OS.HDM_GETITEMRECT, 0, headerRect);
OS.MapWindowPoints (hwndHeader, hwnd, headerRect, 2);
rect.left = headerRect.left;
@@ -376,7 +376,7 @@ RECT getBounds (int row, int column, boolean getText, boolean getImage, boolean
} else {
rect.left = OS.LVIR_ICON;
parent.ignoreCustomDraw = true;
- int /*long*/ code = OS.SendMessage (hwnd, OS. LVM_GETSUBITEMRECT, row, rect);
+ long /*int*/ code = OS.SendMessage (hwnd, OS. LVM_GETSUBITEMRECT, row, rect);
parent.ignoreCustomDraw = false;
if (code == 0) return new RECT ();
if (!hasImage) rect.right = rect.left;
@@ -682,7 +682,7 @@ public Rectangle getTextBounds (int index) {
void redraw () {
if (parent.currentItem == this || !parent.getDrawing ()) return;
- int /*long*/ hwnd = parent.handle;
+ long /*int*/ hwnd = parent.handle;
if (!OS.IsWindowVisible (hwnd)) return;
int index = parent.indexOf (this);
if (index == -1) return;
@@ -691,7 +691,7 @@ void redraw () {
void redraw (int column, boolean drawText, boolean drawImage) {
if (parent.currentItem == this || !parent.getDrawing ()) return;
- int /*long*/ hwnd = parent.handle;
+ long /*int*/ hwnd = parent.handle;
if (!OS.IsWindowVisible (hwnd)) return;
int index = parent.indexOf (this);
if (index == -1) return;
@@ -859,7 +859,7 @@ public void setFont (Font font){
if ((parent.style & SWT.VIRTUAL) == 0 && cached) {
int itemIndex = parent.indexOf (this);
if (itemIndex != -1) {
- int /*long*/ hwnd = parent.handle;
+ long /*int*/ hwnd = parent.handle;
LVITEM lvItem = new LVITEM ();
lvItem.mask = OS.LVIF_TEXT;
lvItem.iItem = itemIndex;
@@ -923,7 +923,7 @@ public void setFont (int index, Font font) {
if ((parent.style & SWT.VIRTUAL) == 0 && cached) {
int itemIndex = parent.indexOf (this);
if (itemIndex != -1) {
- int /*long*/ hwnd = parent.handle;
+ long /*int*/ hwnd = parent.handle;
LVITEM lvItem = new LVITEM ();
lvItem.mask = OS.LVIF_TEXT;
lvItem.iItem = itemIndex;
@@ -1132,7 +1132,7 @@ public void setImageIndent (int indent) {
} else {
int index = parent.indexOf (this);
if (index != -1) {
- int /*long*/ hwnd = parent.handle;
+ long /*int*/ hwnd = parent.handle;
LVITEM lvItem = new LVITEM ();
lvItem.mask = OS.LVIF_INDENT;
lvItem.iItem = index;
@@ -1213,7 +1213,7 @@ public void setText (int index, String string) {
if ((parent.style & SWT.VIRTUAL) == 0 && cached) {
int itemIndex = parent.indexOf (this);
if (itemIndex != -1) {
- int /*long*/ hwnd = parent.handle;
+ long /*int*/ hwnd = parent.handle;
LVITEM lvItem = new LVITEM ();
lvItem.mask = OS.LVIF_TEXT;
lvItem.iItem = itemIndex;
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/TaskBar.java b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/TaskBar.java
index 3eb5d6bf60..958b08a534 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/TaskBar.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/TaskBar.java
@@ -36,7 +36,7 @@ import org.eclipse.swt.*;
public class TaskBar extends Widget {
int itemCount;
TaskItem [] items = new TaskItem [4];
- int /*long*/ mTaskbarList3;
+ long /*int*/ mTaskbarList3;
static final char [] EXE_PATH;
static final char [] ICO_DIR = {'i','c','o','_','d','i','r','\0'};
@@ -98,7 +98,7 @@ TaskBar (Display display, int style) {
}
void createHandle () {
- int /*long*/[] ppv = new int /*long*/ [1];
+ long /*int*/[] ppv = new long /*int*/ [1];
int hr = OS.CoCreateInstance (CLSID_TaskbarList, 0, OS.CLSCTX_INPROC_SERVER, IID_ITaskbarList3, ppv);
if (hr != OS.S_OK) error (SWT.ERROR_NO_HANDLES);
mTaskbarList3 = ppv [0];
@@ -124,17 +124,17 @@ void createItems () {
getItem (null);
}
-int /*long*/ createShellLink (MenuItem item, String directory) {
+long /*int*/ createShellLink (MenuItem item, String directory) {
int style = item.getStyle ();
if ((style & SWT.CASCADE) != 0) return 0;
- int /*long*/ [] ppv = new int /*long*/ [1];
+ long /*int*/ [] ppv = new long /*int*/ [1];
int hr = OS.CoCreateInstance (CLSID_ShellLink, 0, OS.CLSCTX_INPROC_SERVER, IID_IShellLinkW, ppv);
if (hr != OS.S_OK) error (SWT.ERROR_NO_HANDLES);
- int /*long*/ pLink = ppv [0];
+ long /*int*/ pLink = ppv [0];
- int /*long*/ hHeap = OS.GetProcessHeap ();
- int /*long*/ pv = OS.HeapAlloc (hHeap, OS.HEAP_ZERO_MEMORY, OS.PROPVARIANT_sizeof());
- int /*long*/ titlePtr = 0;
+ long /*int*/ hHeap = OS.GetProcessHeap ();
+ long /*int*/ pv = OS.HeapAlloc (hHeap, OS.HEAP_ZERO_MEMORY, OS.PROPVARIANT_sizeof());
+ long /*int*/ titlePtr = 0;
PROPERTYKEY key;
if ((style & SWT.SEPARATOR) != 0) {
OS.MoveMemory (pv, new short [] {OS.VT_BOOL}, 2);
@@ -148,7 +148,7 @@ int /*long*/ createShellLink (MenuItem item, String directory) {
titlePtr = OS.HeapAlloc (hHeap, OS.HEAP_ZERO_MEMORY, buffer.length * 2);
OS.MoveMemory (titlePtr, buffer, buffer.length * 2);
OS.MoveMemory (pv, new short [] {OS.VT_LPWSTR}, 2);
- OS.MoveMemory (pv + 8, new int /*long*/ [] {titlePtr}, OS.PTR_SIZEOF);
+ OS.MoveMemory (pv + 8, new long /*int*/ [] {titlePtr}, OS.PTR_SIZEOF);
key = PKEY_Title;
/*IShellLink::SetPath*/
@@ -217,7 +217,7 @@ int /*long*/ createShellLink (MenuItem item, String directory) {
/*IUnknown::QueryInterface*/
hr = OS.VtblCall (0, pLink, IID_IPropertyStore, ppv);
if (hr != OS.S_OK) error (SWT.ERROR_NO_HANDLES);
- int /*long*/ pPropStore = ppv [0];
+ long /*int*/ pPropStore = ppv [0];
/*IPropertyStore::SetValue*/
hr = OS.VtblCall (6, pPropStore, key, pv);
if (hr != OS.S_OK) error (SWT.ERROR_INVALID_ARGUMENT);
@@ -231,15 +231,15 @@ int /*long*/ createShellLink (MenuItem item, String directory) {
return pLink;
}
-int /*long*/ createShellLinkArray (MenuItem [] items, String directory) {
+long /*int*/ createShellLinkArray (MenuItem [] items, String directory) {
if (items == null) return 0;
if (items.length == 0) return 0;
- int /*long*/ [] ppv = new int /*long*/ [1];
+ long /*int*/ [] ppv = new long /*int*/ [1];
int hr = OS.CoCreateInstance (CLSID_EnumerableObjectCollection, 0, OS.CLSCTX_INPROC_SERVER, IID_IObjectCollection, ppv);
if (hr != OS.S_OK) error (SWT.ERROR_NO_HANDLES);
- int /*long*/ pObjColl = ppv [0];
+ long /*int*/ pObjColl = ppv [0];
for (int i = 0; i < items.length; i++) {
- int /*long*/ pLink = createShellLink (items[i], directory);
+ long /*int*/ pLink = createShellLink (items[i], directory);
if (pLink != 0) {
/*IObjectCollection::AddObject*/
hr = OS.VtblCall (5, pObjColl, pLink);
@@ -251,7 +251,7 @@ int /*long*/ createShellLinkArray (MenuItem [] items, String directory) {
/*IUnknown::QueryInterface*/
hr = OS.VtblCall (0, pObjColl, IID_IObjectArray, ppv);
if (hr != OS.S_OK) error (SWT.ERROR_NO_HANDLES);
- int /*long*/ poa = ppv [0];
+ long /*int*/ poa = ppv [0];
/*IUnknown::Release*/
OS.VtblCall (2, pObjColl);
return poa;
@@ -289,24 +289,24 @@ String getDirectory (char[] appName) {
}
}
String result = null;
- int /*long*/ [] ppv = new int /*long*/ [1];
+ long /*int*/ [] ppv = new long /*int*/ [1];
int hr = OS.SHCreateItemInKnownFolder (FOLDERID_LocalAppData, 0, null, IID_IShellItem, ppv);
if (hr == OS.S_OK) {
- int /*long*/ psiRoot = ppv [0];
+ long /*int*/ psiRoot = ppv [0];
hr = OS.CoCreateInstance (CLSID_FileOperation, 0, OS.CLSCTX_INPROC_SERVER, IID_IFileOperation, ppv);
if (hr == OS.S_OK) {
- int /*long*/ pfo = ppv [0];
+ long /*int*/ pfo = ppv [0];
/*IFileOperation.SetOperationFlags*/
hr = OS.VtblCall (5, pfo, OS.FOF_NO_UI);
if (hr == OS.S_OK) {
- int /*long*/ psiAppDir = getDirectory (psiRoot, pfo, appDir, false);
+ long /*int*/ psiAppDir = getDirectory (psiRoot, pfo, appDir, false);
if (psiAppDir != 0) {
- int /*long*/ psiIcoDir = getDirectory (psiAppDir, pfo, ICO_DIR, true);
+ long /*int*/ psiIcoDir = getDirectory (psiAppDir, pfo, ICO_DIR, true);
if (psiIcoDir != 0) {
/*IShellItem::GetDisplayName*/
hr = OS.VtblCall (5, psiIcoDir, OS.SIGDN_FILESYSPATH, ppv);
if (hr == OS.S_OK) {
- int /*long*/ wstr = ppv [0];
+ long /*int*/ wstr = ppv [0];
int length = OS.wcslen (wstr);
char [] buffer = new char [length];
OS.MoveMemory (buffer, wstr, length * 2);
@@ -329,8 +329,8 @@ String getDirectory (char[] appName) {
return result;
}
-int /*long*/ getDirectory (int /*long*/ parent, int /*long*/ pfo, char [] name, boolean delete) {
- int /*long*/ [] ppv = new int /*long*/ [1];
+long /*int*/ getDirectory (long /*int*/ parent, long /*int*/ pfo, char [] name, boolean delete) {
+ long /*int*/ [] ppv = new long /*int*/ [1];
int hr = OS.SHCreateItemFromRelativeName (parent, name, 0, IID_IShellItem, ppv);
if (hr == OS.S_OK) {
if (delete) {
@@ -497,10 +497,10 @@ void reskinChildren (int flags) {
}
void setMenu (Menu menu) {
- int /*long*/ [] ppv = new int /*long*/ [1];
+ long /*int*/ [] ppv = new long /*int*/ [1];
int hr = OS.CoCreateInstance (CLSID_DestinationList, 0, OS.CLSCTX_INPROC_SERVER, IID_ICustomDestinationList, ppv);
if (hr != OS.S_OK) error (SWT.ERROR_NO_HANDLES);
- int /*long*/ pDestList = ppv[0];
+ long /*int*/ pDestList = ppv[0];
String appName = Display.APP_NAME;
char [] buffer = {'S', 'W', 'T', '\0'};
if (appName != null && appName.length () > 0) {
@@ -519,7 +519,7 @@ void setMenu (Menu menu) {
break;
}
}
- int /*long*/ poa = createShellLinkArray (items, directory);
+ long /*int*/ poa = createShellLinkArray (items, directory);
if (poa != 0) {
/*ICustomDestinationList::SetAppID*/
@@ -530,7 +530,7 @@ void setMenu (Menu menu) {
int [] cMaxSlots = new int [1];
OS.VtblCall (4, pDestList, cMaxSlots, IID_IObjectArray, ppv);
if (hr != OS.S_OK) error (SWT.ERROR_INVALID_ARGUMENT);
- int /*long*/ pRemovedItems = ppv [0];
+ long /*int*/ pRemovedItems = ppv [0];
int [] count = new int [1];
/*IObjectArray::GetCount*/
@@ -556,7 +556,7 @@ void setMenu (Menu menu) {
}
}
}
- int /*long*/ poa2 = createShellLinkArray (subItems, directory);
+ long /*int*/ poa2 = createShellLinkArray (subItems, directory);
if (poa2 != 0) {
/*IObjectArray::GetCount*/
OS.VtblCall (3, poa2, count);
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/TaskItem.java b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/TaskItem.java
index 15331c5739..ce27010198 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/TaskItem.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/TaskItem.java
@@ -285,8 +285,8 @@ public void setOverlayImage (Image overlayImage) {
if (overlayText.length () != 0) {
updateText ();
} else {
- int /*long*/ mTaskbarList3 = parent.mTaskbarList3;
- int /*long*/ hwnd = shell.handle;
+ long /*int*/ mTaskbarList3 = parent.mTaskbarList3;
+ long /*int*/ hwnd = shell.handle;
/* ITaskbarList3::SetOverlayIcon */
OS.VtblCall (18, mTaskbarList3, hwnd, 0, 0);
}
@@ -330,8 +330,8 @@ public void setOverlayText (String overlayText) {
if (overlayImage != null) {
updateImage ();
} else {
- int /*long*/ mTaskbarList3 = parent.mTaskbarList3;
- int /*long*/ hwnd = shell.handle;
+ long /*int*/ mTaskbarList3 = parent.mTaskbarList3;
+ long /*int*/ hwnd = shell.handle;
/* ITaskbarList3::SetOverlayIcon */
OS.VtblCall (18, mTaskbarList3, hwnd, 0, 0);
}
@@ -428,7 +428,7 @@ void setShell (Shell shell) {
void updateImage () {
showingText = false;
Image image2 = null;
- int /*long*/ hIcon = 0;
+ long /*int*/ hIcon = 0;
switch (overlayImage.type) {
case SWT.BITMAP:
image2 = Display.createIcon (overlayImage);
@@ -438,8 +438,8 @@ void updateImage () {
hIcon = overlayImage.handle;
break;
}
- int /*long*/ mTaskbarList3 = parent.mTaskbarList3;
- int /*long*/ hwnd = shell.handle;
+ long /*int*/ mTaskbarList3 = parent.mTaskbarList3;
+ long /*int*/ hwnd = shell.handle;
/* ITaskbarList3::SetOverlayIcon */
OS.VtblCall (18, mTaskbarList3, hwnd, hIcon, 0);
if (image2 != null) image2.dispose ();
@@ -448,8 +448,8 @@ void updateImage () {
void updateProgress () {
if (progressState == SWT.INDETERMINATE) return;
if (progressState == SWT.DEFAULT) return;
- int /*long*/ mTaskbarList3 = parent.mTaskbarList3;
- int /*long*/ hwnd = shell.handle;
+ long /*int*/ mTaskbarList3 = parent.mTaskbarList3;
+ long /*int*/ hwnd = shell.handle;
/* ITaskbarList3::SetProgressValue */
OS.VtblCall (9, mTaskbarList3, hwnd, (long)progress, (long)PROGRESS_MAX);
}
@@ -462,8 +462,8 @@ void updateProgressState () {
case SWT.PAUSED: tbpFlags = OS.TBPF_PAUSED; break;
case SWT.INDETERMINATE: tbpFlags = OS.TBPF_INDETERMINATE; break;
}
- int /*long*/ mTaskbarList3 = parent.mTaskbarList3;
- int /*long*/ hwnd = shell.handle;
+ long /*int*/ mTaskbarList3 = parent.mTaskbarList3;
+ long /*int*/ hwnd = shell.handle;
/* ITaskbarList3::SetProgressValue */
OS.VtblCall (9, mTaskbarList3, hwnd, (long)progress, (long)PROGRESS_MAX);
/* ITaskbarList3::SetProgressState */
@@ -474,7 +474,7 @@ void updateText () {
showingText = true;
/* Create resources */
int width = 16, height = 16;
- int /*long*/ hdc = OS.GetDC (0);
+ long /*int*/ hdc = OS.GetDC (0);
BITMAPINFOHEADER bmiHeader = new BITMAPINFOHEADER ();
bmiHeader.biSize = BITMAPINFOHEADER.sizeof;
bmiHeader.biWidth = width;
@@ -484,23 +484,23 @@ void updateText () {
bmiHeader.biCompression = OS.BI_RGB;
byte [] bmi = new byte [BITMAPINFOHEADER.sizeof];
OS.MoveMemory (bmi, bmiHeader, BITMAPINFOHEADER.sizeof);
- int /*long*/ [] pBits = new int /*long*/ [1];
- int /*long*/ hBitmap = OS.CreateDIBSection (0, bmi, OS.DIB_RGB_COLORS, pBits, 0, 0);
+ long /*int*/ [] pBits = new long /*int*/ [1];
+ long /*int*/ hBitmap = OS.CreateDIBSection (0, bmi, OS.DIB_RGB_COLORS, pBits, 0, 0);
if (hBitmap == 0) error (SWT.ERROR_NO_HANDLES);
- int /*long*/ dstHdc = OS.CreateCompatibleDC (hdc);
- int /*long*/ oldBitmap = OS.SelectObject (dstHdc, hBitmap);
- int /*long*/ hMask = OS.CreateBitmap (width, height, 1, 1, null);
+ long /*int*/ dstHdc = OS.CreateCompatibleDC (hdc);
+ long /*int*/ oldBitmap = OS.SelectObject (dstHdc, hBitmap);
+ long /*int*/ hMask = OS.CreateBitmap (width, height, 1, 1, null);
if (hMask == 0) error (SWT.ERROR_NO_HANDLES);
- int /*long*/ maskHdc = OS.CreateCompatibleDC (hdc);
- int /*long*/ oldMask = OS.SelectObject (maskHdc, hMask);
+ long /*int*/ maskHdc = OS.CreateCompatibleDC (hdc);
+ long /*int*/ oldMask = OS.SelectObject (maskHdc, hMask);
/* Draw content */
OS.PatBlt (maskHdc, 0, 0, width, height, OS.WHITENESS);
- int /*long*/ oldBrush = OS.SelectObject (maskHdc, OS.GetStockObject (OS.BLACK_BRUSH));
+ long /*int*/ oldBrush = OS.SelectObject (maskHdc, OS.GetStockObject (OS.BLACK_BRUSH));
OS.RoundRect (maskHdc, 0, 0, width, height, 8, 8);
OS.SelectObject (maskHdc, oldBrush);
- int /*long*/ brush = OS.CreateSolidBrush (OS.GetSysColor (OS.COLOR_HIGHLIGHT));
+ long /*int*/ brush = OS.CreateSolidBrush (OS.GetSysColor (OS.COLOR_HIGHLIGHT));
oldBrush = OS.SelectObject (dstHdc, brush);
OS.RoundRect (dstHdc, 0, 0, width, height, 8, 8);
OS.SelectObject (dstHdc, oldBrush);
@@ -510,7 +510,7 @@ void updateText () {
RECT rect = new RECT ();
TCHAR buffer = new TCHAR (shell.getCodePage (), overlayText, false);
int length = buffer.length();
- int /*long*/ hFont = 0, oldHFont = 0;
+ long /*int*/ hFont = 0, oldHFont = 0;
NONCLIENTMETRICS info = OS.IsUnicode ? (NONCLIENTMETRICS) new NONCLIENTMETRICSW () : new NONCLIENTMETRICSA ();
info.cbSize = NONCLIENTMETRICS.sizeof;
if (OS.SystemParametersInfo (OS.SPI_GETNONCLIENTMETRICS, 0, info, 0)) {
@@ -549,13 +549,13 @@ void updateText () {
iconInfo.fIcon = true;
iconInfo.hbmColor = hBitmap;
iconInfo.hbmMask = hMask;
- int /*long*/ hIcon = OS.CreateIconIndirect (iconInfo);
+ long /*int*/ hIcon = OS.CreateIconIndirect (iconInfo);
if (hIcon == 0) error (SWT.ERROR_NO_HANDLES);
OS.DeleteObject (hBitmap);
OS.DeleteObject (hMask);
- int /*long*/ mTaskbarList3 = parent.mTaskbarList3;
- int /*long*/ hwnd = shell.handle;
+ long /*int*/ mTaskbarList3 = parent.mTaskbarList3;
+ long /*int*/ hwnd = shell.handle;
/* ITaskbarList3::SetOverlayIcon */
OS.VtblCall (18, mTaskbarList3, hwnd, hIcon, 0);
OS.DestroyIcon (hIcon);
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Text.java b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Text.java
index 3df3919bff..b56f2343e7 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Text.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Text.java
@@ -96,7 +96,7 @@ public class Text extends Scrollable {
DELIMITER = "\r\n";
}
- static final int /*long*/ EditProc;
+ static final long /*int*/ EditProc;
static final TCHAR EditClass = new TCHAR (0, "EDIT", true);
static {
WNDCLASS lpWndClass = new WNDCLASS ();
@@ -105,7 +105,7 @@ public class Text extends Scrollable {
/*
* This code is intentionally commented.
*/
-// int /*long*/ hwndText = OS.CreateWindowEx (0,
+// long /*int*/ hwndText = OS.CreateWindowEx (0,
// EditClass,
// null,
// OS.WS_OVERLAPPED | OS.ES_PASSWORD,
@@ -161,7 +161,7 @@ public Text (Composite parent, int style) {
super (parent, checkStyle (style));
}
-int /*long*/ callWindowProc (int /*long*/ hwnd, int msg, int /*long*/ wParam, int /*long*/ lParam) {
+long /*int*/ callWindowProc (long /*int*/ hwnd, int msg, long /*int*/ wParam, long /*int*/ lParam) {
if (handle == 0) return 0;
boolean redraw = false;
switch (msg) {
@@ -184,13 +184,13 @@ int /*long*/ callWindowProc (int /*long*/ hwnd, int msg, int /*long*/ wParam, in
}
}
if (doubleBuffer || drawMessage) {
- int /*long*/ paintDC = 0;
+ long /*int*/ paintDC = 0;
PAINTSTRUCT ps = new PAINTSTRUCT ();
paintDC = OS.BeginPaint (handle, ps);
int width = ps.right - ps.left;
int height = ps.bottom - ps.top;
if (width != 0 && height != 0) {
- int /*long*/ hDC = paintDC, hBitmap = 0, hOldBitmap = 0;
+ long /*int*/ hDC = paintDC, hBitmap = 0, hOldBitmap = 0;
POINT lpPoint1 = null, lpPoint2 = null;
if (doubleBuffer) {
hDC = OS.CreateCompatibleDC (paintDC);
@@ -215,7 +215,7 @@ int /*long*/ callWindowProc (int /*long*/ hwnd, int msg, int /*long*/ wParam, in
if (drawMessage) {
RECT rect = new RECT();
OS.GetClientRect(handle, rect);
- int /*long*/ margins = OS.SendMessage (handle, OS.EM_GETMARGINS, 0, 0);
+ long /*int*/ margins = OS.SendMessage (handle, OS.EM_GETMARGINS, 0, 0);
rect.left += OS.LOWORD (margins);
rect.right -= OS.HIWORD (margins);
if ((style & SWT.BORDER) != 0) {
@@ -234,8 +234,8 @@ int /*long*/ callWindowProc (int /*long*/ hwnd, int msg, int /*long*/ wParam, in
case SWT.CENTER: uFormat |= OS.DT_CENTER;
case SWT.RIGHT: uFormat |= (rtl ? OS.DT_LEFT : OS.DT_RIGHT); break;
}
- int /*long*/ hFont = OS.SendMessage (hwnd, OS.WM_GETFONT, 0, 0);
- int /*long*/ hOldFont = OS.SelectObject (hDC, hFont);
+ long /*int*/ hFont = OS.SendMessage (hwnd, OS.WM_GETFONT, 0, 0);
+ long /*int*/ hOldFont = OS.SelectObject (hDC, hFont);
OS.SetTextColor (hDC, OS.GetSysColor (OS.COLOR_GRAYTEXT));
OS.SetBkMode (hDC, OS.TRANSPARENT);
OS.DrawText (hDC, buffer, buffer.length (), rect, uFormat);
@@ -257,7 +257,7 @@ int /*long*/ callWindowProc (int /*long*/ hwnd, int msg, int /*long*/ wParam, in
break;
}
}
- int /*long*/ code = OS.CallWindowProc (EditProc, hwnd, msg, wParam, lParam);
+ long /*int*/ code = OS.CallWindowProc (EditProc, hwnd, msg, wParam, lParam);
switch (msg) {
case OS.WM_HSCROLL:
case OS.WM_VSCROLL: {
@@ -516,7 +516,7 @@ void applySegments () {
newChars [length] = 0;
buffer = new TCHAR (cp, newChars, false);
OS.SendMessage (handle, OS.EM_SETSEL, 0, -1);
- int /*long*/ undo = OS.SendMessage (handle, OS.EM_CANUNDO, 0, 0);
+ long /*int*/ undo = OS.SendMessage (handle, OS.EM_CANUNDO, 0, 0);
OS.SendMessage (handle, OS.EM_REPLACESEL, undo, buffer);
/* Restore selection */
start [0] = translateOffset (start [0]);
@@ -591,7 +591,7 @@ void clearSegments (boolean applyText) {
* menu. Sending OS.EM_REPLACESEL message instead.
*/
OS.SendMessage (handle, OS.EM_SETSEL, 0, -1);
- int /*long*/ undo = OS.SendMessage (handle, OS.EM_CANUNDO, 0, 0);
+ long /*int*/ undo = OS.SendMessage (handle, OS.EM_CANUNDO, 0, 0);
OS.SendMessage (handle, OS.EM_REPLACESEL, undo, buffer);
/* Restore selection */
if (!OS.IsUnicode && OS.IsDBLocale) {
@@ -634,8 +634,8 @@ public Point computeSize (int wHint, int hHint, boolean changed) {
checkWidget ();
int height = 0, width = 0;
if (wHint == SWT.DEFAULT || hHint == SWT.DEFAULT) {
- int /*long*/ newFont, oldFont = 0;
- int /*long*/ hDC = OS.GetDC (handle);
+ long /*int*/ newFont, oldFont = 0;
+ long /*int*/ hDC = OS.GetDC (handle);
newFont = OS.SendMessage (handle, OS.WM_GETFONT, 0, 0);
if (newFont != 0) oldFont = OS.SelectObject (hDC, newFont);
TEXTMETRIC tm = OS.IsUnicode ? (TEXTMETRIC) new TEXTMETRICW () : new TEXTMETRICA ();
@@ -686,7 +686,7 @@ public Rectangle computeTrim (int x, int y, int width, int height) {
* the single-line text widget in an editable combo
* box.
*/
- int /*long*/ margins = OS.SendMessage(handle, OS.EM_GETMARGINS, 0, 0);
+ long /*int*/ margins = OS.SendMessage(handle, OS.EM_GETMARGINS, 0, 0);
rect.x -= OS.LOWORD (margins);
rect.width += OS.LOWORD (margins) + OS.HIWORD (margins);
if ((style & SWT.H_SCROLL) != 0) rect.width++;
@@ -783,12 +783,12 @@ TCHAR deprocessText (TCHAR text, int start, int end, boolean terminate) {
return text;
}
-boolean dragDetect (int /*long*/ hwnd, int x, int y, boolean filter, boolean [] detect, boolean [] consume) {
+boolean dragDetect (long /*int*/ hwnd, int x, int y, boolean filter, boolean [] detect, boolean [] consume) {
if (filter) {
int [] start = new int [1], end = new int [1];
OS.SendMessage (handle, OS.EM_GETSEL, start, end);
if (start [0] != end [0]) {
- int /*long*/ lParam = OS.MAKELPARAM (x, y);
+ long /*int*/ lParam = OS.MAKELPARAM (x, y);
int position = OS.LOWORD (OS.SendMessage (handle, OS.EM_CHARFROMPOS, 0, lParam));
if (start [0] <= position && position < end [0]) {
if (super.dragDetect (hwnd, x, y, filter, detect, consume)) {
@@ -912,7 +912,7 @@ public Point getCaretLocation () {
* pixel coordinates (0,0).
*/
int position = translateOffset (getCaretPosition ());
- int /*long*/ caretPos = OS.SendMessage (handle, OS.EM_POSFROMCHAR, position, 0);
+ long /*int*/ caretPos = OS.SendMessage (handle, OS.EM_POSFROMCHAR, position, 0);
if (caretPos == -1) {
caretPos = 0;
if (position >= OS.GetWindowTextLength (handle)) {
@@ -984,9 +984,9 @@ public int getCaretPosition () {
if (lpgui.hwndCaret == handle || lpgui.hwndCaret == 0) {
POINT ptCurrentPos = new POINT ();
if (OS.GetCaretPos (ptCurrentPos)) {
- int /*long*/ endPos = OS.SendMessage (handle, OS.EM_POSFROMCHAR, end [0], 0);
+ long /*int*/ endPos = OS.SendMessage (handle, OS.EM_POSFROMCHAR, end [0], 0);
if (endPos == -1) {
- int /*long*/ startPos = OS.SendMessage (handle, OS.EM_POSFROMCHAR, start [0], 0);
+ long /*int*/ startPos = OS.SendMessage (handle, OS.EM_POSFROMCHAR, start [0], 0);
int startX = OS.GET_X_LPARAM (startPos);
if (ptCurrentPos.x > startX) caret = end [0];
} else {
@@ -1128,8 +1128,8 @@ public String getLineDelimiter () {
*/
public int getLineHeight () {
checkWidget ();
- int /*long*/ newFont, oldFont = 0;
- int /*long*/ hDC = OS.GetDC (handle);
+ long /*int*/ newFont, oldFont = 0;
+ long /*int*/ hDC = OS.GetDC (handle);
newFont = OS.SendMessage (handle, OS.WM_GETFONT, 0, 0);
if (newFont != 0) oldFont = OS.SelectObject (hDC, newFont);
TEXTMETRIC tm = OS.IsUnicode ? (TEXTMETRIC) new TEXTMETRICW () : new TEXTMETRICA ();
@@ -1198,7 +1198,7 @@ public String getMessage () {
/*public*/ int getPosition (Point point) {
checkWidget();
if (point == null) error (SWT.ERROR_NULL_ARGUMENT);
- int /*long*/ lParam = OS.MAKELPARAM (point.x, point.y);
+ long /*int*/ lParam = OS.MAKELPARAM (point.x, point.y);
int position = OS.LOWORD (OS.SendMessage (handle, OS.EM_CHARFROMPOS, 0, lParam));
if (!OS.IsUnicode && OS.IsDBLocale) position = mbcsToWcsPos (position);
return untranslateOffset (position);
@@ -1296,10 +1296,10 @@ public int getTabs () {
}
int getTabWidth (int tabs) {
- int /*long*/ oldFont = 0;
+ long /*int*/ oldFont = 0;
RECT rect = new RECT ();
- int /*long*/ hDC = OS.GetDC (handle);
- int /*long*/ newFont = OS.SendMessage (handle, OS.WM_GETFONT, 0, 0);
+ long /*int*/ hDC = OS.GetDC (handle);
+ long /*int*/ newFont = OS.SendMessage (handle, OS.WM_GETFONT, 0, 0);
if (newFont != 0) oldFont = OS.SelectObject (hDC, newFont);
int flags = OS.DT_CALCRECT | OS.DT_SINGLELINE | OS.DT_NOPREFIX;
TCHAR SPACE = new TCHAR (getCodePage (), " ", false);
@@ -1471,7 +1471,7 @@ public int getTopPixel () {
* of Rich Edit return zero.
*/
int [] buffer = new int [2];
- int /*long*/ code = OS.SendMessage (handle, OS.EM_GETSCROLLPOS, 0, buffer);
+ long /*int*/ code = OS.SendMessage (handle, OS.EM_GETSCROLLPOS, 0, buffer);
if (code == 1) return buffer [1];
return getTopIndex () * getLineHeight ();
}
@@ -1700,7 +1700,7 @@ public void selectAll () {
OS.SendMessage (handle, OS.EM_SETSEL, 0, -1);
}
-boolean sendKeyEvent (int type, int msg, int /*long*/ wParam, int /*long*/ lParam, Event event) {
+boolean sendKeyEvent (int type, int msg, long /*int*/ wParam, long /*int*/ lParam, Event event) {
if (!super.sendKeyEvent (type, msg, wParam, lParam, event)) {
return false;
}
@@ -1833,7 +1833,7 @@ void setBounds (int x, int y, int width, int height, int flags) {
if ((flags & OS.SWP_NOSIZE) == 0 && width != 0) {
RECT rect = new RECT ();
OS.GetWindowRect (handle, rect);
- int /*long*/ margins = OS.SendMessage (handle, OS.EM_GETMARGINS, 0, 0);
+ long /*int*/ margins = OS.SendMessage (handle, OS.EM_GETMARGINS, 0, 0);
int marginWidth = OS.LOWORD (margins) + OS.HIWORD (margins);
if (rect.right - rect.left <= marginWidth) {
int [] start = new int [1], end = new int [1];
@@ -1857,8 +1857,8 @@ void setBounds (int x, int y, int width, int height, int flags) {
if ((flags & OS.SWP_NOSIZE) == 0) {
int bits = OS.GetWindowLong (handle, OS.GWL_STYLE);
if ((bits & OS.ES_MULTILINE) != 0) {
- int /*long*/ newFont, oldFont = 0;
- int /*long*/ hDC = OS.GetDC (handle);
+ long /*int*/ newFont, oldFont = 0;
+ long /*int*/ hDC = OS.GetDC (handle);
newFont = OS.SendMessage (handle, OS.WM_GETFONT, 0, 0);
if (newFont != 0) oldFont = OS.SelectObject (hDC, newFont);
TEXTMETRIC tm = OS.IsUnicode ? (TEXTMETRIC) new TEXTMETRICW () : new TEXTMETRICA ();
@@ -1868,7 +1868,7 @@ void setBounds (int x, int y, int width, int height, int flags) {
RECT rect = new RECT();
OS.GetClientRect (handle, rect);
if ((rect.bottom - rect.top) < tm.tmHeight) {
- int /*long*/ margins = OS.SendMessage (handle, OS.EM_GETMARGINS, 0, 0);
+ long /*int*/ margins = OS.SendMessage (handle, OS.EM_GETMARGINS, 0, 0);
rect.left += OS.LOWORD (margins);
rect.right -= OS.HIWORD (margins);
rect.top = 0;
@@ -2513,13 +2513,13 @@ TCHAR windowClass () {
return EditClass;
}
-int /*long*/ windowProc () {
+long /*int*/ windowProc () {
return EditProc;
}
-int /*long*/ windowProc (int /*long*/ hwnd, int msg, int /*long*/ wParam, int /*long*/ lParam) {
+long /*int*/ windowProc (long /*int*/ hwnd, int msg, long /*int*/ wParam, long /*int*/ lParam) {
boolean processSegments = false, redraw = false;
- int /*long*/ code;
+ long /*int*/ code;
if (hooks (SWT.Segments) || filters (SWT.Segments)) {
switch (msg) {
case OS.EM_UNDO:
@@ -2579,7 +2579,7 @@ int /*long*/ windowProc (int /*long*/ hwnd, int msg, int /*long*/ wParam, int /*
return code;
}
-LRESULT WM_CHAR (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT WM_CHAR (long /*int*/ wParam, long /*int*/ lParam) {
if (ignoreCharacter) return null;
LRESULT result = super.WM_CHAR (wParam, lParam);
if (result != null) return result;
@@ -2617,19 +2617,19 @@ LRESULT WM_CHAR (int /*long*/ wParam, int /*long*/ lParam) {
return result;
}
-LRESULT WM_CLEAR (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT WM_CLEAR (long /*int*/ wParam, long /*int*/ lParam) {
LRESULT result = super.WM_CLEAR (wParam, lParam);
if (result != null) return result;
return wmClipboard (OS.WM_CLEAR, wParam, lParam);
}
-LRESULT WM_CUT (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT WM_CUT (long /*int*/ wParam, long /*int*/ lParam) {
LRESULT result = super.WM_CUT (wParam, lParam);
if (result != null) return result;
return wmClipboard (OS.WM_CUT, wParam, lParam);
}
-LRESULT WM_ERASEBKGND (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT WM_ERASEBKGND (long /*int*/ wParam, long /*int*/ lParam) {
LRESULT result = super.WM_ERASEBKGND (wParam, lParam);
if ((style & SWT.READ_ONLY) != 0) {
if ((style & (SWT.BORDER | SWT.H_SCROLL | SWT.V_SCROLL)) == 0) {
@@ -2655,7 +2655,7 @@ LRESULT WM_ERASEBKGND (int /*long*/ wParam, int /*long*/ lParam) {
return result;
}
-LRESULT WM_GETDLGCODE (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT WM_GETDLGCODE (long /*int*/ wParam, long /*int*/ lParam) {
LRESULT result = super.WM_GETDLGCODE (wParam, lParam);
if (result != null) return result;
@@ -2681,14 +2681,14 @@ LRESULT WM_GETDLGCODE (int /*long*/ wParam, int /*long*/ lParam) {
* so DLGC_WANTARROWS should not be cleared.
*/
if ((style & SWT.READ_ONLY) != 0) {
- int /*long*/ code = callWindowProc (handle, OS.WM_GETDLGCODE, wParam, lParam);
+ long /*int*/ code = callWindowProc (handle, OS.WM_GETDLGCODE, wParam, lParam);
code &= ~(OS.DLGC_WANTALLKEYS | OS.DLGC_WANTTAB);
return new LRESULT (code);
}
return null;
}
-LRESULT WM_GETOBJECT (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT WM_GETOBJECT (long /*int*/ wParam, long /*int*/ lParam) {
/*
* Ensure that there is an accessible object created for this
* control because support for search text accessibility is
@@ -2700,7 +2700,7 @@ LRESULT WM_GETOBJECT (int /*long*/ wParam, int /*long*/ lParam) {
return super.WM_GETOBJECT (wParam, lParam);
}
-LRESULT WM_IME_CHAR (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT WM_IME_CHAR (long /*int*/ wParam, long /*int*/ lParam) {
/* Process a DBCS character */
Display display = this.display;
@@ -2719,7 +2719,7 @@ LRESULT WM_IME_CHAR (int /*long*/ wParam, int /*long*/ lParam) {
* them to the application.
*/
ignoreCharacter = true;
- int /*long*/ result = callWindowProc (handle, OS.WM_IME_CHAR, wParam, lParam);
+ long /*int*/ result = callWindowProc (handle, OS.WM_IME_CHAR, wParam, lParam);
MSG msg = new MSG ();
int flags = OS.PM_REMOVE | OS.PM_NOYIELD | OS.PM_QS_INPUT | OS.PM_QS_POSTMESSAGE;
while (OS.PeekMessage (msg, handle, OS.WM_CHAR, OS.WM_CHAR, flags)) {
@@ -2734,7 +2734,7 @@ LRESULT WM_IME_CHAR (int /*long*/ wParam, int /*long*/ lParam) {
return new LRESULT (result);
}
-LRESULT WM_LBUTTONDBLCLK (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT WM_LBUTTONDBLCLK (long /*int*/ wParam, long /*int*/ lParam) {
/*
* Prevent Windows from processing WM_LBUTTONDBLCLK
* when double clicking behavior is disabled by not
@@ -2772,7 +2772,7 @@ LRESULT WM_LBUTTONDBLCLK (int /*long*/ wParam, int /*long*/ lParam) {
return result;
}
-LRESULT WM_LBUTTONDOWN (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT WM_LBUTTONDOWN (long /*int*/ wParam, long /*int*/ lParam) {
if (OS.IsPPC) {
LRESULT result = null;
Display display = this.display;
@@ -2816,19 +2816,19 @@ LRESULT WM_LBUTTONDOWN (int /*long*/ wParam, int /*long*/ lParam) {
return super.WM_LBUTTONDOWN (wParam, lParam);
}
-LRESULT WM_PASTE (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT WM_PASTE (long /*int*/ wParam, long /*int*/ lParam) {
LRESULT result = super.WM_PASTE (wParam, lParam);
if (result != null) return result;
return wmClipboard (OS.WM_PASTE, wParam, lParam);
}
-LRESULT WM_UNDO (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT WM_UNDO (long /*int*/ wParam, long /*int*/ lParam) {
LRESULT result = super.WM_UNDO (wParam, lParam);
if (result != null) return result;
return wmClipboard (OS.WM_UNDO, wParam, lParam);
}
-LRESULT wmClipboard (int msg, int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT wmClipboard (int msg, long /*int*/ wParam, long /*int*/ lParam) {
if ((style & SWT.READ_ONLY) != 0) return null;
if (!hooks (SWT.Verify) && !filters (SWT.Verify)) return null;
boolean call = false;
@@ -2904,7 +2904,7 @@ LRESULT wmClipboard (int msg, int /*long*/ wParam, int /*long*/ lParam) {
return null;
}
-LRESULT wmColorChild (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT wmColorChild (long /*int*/ wParam, long /*int*/ lParam) {
if ((style & SWT.READ_ONLY) != 0) {
if ((style & (SWT.BORDER | SWT.H_SCROLL | SWT.V_SCROLL)) == 0) {
int bits = OS.GetWindowLong (handle, OS.GWL_STYLE);
@@ -2929,7 +2929,7 @@ LRESULT wmColorChild (int /*long*/ wParam, int /*long*/ lParam) {
return super.wmColorChild (wParam, lParam);
}
-LRESULT wmCommandChild (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT wmCommandChild (long /*int*/ wParam, long /*int*/ lParam) {
int code = OS.HIWORD (wParam);
switch (code) {
case OS.EN_CHANGE:
@@ -2981,7 +2981,7 @@ LRESULT wmCommandChild (int /*long*/ wParam, int /*long*/ lParam) {
return super.wmCommandChild (wParam, lParam);
}
-LRESULT wmKeyDown (int /*long*/ hwnd, int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT wmKeyDown (long /*int*/ hwnd, long /*int*/ wParam, long /*int*/ lParam) {
LRESULT result = super.wmKeyDown (hwnd, wParam, lParam);
if (result != null) return result;
@@ -2991,7 +2991,7 @@ LRESULT wmKeyDown (int /*long*/ hwnd, int /*long*/ wParam, int /*long*/ lParam)
case OS.VK_UP:
case OS.VK_RIGHT:
case OS.VK_DOWN:
- int /*long*/ code = 0;
+ long /*int*/ code = 0;
int [] start = new int [1], end = new int [1], newStart = new int [1], newEnd = new int [1];
OS.SendMessage (handle, OS.EM_GETSEL, start, end);
while (true) {
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/ToolBar.java b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/ToolBar.java
index 9cb33cf35d..485e7070f2 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/ToolBar.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/ToolBar.java
@@ -50,7 +50,7 @@ public class ToolBar extends Composite {
ToolItem [] tabItemList;
boolean ignoreResize, ignoreMouse;
ImageList imageList, disabledImageList, hotImageList;
- static final int /*long*/ ToolBarProc;
+ static final long /*int*/ ToolBarProc;
static final TCHAR ToolBarClass = new TCHAR (0, OS.TOOLBARCLASSNAME, true);
static {
WNDCLASS lpWndClass = new WNDCLASS ();
@@ -139,7 +139,7 @@ public ToolBar (Composite parent, int style) {
}
}
-int /*long*/ callWindowProc (int /*long*/ hwnd, int msg, int /*long*/ wParam, int /*long*/ lParam) {
+long /*int*/ callWindowProc (long /*int*/ hwnd, int msg, long /*int*/ wParam, long /*int*/ lParam) {
if (handle == 0) return 0;
/*
* Bug in Windows. For some reason, during the processing
@@ -330,7 +330,7 @@ void createHandle () {
* bar currently sets this value to 300 so it is not
* necessary to set TTM_SETMAXTIPWIDTH.
*/
-// int /*long*/ hwndToolTip = OS.SendMessage (handle, OS.TB_GETTOOLTIPS, 0, 0);
+// long /*int*/ hwndToolTip = OS.SendMessage (handle, OS.TB_GETTOOLTIPS, 0, 0);
// OS.SendMessage (hwndToolTip, OS.TTM_SETMAXTIPWIDTH, 0, 0x7FFF);
/*
@@ -345,7 +345,7 @@ void createHandle () {
* The control will not destroy a font that it did not
* create.
*/
- int /*long*/ hFont = OS.GetStockObject (OS.SYSTEM_FONT);
+ long /*int*/ hFont = OS.GetStockObject (OS.SYSTEM_FONT);
OS.SendMessage (handle, OS.WM_SETFONT, hFont, 0);
/* Set the button struct, bitmap and button sizes */
@@ -510,7 +510,7 @@ public ToolItem getItem (int index) {
int count = (int)/*64*/OS.SendMessage (handle, OS.TB_BUTTONCOUNT, 0, 0);
if (!(0 <= index && index < count)) error (SWT.ERROR_INVALID_RANGE);
TBBUTTON lpButton = new TBBUTTON ();
- int /*long*/ result = OS.SendMessage (handle, OS.TB_GETBUTTON, index, lpButton);
+ long /*int*/ result = OS.SendMessage (handle, OS.TB_GETBUTTON, index, lpButton);
if (result == 0) error (SWT.ERROR_CANNOT_GET_ITEM);
return items [lpButton.idCommand];
}
@@ -693,7 +693,7 @@ void layoutItems () {
* the tool items. The fix is to use WM_SETFONT to force
* the tool bar to redraw and lay out.
*/
- int /*long*/ hFont = OS.SendMessage (handle, OS.WM_GETFONT, 0, 0);
+ long /*int*/ hFont = OS.SendMessage (handle, OS.WM_GETFONT, 0, 0);
OS.SendMessage (handle, OS.WM_SETFONT, hFont, 0);
setDropDownItems (true);
}
@@ -715,7 +715,7 @@ void layoutItems () {
TBBUTTONINFO info = new TBBUTTONINFO ();
info.cbSize = TBBUTTONINFO.sizeof;
info.dwMask = OS.TBIF_SIZE;
- int /*long*/ size = OS.SendMessage (handle, OS.TB_GETBUTTONSIZE, 0, 0);
+ long /*int*/ size = OS.SendMessage (handle, OS.TB_GETBUTTONSIZE, 0, 0);
info.cx = (short) OS.LOWORD (size);
int index = 0;
while (index < items.length) {
@@ -724,7 +724,7 @@ void layoutItems () {
index++;
}
if (index < items.length) {
- int /*long*/ padding = OS.SendMessage (handle, OS.TB_GETPADDING, 0, 0);
+ long /*int*/ padding = OS.SendMessage (handle, OS.TB_GETPADDING, 0, 0);
info.cx += OS.LOWORD (padding) * 2;
}
for (int i=0; i<items.length; i++) {
@@ -849,7 +849,7 @@ void reskinChildren (int flags) {
super.reskinChildren (flags);
}
-void setBackgroundImage (int /*long*/ hBitmap) {
+void setBackgroundImage (long /*int*/ hBitmap) {
super.setBackgroundImage (hBitmap);
setBackgroundTransparent (hBitmap != 0);
}
@@ -953,7 +953,7 @@ void setDropDownItems (boolean set) {
void setDisabledImageList (ImageList imageList) {
if (disabledImageList == imageList) return;
- int /*long*/ hImageList = 0;
+ long /*int*/ hImageList = 0;
if ((disabledImageList = imageList) != null) {
hImageList = disabledImageList.getHandle ();
}
@@ -989,7 +989,7 @@ public void setFont (Font font) {
void setHotImageList (ImageList imageList) {
if (hotImageList == imageList) return;
- int /*long*/ hImageList = 0;
+ long /*int*/ hImageList = 0;
if ((hotImageList = imageList) != null) {
hImageList = hotImageList.getHandle ();
}
@@ -1000,7 +1000,7 @@ void setHotImageList (ImageList imageList) {
void setImageList (ImageList imageList) {
if (this.imageList == imageList) return;
- int /*long*/ hImageList = 0;
+ long /*int*/ hImageList = 0;
if ((this.imageList = imageList) != null) {
hImageList = imageList.getHandle ();
}
@@ -1012,7 +1012,7 @@ void setImageList (ImageList imageList) {
public boolean setParent (Composite parent) {
checkWidget ();
if (!super.setParent (parent)) return false;
- int /*long*/ hwndParent = parent.handle;
+ long /*int*/ hwndParent = parent.handle;
OS.SendMessage (handle, OS.TB_SETPARENT, hwndParent, 0);
/*
* Bug in Windows. When a tool bar is reparented, the tooltip
@@ -1021,8 +1021,8 @@ public boolean setParent (Composite parent) {
* over using SetWindowLongPtr(). Note that for some reason,
* SetParent() does not work.
*/
- int /*long*/ hwndShell = parent.getShell ().handle;
- int /*long*/ hwndToolTip = OS.SendMessage (handle, OS.TB_GETTOOLTIPS, 0, 0);
+ long /*int*/ hwndShell = parent.getShell ().handle;
+ long /*int*/ hwndToolTip = OS.SendMessage (handle, OS.TB_GETTOOLTIPS, 0, 0);
OS.SetWindowLongPtr (hwndToolTip, OS.GWLP_HWNDPARENT, hwndShell);
return true;
}
@@ -1111,7 +1111,7 @@ String toolTipText (NMTTDISPINFO hdr) {
*/
if (!hasCursor ()) return ""; //$NON-NLS-1$
int index = (int)/*64*/hdr.idFrom;
- int /*long*/ hwndToolTip = OS.SendMessage (handle, OS.TB_GETTOOLTIPS, 0, 0);
+ long /*int*/ hwndToolTip = OS.SendMessage (handle, OS.TB_GETTOOLTIPS, 0, 0);
if (hwndToolTip == hdr.hwndFrom) {
/*
* Bug in Windows. For some reason the reading order
@@ -1215,11 +1215,11 @@ TCHAR windowClass () {
return ToolBarClass;
}
-int /*long*/ windowProc () {
+long /*int*/ windowProc () {
return ToolBarProc;
}
-LRESULT WM_CAPTURECHANGED (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT WM_CAPTURECHANGED (long /*int*/ wParam, long /*int*/ lParam) {
LRESULT result = super.WM_CAPTURECHANGED (wParam, lParam);
if (result != null) return result;
/*
@@ -1240,7 +1240,7 @@ LRESULT WM_CAPTURECHANGED (int /*long*/ wParam, int /*long*/ lParam) {
return result;
}
-LRESULT WM_CHAR (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT WM_CHAR (long /*int*/ wParam, long /*int*/ lParam) {
LRESULT result = super.WM_CHAR (wParam, lParam);
if (result != null) return result;
switch ((int)/*64*/wParam) {
@@ -1248,7 +1248,7 @@ LRESULT WM_CHAR (int /*long*/ wParam, int /*long*/ lParam) {
int index = (int)/*64*/OS.SendMessage (handle, OS.TB_GETHOTITEM, 0, 0);
if (index != -1) {
TBBUTTON lpButton = new TBBUTTON ();
- int /*long*/ code = OS.SendMessage (handle, OS.TB_GETBUTTON, index, lpButton);
+ long /*int*/ code = OS.SendMessage (handle, OS.TB_GETBUTTON, index, lpButton);
if (code != 0) {
items [lpButton.idCommand].click (false);
return LRESULT.ZERO;
@@ -1258,7 +1258,7 @@ LRESULT WM_CHAR (int /*long*/ wParam, int /*long*/ lParam) {
return result;
}
-LRESULT WM_COMMAND (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT WM_COMMAND (long /*int*/ wParam, long /*int*/ lParam) {
/*
* Feature in Windows. When the toolbar window
* proc processes WM_COMMAND, it forwards this
@@ -1282,7 +1282,7 @@ LRESULT WM_COMMAND (int /*long*/ wParam, int /*long*/ lParam) {
return LRESULT.ZERO;
}
-LRESULT WM_ERASEBKGND (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT WM_ERASEBKGND (long /*int*/ wParam, long /*int*/ lParam) {
LRESULT result = super.WM_ERASEBKGND (wParam, lParam);
/*
* Bug in Windows. For some reason, NM_CUSTOMDRAW with
@@ -1299,7 +1299,7 @@ LRESULT WM_ERASEBKGND (int /*long*/ wParam, int /*long*/ lParam) {
return result;
}
-LRESULT WM_GETDLGCODE (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT WM_GETDLGCODE (long /*int*/ wParam, long /*int*/ lParam) {
LRESULT result = super.WM_GETDLGCODE (wParam, lParam);
/*
* Return DLGC_BUTTON so that mnemonics will be
@@ -1310,7 +1310,7 @@ LRESULT WM_GETDLGCODE (int /*long*/ wParam, int /*long*/ lParam) {
return new LRESULT (OS.DLGC_BUTTON | OS.DLGC_WANTARROWS);
}
-LRESULT WM_KEYDOWN (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT WM_KEYDOWN (long /*int*/ wParam, long /*int*/ lParam) {
LRESULT result = super.WM_KEYDOWN (wParam, lParam);
if (result != null) return result;
switch ((int)/*64*/wParam) {
@@ -1325,25 +1325,25 @@ LRESULT WM_KEYDOWN (int /*long*/ wParam, int /*long*/ lParam) {
return result;
}
-LRESULT WM_KILLFOCUS (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT WM_KILLFOCUS (long /*int*/ wParam, long /*int*/ lParam) {
int index = (int)/*64*/OS.SendMessage (handle, OS.TB_GETHOTITEM, 0, 0);
TBBUTTON lpButton = new TBBUTTON ();
- int /*long*/ code = OS.SendMessage (handle, OS.TB_GETBUTTON, index, lpButton);
+ long /*int*/ code = OS.SendMessage (handle, OS.TB_GETBUTTON, index, lpButton);
if (code != 0) lastFocusId = lpButton.idCommand;
return super.WM_KILLFOCUS (wParam, lParam);
}
-LRESULT WM_LBUTTONDOWN (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT WM_LBUTTONDOWN (long /*int*/ wParam, long /*int*/ lParam) {
if (ignoreMouse) return null;
return super.WM_LBUTTONDOWN (wParam, lParam);
}
-LRESULT WM_LBUTTONUP (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT WM_LBUTTONUP (long /*int*/ wParam, long /*int*/ lParam) {
if (ignoreMouse) return null;
return super.WM_LBUTTONUP (wParam, lParam);
}
-LRESULT WM_MOUSELEAVE (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT WM_MOUSELEAVE (long /*int*/ wParam, long /*int*/ lParam) {
LRESULT result = super.WM_MOUSELEAVE (wParam, lParam);
if (result != null) return result;
/*
@@ -1360,7 +1360,7 @@ LRESULT WM_MOUSELEAVE (int /*long*/ wParam, int /*long*/ lParam) {
if (OS.COMCTL32_MAJOR >= 6) {
TOOLINFO lpti = new TOOLINFO ();
lpti.cbSize = TOOLINFO.sizeof;
- int /*long*/ hwndToolTip = OS.SendMessage (handle, OS.TB_GETTOOLTIPS, 0, 0);
+ long /*int*/ hwndToolTip = OS.SendMessage (handle, OS.TB_GETTOOLTIPS, 0, 0);
if (OS.SendMessage (hwndToolTip, OS.TTM_GETCURRENTTOOL, 0, lpti) != 0) {
if ((lpti.uFlags & OS.TTF_IDISHWND) == 0) {
OS.SendMessage (hwndToolTip, OS.TTM_DELTOOL, 0, lpti);
@@ -1371,12 +1371,12 @@ LRESULT WM_MOUSELEAVE (int /*long*/ wParam, int /*long*/ lParam) {
return result;
}
-LRESULT WM_MOUSEMOVE (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT WM_MOUSEMOVE (long /*int*/ wParam, long /*int*/ lParam) {
if (OS.GetMessagePos () != display.lastMouse) lastArrowId = -1;
return super.WM_MOUSEMOVE (wParam, lParam);
}
-LRESULT WM_NOTIFY (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT WM_NOTIFY (long /*int*/ wParam, long /*int*/ lParam) {
/*
* Feature in Windows. When the toolbar window
* proc processes WM_NOTIFY, it forwards this
@@ -1400,7 +1400,7 @@ LRESULT WM_NOTIFY (int /*long*/ wParam, int /*long*/ lParam) {
return LRESULT.ZERO;
}
-LRESULT WM_SETFOCUS (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT WM_SETFOCUS (long /*int*/ wParam, long /*int*/ lParam) {
LRESULT result = super.WM_SETFOCUS (wParam, lParam);
if (lastFocusId != -1 && handle == OS.GetFocus ()) {
int index = (int)/*64*/OS.SendMessage (handle, OS.TB_COMMANDTOINDEX, lastFocusId, 0);
@@ -1409,9 +1409,9 @@ LRESULT WM_SETFOCUS (int /*long*/ wParam, int /*long*/ lParam) {
return result;
}
-LRESULT WM_SIZE (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT WM_SIZE (long /*int*/ wParam, long /*int*/ lParam) {
if (ignoreResize) {
- int /*long*/ code = callWindowProc (handle, OS.WM_SIZE, wParam, lParam);
+ long /*int*/ code = callWindowProc (handle, OS.WM_SIZE, wParam, lParam);
if (code == 0) return LRESULT.ZERO;
return new LRESULT (code);
}
@@ -1451,7 +1451,7 @@ LRESULT WM_SIZE (int /*long*/ wParam, int /*long*/ lParam) {
return result;
}
-LRESULT WM_WINDOWPOSCHANGING (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT WM_WINDOWPOSCHANGING (long /*int*/ wParam, long /*int*/ lParam) {
LRESULT result = super.WM_WINDOWPOSCHANGING (wParam, lParam);
if (result != null) return result;
if (ignoreResize) return result;
@@ -1493,13 +1493,13 @@ LRESULT WM_WINDOWPOSCHANGING (int /*long*/ wParam, int /*long*/ lParam) {
return result;
}
-LRESULT wmCommandChild (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT wmCommandChild (long /*int*/ wParam, long /*int*/ lParam) {
ToolItem child = items [OS.LOWORD (wParam)];
if (child == null) return null;
return child.wmCommandChild (wParam, lParam);
}
-LRESULT wmNotifyChild (NMHDR hdr, int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT wmNotifyChild (NMHDR hdr, long /*int*/ wParam, long /*int*/ lParam) {
switch (hdr.code) {
case OS.TBN_DROPDOWN:
NMTOOLBAR lpnmtb = new NMTOOLBAR ();
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/ToolItem.java b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/ToolItem.java
index c8caddbbe7..e536d9548f 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/ToolItem.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/ToolItem.java
@@ -176,7 +176,7 @@ protected void checkSubclass () {
}
void click (boolean dropDown) {
- int /*long*/ hwnd = parent.handle;
+ long /*int*/ hwnd = parent.handle;
if (OS.GetKeyState (OS.VK_LBUTTON) < 0) return;
int index = (int)/*64*/OS.SendMessage (hwnd, OS.TB_COMMANDTOINDEX, id, 0);
RECT rect = new RECT ();
@@ -191,7 +191,7 @@ void click (boolean dropDown) {
* properly.
*/
int y = rect.top + (rect.bottom - rect.top) / 2;
- int /*long*/ lParam = OS.MAKELPARAM (dropDown ? rect.right - 1 : rect.left, y);
+ long /*int*/ lParam = OS.MAKELPARAM (dropDown ? rect.right - 1 : rect.left, y);
parent.ignoreMouse = true;
OS.SendMessage (hwnd, OS.WM_LBUTTONDOWN, 0, lParam);
OS.SendMessage (hwnd, OS.WM_LBUTTONUP, 0, lParam);
@@ -233,7 +233,7 @@ void destroyWidget () {
*/
public Rectangle getBounds () {
checkWidget();
- int /*long*/ hwnd = parent.handle;
+ long /*int*/ hwnd = parent.handle;
int index = (int)/*64*/OS.SendMessage (hwnd, OS.TB_COMMANDTOINDEX, id, 0);
RECT rect = new RECT ();
OS.SendMessage (hwnd, OS.TB_GETITEMRECT, index, rect);
@@ -297,8 +297,8 @@ public boolean getEnabled () {
if ((style & SWT.SEPARATOR) != 0) {
return (state & DISABLED) == 0;
}
- int /*long*/ hwnd = parent.handle;
- int /*long*/ fsState = OS.SendMessage (hwnd, OS.TB_GETSTATE, id, 0);
+ long /*int*/ hwnd = parent.handle;
+ long /*int*/ fsState = OS.SendMessage (hwnd, OS.TB_GETSTATE, id, 0);
return (fsState & OS.TBSTATE_ENABLED) != 0;
}
@@ -356,8 +356,8 @@ public ToolBar getParent () {
public boolean getSelection () {
checkWidget();
if ((style & (SWT.CHECK | SWT.RADIO)) == 0) return false;
- int /*long*/ hwnd = parent.handle;
- int /*long*/ fsState = OS.SendMessage (hwnd, OS.TB_GETSTATE, id, 0);
+ long /*int*/ hwnd = parent.handle;
+ long /*int*/ fsState = OS.SendMessage (hwnd, OS.TB_GETSTATE, id, 0);
return (fsState & OS.TBSTATE_CHECKED) != 0;
}
@@ -388,7 +388,7 @@ public String getToolTipText () {
*/
public int getWidth () {
checkWidget();
- int /*long*/ hwnd = parent.handle;
+ long /*int*/ hwnd = parent.handle;
int index = (int)/*64*/OS.SendMessage (hwnd, OS.TB_COMMANDTOINDEX, id, 0);
RECT rect = new RECT ();
OS.SendMessage (hwnd, OS.TB_GETITEMRECT, index, rect);
@@ -449,7 +449,7 @@ void releaseImages () {
TBBUTTONINFO info = new TBBUTTONINFO ();
info.cbSize = TBBUTTONINFO.sizeof;
info.dwMask = OS.TBIF_IMAGE | OS.TBIF_STYLE;
- int /*long*/ hwnd = parent.handle;
+ long /*int*/ hwnd = parent.handle;
OS.SendMessage (hwnd, OS.TB_GETBUTTONINFO, id, info);
/*
* Feature in Windows. For some reason, a tool item that has
@@ -565,7 +565,7 @@ public void setControl (Control control) {
*/
if ((parent.style & (SWT.WRAP | SWT.VERTICAL)) != 0) {
boolean changed = false;
- int /*long*/ hwnd = parent.handle;
+ long /*int*/ hwnd = parent.handle;
TBBUTTONINFO info = new TBBUTTONINFO ();
info.cbSize = TBBUTTONINFO.sizeof;
info.dwMask = OS.TBIF_STYLE | OS.TBIF_STATE;
@@ -628,7 +628,7 @@ public void setControl (Control control) {
*/
public void setEnabled (boolean enabled) {
checkWidget();
- int /*long*/ hwnd = parent.handle;
+ long /*int*/ hwnd = parent.handle;
int fsState = (int)/*64*/OS.SendMessage (hwnd, OS.TB_GETSTATE, id, 0);
/*
* Feature in Windows. When TB_SETSTATE is used to set the
@@ -735,7 +735,7 @@ boolean setRadioSelection (boolean value) {
public void setSelection (boolean selected) {
checkWidget();
if ((style & (SWT.CHECK | SWT.RADIO)) == 0) return;
- int /*long*/ hwnd = parent.handle;
+ long /*int*/ hwnd = parent.handle;
int fsState = (int)/*64*/OS.SendMessage (hwnd, OS.TB_GETSTATE, id, 0);
/*
* Feature in Windows. When TB_SETSTATE is used to set the
@@ -770,7 +770,7 @@ public void setSelection (boolean selected) {
boolean setTabItemFocus () {
if (parent.setTabItemFocus ()) {
- int /*long*/ hwnd = parent.handle;
+ long /*int*/ hwnd = parent.handle;
int index = (int)/*64*/OS.SendMessage (hwnd, OS.TB_COMMANDTOINDEX, id, 0);
OS.SendMessage (hwnd, OS.TB_SETHOTITEM, index, 0);
return true;
@@ -809,12 +809,12 @@ public void setText (String string) {
if ((style & SWT.SEPARATOR) != 0) return;
if (string.equals (text)) return;
super.setText (string);
- int /*long*/ hwnd = parent.handle;
+ long /*int*/ hwnd = parent.handle;
TBBUTTONINFO info = new TBBUTTONINFO ();
info.cbSize = TBBUTTONINFO.sizeof;
info.dwMask = OS.TBIF_TEXT | OS.TBIF_STYLE;
info.fsStyle = (byte) (widgetStyle () | OS.BTNS_AUTOSIZE);
- int /*long*/ hHeap = OS.GetProcessHeap (), pszText = 0;
+ long /*int*/ hHeap = OS.GetProcessHeap (), pszText = 0;
if (string.length () != 0) {
info.fsStyle |= OS.BTNS_SHOWTEXT;
TCHAR buffer = new TCHAR (parent.getCodePage (), string, true);
@@ -835,7 +835,7 @@ public void setText (String string) {
* the tool bar to redraw and layout.
*/
parent.setDropDownItems (false);
- int /*long*/ hFont = OS.SendMessage (hwnd, OS.WM_GETFONT, 0, 0);
+ long /*int*/ hFont = OS.SendMessage (hwnd, OS.WM_GETFONT, 0, 0);
OS.SendMessage (hwnd, OS.WM_SETFONT, hFont, 0);
parent.setDropDownItems (true);
parent.layoutItems ();
@@ -887,7 +887,7 @@ public void setWidth (int width) {
checkWidget();
if ((style & SWT.SEPARATOR) == 0) return;
if (width < 0) return;
- int /*long*/ hwnd = parent.handle;
+ long /*int*/ hwnd = parent.handle;
TBBUTTONINFO info = new TBBUTTONINFO ();
info.cbSize = TBBUTTONINFO.sizeof;
info.dwMask = OS.TBIF_SIZE;
@@ -898,7 +898,7 @@ public void setWidth (int width) {
void updateImages (boolean enabled) {
if ((style & SWT.SEPARATOR) != 0) return;
- int /*long*/ hwnd = parent.handle;
+ long /*int*/ hwnd = parent.handle;
TBBUTTONINFO info = new TBBUTTONINFO ();
info.cbSize = TBBUTTONINFO.sizeof;
info.dwMask = OS.TBIF_IMAGE;
@@ -988,7 +988,7 @@ void updateImages (boolean enabled) {
info.dwMask |= OS.TBIF_SIZE;
info.cx = 0;
OS.SendMessage (hwnd, OS.TB_SETBUTTONINFO, id, info);
- int /*long*/ hFont = OS.SendMessage (hwnd, OS.WM_GETFONT, 0, 0);
+ long /*int*/ hFont = OS.SendMessage (hwnd, OS.WM_GETFONT, 0, 0);
OS.SendMessage (hwnd, OS.WM_SETFONT, hFont, 0);
parent.layoutItems ();
}
@@ -1008,7 +1008,7 @@ int widgetStyle () {
return OS.BTNS_BUTTON;
}
-LRESULT wmCommandChild (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT wmCommandChild (long /*int*/ wParam, long /*int*/ lParam) {
if ((style & SWT.RADIO) != 0) {
if ((parent.getStyle () & SWT.NO_RADIO_GROUP) == 0) {
selectRadio ();
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/ToolTip.java b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/ToolTip.java
index a28bba7e51..0da8f6f6fe 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/ToolTip.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/ToolTip.java
@@ -215,7 +215,7 @@ public boolean getVisible () {
checkWidget();
if (OS.IsWinCE) return false;
if (item != null) return visible;
- int /*long*/ hwndToolTip = hwndToolTip ();
+ long /*int*/ hwndToolTip = hwndToolTip ();
if (OS.SendMessage (hwndToolTip, OS.TTM_GETCURRENTTOOL, 0, 0) != 0) {
TOOLINFO lpti = new TOOLINFO ();
lpti.cbSize = TOOLINFO.sizeof;
@@ -226,7 +226,7 @@ public boolean getVisible () {
return false;
}
-int /*long*/ hwndToolTip () {
+long /*int*/ hwndToolTip () {
return (style & SWT.BALLOON) != 0 ? parent.balloonTipHandle () : parent.toolTipHandle ();
}
@@ -261,7 +261,7 @@ void releaseWidget () {
super.releaseWidget ();
if (item == null) {
if (autoHide) {
- int /*long*/ hwndToolTip = hwndToolTip ();
+ long /*int*/ hwndToolTip = hwndToolTip ();
if (OS.SendMessage (hwndToolTip, OS.TTM_GETCURRENTTOOL, 0, 0) != 0) {
TOOLINFO lpti = new TOOLINFO ();
lpti.cbSize = TOOLINFO.sizeof;
@@ -443,12 +443,12 @@ public void setVisible (boolean visible) {
if (OS.IsWinCE) return;
if (visible == getVisible ()) return;
if (item == null) {
- int /*long*/ hwnd = parent.handle;
+ long /*int*/ hwnd = parent.handle;
TOOLINFO lpti = new TOOLINFO ();
lpti.cbSize = TOOLINFO.sizeof;
lpti.uId = id;
lpti.hwnd = hwnd;
- int /*long*/ hwndToolTip = hwndToolTip ();
+ long /*int*/ hwndToolTip = hwndToolTip ();
Shell shell = parent.getShell ();
if (text.length () != 0) {
int icon = OS.TTI_NONE;
@@ -465,7 +465,7 @@ public void setVisible (boolean visible) {
OS.SystemParametersInfo (OS.SPI_GETWORKAREA, 0, rect, 0);
maxWidth = (rect.right - rect.left) / 4;
} else {
- int /*long*/ hmonitor = OS.MonitorFromWindow (hwnd, OS.MONITOR_DEFAULTTONEAREST);
+ long /*int*/ hmonitor = OS.MonitorFromWindow (hwnd, OS.MONITOR_DEFAULTTONEAREST);
MONITORINFO lpmi = new MONITORINFO ();
lpmi.cbSize = MONITORINFO.sizeof;
OS.GetMonitorInfo (hmonitor, lpmi);
@@ -481,7 +481,7 @@ public void setVisible (boolean visible) {
nY = pt.y;
}
}
- int /*long*/ lParam = OS.MAKELPARAM (nX, nY);
+ long /*int*/ lParam = OS.MAKELPARAM (nX, nY);
OS.SendMessage (hwndToolTip, OS.TTM_TRACKPOSITION, 0, lParam);
/*
@@ -497,7 +497,7 @@ public void setVisible (boolean visible) {
OS.GetClientRect (hwnd, rect);
OS.MapWindowPoints (hwnd, 0, rect, 2);
if (!OS.PtInRect (rect, pt)) {
- int /*long*/ hCursor = OS.GetCursor ();
+ long /*int*/ hCursor = OS.GetCursor ();
OS.SetCursor (0);
OS.SetCursorPos (rect.left, rect.top);
OS.SendMessage (hwndToolTip, OS.TTM_TRACKACTIVATE, 1, lpti);
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Tracker.java b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Tracker.java
index a181d6eb4f..8a95e01dae 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Tracker.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Tracker.java
@@ -45,11 +45,11 @@ public class Tracker extends Widget {
boolean tracking, cancelled, stippled;
Rectangle [] rectangles = new Rectangle [0], proportions = rectangles;
Rectangle bounds;
- int /*long*/ resizeCursor;
+ long /*int*/ resizeCursor;
Cursor clientCursor;
int cursorOrientation = SWT.NONE;
boolean inEvent = false;
- int /*long*/ hwndTransparent, hwndOpaque, oldTransparentProc, oldOpaqueProc;
+ long /*int*/ hwndTransparent, hwndOpaque, oldTransparentProc, oldOpaqueProc;
int oldX, oldY;
static boolean IsVista = !OS.IsWinCE && OS.WIN32_VERSION >= OS.VERSION (6, 0);
@@ -248,7 +248,7 @@ Point adjustResizeCursor () {
* the appropriate resize cursor.
*/
if (clientCursor == null) {
- int /*long*/ newCursor = 0;
+ long /*int*/ newCursor = 0;
switch (cursorOrientation) {
case SWT.UP:
newCursor = OS.LoadCursor (0, OS.IDC_SIZENS);
@@ -371,9 +371,9 @@ void drawRectangles (Rectangle [] rects, boolean stippled) {
return;
}
int bandWidth = 1;
- int /*long*/ hwndTrack = parent == null ? OS.GetDesktopWindow () : parent.handle;
- int /*long*/ hDC = OS.GetDCEx (hwndTrack, 0, OS.DCX_CACHE);
- int /*long*/ hBitmap = 0, hBrush = 0, oldBrush = 0;
+ long /*int*/ hwndTrack = parent == null ? OS.GetDesktopWindow () : parent.handle;
+ long /*int*/ hDC = OS.GetDCEx (hwndTrack, 0, OS.DCX_CACHE);
+ long /*int*/ hBitmap = 0, hBrush = 0, oldBrush = 0;
if (stippled) {
bandWidth = 3;
byte [] bits = {-86, 0, 85, 0, -86, 0, 85, 0, -86, 0, 85, 0, -86, 0, 85, 0};
@@ -513,7 +513,7 @@ public boolean open () {
null);
OS.SetLayeredWindowAttributes (hwndOpaque, 0xFFFFFF, (byte)0xFF, OS.LWA_COLORKEY | OS.LWA_ALPHA);
newProc = new Callback (this, "transparentProc", 4); //$NON-NLS-1$
- int /*long*/ newProcAddress = newProc.getAddress ();
+ long /*int*/ newProcAddress = newProc.getAddress ();
if (newProcAddress == 0) error (SWT.ERROR_NO_MORE_CALLBACKS);
oldTransparentProc = OS.GetWindowLongPtr (hwndTransparent, OS.GWLP_WNDPROC);
OS.SetWindowLongPtr (hwndTransparent, OS.GWLP_WNDPROC, newProcAddress);
@@ -542,7 +542,7 @@ public boolean open () {
OS.GetModuleHandle (null),
null);
newProc = new Callback (this, "transparentProc", 4); //$NON-NLS-1$
- int /*long*/ newProcAddress = newProc.getAddress ();
+ long /*int*/ newProcAddress = newProc.getAddress ();
if (newProcAddress == 0) error (SWT.ERROR_NO_MORE_CALLBACKS);
oldTransparentProc = OS.GetWindowLongPtr (hwndTransparent, OS.GWLP_WNDPROC);
OS.SetWindowLongPtr (hwndTransparent, OS.GWLP_WNDPROC, newProcAddress);
@@ -869,7 +869,7 @@ public void setStippled (boolean stippled) {
this.stippled = stippled;
}
-int /*long*/ transparentProc (int /*long*/ hwnd, int /*long*/ msg, int /*long*/ wParam, int /*long*/ lParam) {
+long /*int*/ transparentProc (long /*int*/ hwnd, long /*int*/ msg, long /*int*/ wParam, long /*int*/ lParam) {
switch ((int)/*64*/msg) {
/*
* We typically do not want to answer that the transparent window is
@@ -896,9 +896,9 @@ int /*long*/ transparentProc (int /*long*/ hwnd, int /*long*/ msg, int /*long*/
case OS.WM_PAINT:
if (hwndOpaque == hwnd) {
PAINTSTRUCT ps = new PAINTSTRUCT();
- int /*long*/ hDC = OS.BeginPaint (hwnd, ps);
- int /*long*/ hBitmap = 0, hBrush = 0, oldBrush = 0;
- int /*long*/ transparentBrush = OS.CreateSolidBrush(0xFFFFFF);
+ long /*int*/ hDC = OS.BeginPaint (hwnd, ps);
+ long /*int*/ hBitmap = 0, hBrush = 0, oldBrush = 0;
+ long /*int*/ transparentBrush = OS.CreateSolidBrush(0xFFFFFF);
oldBrush = OS.SelectObject (hDC, transparentBrush);
OS.PatBlt (hDC, ps.left, ps.top, ps.right - ps.left, ps.bottom - ps.top, OS.PATCOPY);
OS.SelectObject (hDC, oldBrush);
@@ -953,7 +953,7 @@ void update () {
}
}
-LRESULT wmKeyDown (int /*long*/ hwnd, int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT wmKeyDown (long /*int*/ hwnd, long /*int*/ wParam, long /*int*/ lParam) {
LRESULT result = super.wmKeyDown (hwnd, wParam, lParam);
if (result != null) return result;
boolean isMirrored = parent != null && (parent.style & SWT.MIRRORED) != 0;
@@ -1087,7 +1087,7 @@ LRESULT wmKeyDown (int /*long*/ hwnd, int /*long*/ wParam, int /*long*/ lParam)
return result;
}
-LRESULT wmSysKeyDown (int /*long*/ hwnd, int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT wmSysKeyDown (long /*int*/ hwnd, long /*int*/ wParam, long /*int*/ lParam) {
LRESULT result = super.wmSysKeyDown (hwnd, wParam, lParam);
if (result != null) return result;
cancelled = true;
@@ -1095,7 +1095,7 @@ LRESULT wmSysKeyDown (int /*long*/ hwnd, int /*long*/ wParam, int /*long*/ lPara
return result;
}
-LRESULT wmMouse (int message, int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT wmMouse (int message, long /*int*/ wParam, long /*int*/ lParam) {
boolean isMirrored = parent != null && (parent.style & SWT.MIRRORED) != 0;
int newPos = OS.GetMessagePos ();
int newX = OS.GET_X_LPARAM (newPos);
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/TrayItem.java b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/TrayItem.java
index 969b2595b9..d0bc4c0134 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/TrayItem.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/TrayItem.java
@@ -245,7 +245,7 @@ public boolean getVisible () {
return visible;
}
-int /*long*/ messageProc (int /*long*/ hwnd, int msg, int /*long*/ wParam, int /*long*/ lParam) {
+long /*int*/ messageProc (long /*int*/ hwnd, int msg, long /*int*/ wParam, long /*int*/ lParam) {
/*
* Feature in Windows. When the user clicks on the tray
* icon, another application may be the foreground window.
@@ -439,7 +439,7 @@ public void setImage (Image image) {
super.setImage (image);
if (image2 != null) image2.dispose ();
image2 = null;
- int /*long*/ hIcon = 0;
+ long /*int*/ hIcon = 0;
Image icon = image;
if (icon != null) {
switch (icon.type) {
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Tree.java b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Tree.java
index 71b64db533..c2f1d48474 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Tree.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Tree.java
@@ -82,9 +82,9 @@ public class Tree extends Composite {
TreeItem currentItem;
TreeColumn sortColumn;
RECT focusRect;
- int /*long*/ hwndParent, hwndHeader, hAnchor, hInsert, hSelect;
+ long /*int*/ hwndParent, hwndHeader, hAnchor, hInsert, hSelect;
int lastID;
- int /*long*/ hFirstIndexOf, hLastIndexOf;
+ long /*int*/ hFirstIndexOf, hLastIndexOf;
int lastIndexOf, itemCount, sortDirection;
boolean dragStarted, gestureCompleted, insertAfter, shrink, ignoreShrink;
boolean ignoreSelect, ignoreExpand, ignoreDeselect, ignoreResize;
@@ -94,8 +94,8 @@ public class Tree extends Composite {
boolean ignoreDrawSelection, ignoreDrawHot, ignoreFullSelection, explorerTheme;
boolean createdAsRTL;
int scrollWidth, selectionForeground;
- int /*long*/ headerToolTipHandle, itemToolTipHandle;
- int /*long*/ lastTimerID = -1;
+ long /*int*/ headerToolTipHandle, itemToolTipHandle;
+ long /*int*/ lastTimerID = -1;
int lastTimerCount;
static final boolean ENABLE_TVS_EX_FADEINOUTEXPANDOS = System.getProperty("org.eclipse.swt.internal.win32.enableFadeInOutExpandos") != null;
static final int TIMER_MAX_COUNT = 8;
@@ -108,9 +108,9 @@ public class Tree extends Composite {
static final int EXPLORER_EXTRA = 2;
static final int DRAG_IMAGE_SIZE = 301;
static final boolean EXPLORER_THEME = true;
- static final int /*long*/ TreeProc;
+ static final long /*int*/ TreeProc;
static final TCHAR TreeClass = new TCHAR (0, OS.WC_TREEVIEW, true);
- static final int /*long*/ HeaderProc;
+ static final long /*int*/ HeaderProc;
static final TCHAR HeaderClass = new TCHAR (0, OS.WC_HEADER, true);
static {
WNDCLASS lpWndClass = new WNDCLASS ();
@@ -240,7 +240,7 @@ void _addListener (int eventType, Listener listener) {
}
}
-TreeItem _getItem (int /*long*/ hItem) {
+TreeItem _getItem (long /*int*/ hItem) {
TVITEM tvItem = new TVITEM ();
tvItem.mask = OS.TVIF_HANDLE | OS.TVIF_PARAM;
tvItem.hItem = hItem;
@@ -250,7 +250,7 @@ TreeItem _getItem (int /*long*/ hItem) {
return null;
}
-TreeItem _getItem (int /*long*/ hItem, int id) {
+TreeItem _getItem (long /*int*/ hItem, int id) {
if ((style & SWT.VIRTUAL) == 0) return items [id];
return id != -1 ? items [id] : new TreeItem (this, SWT.NONE, -1, -1, hItem);
}
@@ -355,14 +355,14 @@ public void addTreeListener(TreeListener listener) {
addListener (SWT.Collapse, typedListener);
}
-int /*long*/ borderHandle () {
+long /*int*/ borderHandle () {
return hwndParent != 0 ? hwndParent : handle;
}
-LRESULT CDDS_ITEMPOSTPAINT (NMTVCUSTOMDRAW nmcd, int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT CDDS_ITEMPOSTPAINT (NMTVCUSTOMDRAW nmcd, long /*int*/ wParam, long /*int*/ lParam) {
if (ignoreCustomDraw) return null;
if (nmcd.left == nmcd.right) return new LRESULT (OS.CDRF_DODEFAULT);
- int /*long*/ hDC = nmcd.hdc;
+ long /*int*/ hDC = nmcd.hdc;
OS.RestoreDC (hDC, -1);
TreeItem item = getItem (nmcd);
@@ -477,7 +477,7 @@ LRESULT CDDS_ITEMPOSTPAINT (NMTVCUSTOMDRAW nmcd, int /*long*/ wParam, int /*long
}
}
draw = false;
- int /*long*/ hTheme = OS.OpenThemeData (handle, Display.TREEVIEW);
+ long /*int*/ hTheme = OS.OpenThemeData (handle, Display.TREEVIEW);
int iStateId = selected ? OS.TREIS_SELECTED : OS.TREIS_HOT;
if (OS.GetFocus () != handle && selected && !hot) iStateId = OS.TREIS_SELECTEDNOTFOCUS;
OS.DrawThemeBackground (hTheme, hDC, OS.TVP_TREEITEM, iStateId, pRect, pClipRect);
@@ -547,7 +547,7 @@ LRESULT CDDS_ITEMPOSTPAINT (NMTVCUSTOMDRAW nmcd, int /*long*/ wParam, int /*long
backgroundRect = rect;
}
int clrText = -1, clrTextBk = -1;
- int /*long*/ hFont = item.fontHandle (index);
+ long /*int*/ hFont = item.fontHandle (index);
if (selectionForeground != -1) clrText = selectionForeground;
if (OS.IsWindowEnabled (handle)) {
boolean drawForeground = false;
@@ -692,7 +692,7 @@ LRESULT CDDS_ITEMPOSTPAINT (NMTVCUSTOMDRAW nmcd, int /*long*/ wParam, int /*long
backgroundRect = selectionRect;
}
}
- int /*long*/ hTheme = OS.OpenThemeData (handle, Display.TREEVIEW);
+ long /*int*/ hTheme = OS.OpenThemeData (handle, Display.TREEVIEW);
int iStateId = selected ? OS.TREIS_SELECTED : OS.TREIS_HOT;
if (OS.GetFocus () != handle && selected && !hot) iStateId = OS.TREIS_SELECTEDNOTFOCUS;
OS.DrawThemeBackground (hTheme, hDC, OS.TVP_TREEITEM, iStateId, pRect, backgroundRect);
@@ -885,7 +885,7 @@ LRESULT CDDS_ITEMPOSTPAINT (NMTVCUSTOMDRAW nmcd, int /*long*/ wParam, int /*long
if (handle == OS.GetFocus ()) {
int uiState = (int)/*64*/OS.SendMessage (handle, OS.WM_QUERYUISTATE, 0, 0);
if ((uiState & OS.UISF_HIDEFOCUS) == 0) {
- int /*long*/ hItem = OS.SendMessage (handle, OS.TVM_GETNEXTITEM, OS.TVGN_CARET, 0);
+ long /*int*/ hItem = OS.SendMessage (handle, OS.TVM_GETNEXTITEM, OS.TVGN_CARET, 0);
if (hItem == item.handle) {
if (!ignoreDrawFocus && findImageControl () != null) {
if ((style & SWT.FULL_SELECTION) != 0) {
@@ -909,7 +909,7 @@ LRESULT CDDS_ITEMPOSTPAINT (NMTVCUSTOMDRAW nmcd, int /*long*/ wParam, int /*long
return new LRESULT (OS.CDRF_DODEFAULT);
}
-LRESULT CDDS_ITEMPREPAINT (NMTVCUSTOMDRAW nmcd, int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT CDDS_ITEMPREPAINT (NMTVCUSTOMDRAW nmcd, long /*int*/ wParam, long /*int*/ lParam) {
/*
* Even when custom draw is being ignored, the font needs
* to be selected into the HDC so that the item bounds are
@@ -927,9 +927,9 @@ LRESULT CDDS_ITEMPREPAINT (NMTVCUSTOMDRAW nmcd, int /*long*/ wParam, int /*long*
* COMCTL32.DLL,
*/
if (item == null) return null;
- int /*long*/ hDC = nmcd.hdc;
+ long /*int*/ hDC = nmcd.hdc;
int index = hwndHeader != 0 ? (int)/*64*/OS.SendMessage (hwndHeader, OS.HDM_ORDERTOINDEX, 0, 0) : 0;
- int /*long*/ hFont = item.fontHandle (index);
+ long /*int*/ hFont = item.fontHandle (index);
if (hFont != -1) OS.SelectObject (hDC, hFont);
if (ignoreCustomDraw || nmcd.left == nmcd.right) {
return new LRESULT (hFont == -1 ? OS.CDRF_DODEFAULT : OS.CDRF_NEWFONT);
@@ -1090,7 +1090,7 @@ LRESULT CDDS_ITEMPREPAINT (NMTVCUSTOMDRAW nmcd, int /*long*/ wParam, int /*long*
}
pRect.left -= EXPLORER_EXTRA;
pClipRect.left -= EXPLORER_EXTRA;
- int /*long*/ hTheme = OS.OpenThemeData (handle, Display.TREEVIEW);
+ long /*int*/ hTheme = OS.OpenThemeData (handle, Display.TREEVIEW);
int iStateId = selected ? OS.TREIS_SELECTED : OS.TREIS_HOT;
if (OS.GetFocus () != handle && selected && !hot) iStateId = OS.TREIS_SELECTEDNOTFOCUS;
OS.DrawThemeBackground (hTheme, hDC, OS.TVP_TREEITEM, iStateId, pRect, pClipRect);
@@ -1305,7 +1305,7 @@ LRESULT CDDS_ITEMPREPAINT (NMTVCUSTOMDRAW nmcd, int /*long*/ wParam, int /*long*
}
OS.SaveDC (hDC);
if (clipRect != null) {
- int /*long*/ hRgn = OS.CreateRectRgn (clipRect.left, clipRect.top, clipRect.right, clipRect.bottom);
+ long /*int*/ hRgn = OS.CreateRectRgn (clipRect.left, clipRect.top, clipRect.right, clipRect.bottom);
POINT lpPoint = new POINT ();
OS.GetWindowOrgEx (hDC, lpPoint);
OS.OffsetRgn (hRgn, -lpPoint.x, -lpPoint.y);
@@ -1315,7 +1315,7 @@ LRESULT CDDS_ITEMPREPAINT (NMTVCUSTOMDRAW nmcd, int /*long*/ wParam, int /*long*
return result;
}
-LRESULT CDDS_POSTPAINT (NMTVCUSTOMDRAW nmcd, int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT CDDS_POSTPAINT (NMTVCUSTOMDRAW nmcd, long /*int*/ wParam, long /*int*/ lParam) {
if (ignoreCustomDraw) return null;
if (OS.IsWindowVisible (handle)) {
if (OS.COMCTL32_MAJOR >= 6 && OS.IsAppThemed ()) {
@@ -1340,7 +1340,7 @@ LRESULT CDDS_POSTPAINT (NMTVCUSTOMDRAW nmcd, int /*long*/ wParam, int /*long*/ l
* NOTE: This problem only happens on Vista during
* WM_NOTIFY with NM_CUSTOMDRAW and CDDS_POSTPAINT.
*/
- int /*long*/ hItem = 0;
+ long /*int*/ hItem = 0;
if (!OS.IsWinCE && OS.WIN32_VERSION >= OS.VERSION (6, 0)) {
hItem = getBottomItem ();
} else {
@@ -1364,7 +1364,7 @@ LRESULT CDDS_POSTPAINT (NMTVCUSTOMDRAW nmcd, int /*long*/ wParam, int /*long*/ l
}
}
if (linesVisible) {
- int /*long*/ hDC = nmcd.hdc;
+ long /*int*/ hDC = nmcd.hdc;
if (hwndHeader != 0) {
int x = 0;
RECT rect = new RECT ();
@@ -1396,7 +1396,7 @@ LRESULT CDDS_POSTPAINT (NMTVCUSTOMDRAW nmcd, int /*long*/ wParam, int /*long*/ l
* NOTE: This problem only happens on Vista during
* WM_NOTIFY with NM_CUSTOMDRAW and CDDS_POSTPAINT.
*/
- int /*long*/ hItem = 0;
+ long /*int*/ hItem = 0;
if (!OS.IsWinCE && OS.WIN32_VERSION >= OS.VERSION (6, 0)) {
hItem = getBottomItem ();
} else {
@@ -1425,7 +1425,7 @@ LRESULT CDDS_POSTPAINT (NMTVCUSTOMDRAW nmcd, int /*long*/ wParam, int /*long*/ l
return new LRESULT (OS.CDRF_DODEFAULT);
}
-LRESULT CDDS_PREPAINT (NMTVCUSTOMDRAW nmcd, int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT CDDS_PREPAINT (NMTVCUSTOMDRAW nmcd, long /*int*/ wParam, long /*int*/ lParam) {
if (explorerTheme) {
if ((OS.IsWindowEnabled (handle) && hooks (SWT.EraseItem)) || findImageControl () != null) {
RECT rect = new RECT ();
@@ -1436,7 +1436,7 @@ LRESULT CDDS_PREPAINT (NMTVCUSTOMDRAW nmcd, int /*long*/ wParam, int /*long*/ lP
return new LRESULT (OS.CDRF_NOTIFYITEMDRAW | OS.CDRF_NOTIFYPOSTPAINT);
}
-int /*long*/ callWindowProc (int /*long*/ hwnd, int msg, int /*long*/ wParam, int /*long*/ lParam) {
+long /*int*/ callWindowProc (long /*int*/ hwnd, int msg, long /*int*/ wParam, long /*int*/ lParam) {
if (handle == 0) return 0;
if (hwndParent != 0 && hwnd == hwndParent) {
return OS.DefWindowProc (hwnd, msg, wParam, lParam);
@@ -1455,7 +1455,7 @@ int /*long*/ callWindowProc (int /*long*/ hwnd, int msg, int /*long*/ wParam, in
* only the focus is assigned.
*/
if ((style & SWT.SINGLE) != 0) break;
- int /*long*/ hItem = OS.SendMessage (handle, OS.TVM_GETNEXTITEM, OS.TVGN_CARET, 0);
+ long /*int*/ hItem = OS.SendMessage (handle, OS.TVM_GETNEXTITEM, OS.TVGN_CARET, 0);
if (hItem == 0) {
hItem = OS.SendMessage (handle, OS.TVM_GETNEXTITEM, OS.TVGN_FIRSTVISIBLE, 0);
if (hItem != 0) {
@@ -1476,7 +1476,7 @@ int /*long*/ callWindowProc (int /*long*/ hwnd, int msg, int /*long*/ wParam, in
break;
}
}
- int /*long*/ hItem = 0;
+ long /*int*/ hItem = 0;
boolean redraw = false;
switch (msg) {
/* Keyboard messages */
@@ -1531,7 +1531,7 @@ int /*long*/ callWindowProc (int /*long*/ hwnd, int msg, int /*long*/ wParam, in
break;
}
}
- int /*long*/ code = OS.CallWindowProc (TreeProc, hwnd, msg, wParam, lParam);
+ long /*int*/ code = OS.CallWindowProc (TreeProc, hwnd, msg, wParam, lParam);
switch (msg) {
/* Keyboard messages */
case OS.WM_KEYDOWN:
@@ -1635,7 +1635,7 @@ boolean checkData (TreeItem item, int index, boolean redraw) {
* is to detect that the top item has changed and redraw
* the entire tree.
*/
- int /*long*/ hTopItem = OS.SendMessage (handle, OS.TVM_GETNEXTITEM, OS.TVGN_FIRSTVISIBLE, 0);
+ long /*int*/ hTopItem = OS.SendMessage (handle, OS.TVM_GETNEXTITEM, OS.TVGN_FIRSTVISIBLE, 0);
sendEvent (SWT.SetData, event);
//widget could be disposed at this point
currentItem = oldItem;
@@ -1648,11 +1648,11 @@ boolean checkData (TreeItem item, int index, boolean redraw) {
return true;
}
-boolean checkHandle (int /*long*/ hwnd) {
+boolean checkHandle (long /*int*/ hwnd) {
return hwnd == handle || (hwndParent != 0 && hwnd == hwndParent) || (hwndHeader != 0 && hwnd == hwndHeader);
}
-boolean checkScroll (int /*long*/ hItem) {
+boolean checkScroll (long /*int*/ hItem) {
/*
* Feature in Windows. If redraw is turned off using WM_SETREDRAW
* and a tree item that is not a child of the first root is selected or
@@ -1665,8 +1665,8 @@ boolean checkScroll (int /*long*/ hItem) {
* callers of this method.
*/
if (getDrawing ()) return false;
- int /*long*/ hRoot = OS.SendMessage (handle, OS.TVM_GETNEXTITEM, OS.TVGN_ROOT, 0);
- int /*long*/ hParent = OS.SendMessage (handle, OS.TVM_GETNEXTITEM, OS.TVGN_PARENT, hItem);
+ long /*int*/ hRoot = OS.SendMessage (handle, OS.TVM_GETNEXTITEM, OS.TVGN_ROOT, 0);
+ long /*int*/ hParent = OS.SendMessage (handle, OS.TVM_GETNEXTITEM, OS.TVGN_PARENT, hItem);
while (hParent != hRoot && hParent != 0) {
hParent = OS.SendMessage (handle, OS.TVM_GETNEXTITEM, OS.TVGN_PARENT, hParent);
}
@@ -1702,7 +1702,7 @@ protected void checkSubclass () {
*/
public void clear (int index, boolean all) {
checkWidget ();
- int /*long*/ hItem = OS.SendMessage (handle, OS.TVM_GETNEXTITEM, OS.TVGN_ROOT, 0);
+ long /*int*/ hItem = OS.SendMessage (handle, OS.TVM_GETNEXTITEM, OS.TVGN_ROOT, 0);
if (hItem == 0) error (SWT.ERROR_INVALID_RANGE);
hItem = findItem (hItem, index);
if (hItem == 0) error (SWT.ERROR_INVALID_RANGE);
@@ -1715,7 +1715,7 @@ public void clear (int index, boolean all) {
}
}
-void clear (int /*long*/ hItem, TVITEM tvItem) {
+void clear (long /*int*/ hItem, TVITEM tvItem) {
tvItem.hItem = hItem;
TreeItem item = null;
if (OS.SendMessage (handle, OS.TVM_GETITEM, 0, tvItem) != 0) {
@@ -1749,7 +1749,7 @@ void clear (int /*long*/ hItem, TVITEM tvItem) {
*/
public void clearAll (boolean all) {
checkWidget ();
- int /*long*/ hItem = OS.SendMessage (handle, OS.TVM_GETNEXTITEM, OS.TVGN_ROOT, 0);
+ long /*int*/ hItem = OS.SendMessage (handle, OS.TVM_GETNEXTITEM, OS.TVGN_ROOT, 0);
if (hItem == 0) return;
if (all) {
boolean redraw = false;
@@ -1768,18 +1768,18 @@ public void clearAll (boolean all) {
}
}
-void clearAll (int /*long*/ hItem, TVITEM tvItem, boolean all) {
+void clearAll (long /*int*/ hItem, TVITEM tvItem, boolean all) {
while (hItem != 0) {
clear (hItem, tvItem);
if (all) {
- int /*long*/ hFirstItem = OS.SendMessage (handle, OS.TVM_GETNEXTITEM, OS.TVGN_CHILD, hItem);
+ long /*int*/ hFirstItem = OS.SendMessage (handle, OS.TVM_GETNEXTITEM, OS.TVGN_CHILD, hItem);
clearAll (hFirstItem, tvItem, all);
}
hItem = OS.SendMessage (handle, OS.TVM_GETNEXTITEM, OS.TVGN_NEXT, hItem);
}
}
-int /*long*/ CompareFunc (int /*long*/ lParam1, int /*long*/ lParam2, int /*long*/ lParamSort) {
+long /*int*/ CompareFunc (long /*int*/ lParam1, long /*int*/ lParam2, long /*int*/ lParamSort) {
TreeItem item1 = items [(int)/*64*/lParam1], item2 = items [(int)/*64*/lParam2];
String text1 = item1.getText ((int)/*64*/lParamSort), text2 = item2.getText ((int)/*64*/lParamSort);
return sortDirection == SWT.UP ? text1.compareTo (text2) : text2.compareTo (text1);
@@ -1800,7 +1800,7 @@ public Point computeSize (int wHint, int hHint, boolean changed) {
height += rect.bottom - rect.top;
}
RECT rect = new RECT ();
- int /*long*/ hItem = OS.SendMessage (handle, OS.TVM_GETNEXTITEM, OS.TVGN_ROOT, 0);
+ long /*int*/ hItem = OS.SendMessage (handle, OS.TVM_GETNEXTITEM, OS.TVGN_ROOT, 0);
while (hItem != 0) {
if ((style & SWT.VIRTUAL) == 0 && !painted) {
TVITEM tvItem = new TVITEM ();
@@ -1890,7 +1890,7 @@ void createHandle () {
* The control will not destroy a font that it did not
* create.
*/
- int /*long*/ hFont = OS.GetStockObject (OS.SYSTEM_FONT);
+ long /*int*/ hFont = OS.GetStockObject (OS.SYSTEM_FONT);
OS.SendMessage (handle, OS.WM_SETFONT, hFont, 0);
createdAsRTL = (style & SWT.RIGHT_TO_LEFT) != 0;
@@ -1997,8 +1997,8 @@ void createItem (TreeColumn column, int index) {
* if is not possible to set the text at a later time.
* The fix is to insert the item with an empty string.
*/
- int /*long*/ hHeap = OS.GetProcessHeap ();
- int /*long*/ pszText = OS.HeapAlloc (hHeap, OS.HEAP_ZERO_MEMORY, TCHAR.sizeof);
+ long /*int*/ hHeap = OS.GetProcessHeap ();
+ long /*int*/ pszText = OS.HeapAlloc (hHeap, OS.HEAP_ZERO_MEMORY, TCHAR.sizeof);
HDITEM hdItem = new HDITEM ();
hdItem.mask = OS.HDI_TEXT | OS.HDI_FORMAT;
hdItem.pszText = pszText;
@@ -2059,7 +2059,7 @@ void createItem (TreeColumn column, int index) {
}
}
-void createItem (TreeItem item, int /*long*/ hParent, int /*long*/ hInsertAfter, int /*long*/ hItem) {
+void createItem (TreeItem item, long /*int*/ hParent, long /*int*/ hInsertAfter, long /*int*/ hItem) {
int id = -1;
if (item != null) {
id = lastID < items.length ? lastID : 0;
@@ -2084,8 +2084,8 @@ void createItem (TreeItem item, int /*long*/ hParent, int /*long*/ hInsertAfter,
}
lastID = id + 1;
}
- int /*long*/ hNewItem = 0;
- int /*long*/ hFirstItem = OS.SendMessage (handle, OS.TVM_GETNEXTITEM, OS.TVGN_CHILD, hParent);
+ long /*int*/ hNewItem = 0;
+ long /*int*/ hFirstItem = OS.SendMessage (handle, OS.TVM_GETNEXTITEM, OS.TVGN_CHILD, hParent);
boolean fixParent = hFirstItem == 0;
if (hItem == 0) {
TVINSERTSTRUCT tvInsert = new TVINSERTSTRUCT ();
@@ -2164,7 +2164,7 @@ void createItem (TreeItem item, int /*long*/ hParent, int /*long*/ hInsertAfter,
OS.OffsetRect (damageRect, 0, rect.bottom - rect.top);
OS.InvalidateRect (handle, damageRect, true);
} else {
- int /*long*/ rgn = OS.CreateRectRgn (0, 0, 0, 0);
+ long /*int*/ rgn = OS.CreateRectRgn (0, 0, 0, 0);
int result = OS.GetUpdateRgn (handle, rgn, true);
if (result != OS.NULLREGION) {
OS.OffsetRgn (rgn, 0, rect.bottom - rect.top);
@@ -2264,7 +2264,7 @@ void createParent () {
if (hwndHeader == 0) error (SWT.ERROR_NO_HANDLES);
OS.SetWindowLongPtr (hwndHeader, OS.GWLP_ID, hwndHeader);
if (OS.IsDBLocale) {
- int /*long*/ hIMC = OS.ImmGetContext (handle);
+ long /*int*/ hIMC = OS.ImmGetContext (handle);
OS.ImmAssociateContext (hwndParent, hIMC);
OS.ImmAssociateContext (hwndHeader, hIMC);
OS.ImmReleaseContext (handle, hIMC);
@@ -2277,9 +2277,9 @@ void createParent () {
// OS.SetWindowLong (handle, OS.GWL_EXSTYLE, oldExStyle);
// }
// }
- int /*long*/ hFont = OS.SendMessage (handle, OS.WM_GETFONT, 0, 0);
+ long /*int*/ hFont = OS.SendMessage (handle, OS.WM_GETFONT, 0, 0);
if (hFont != 0) OS.SendMessage (hwndHeader, OS.WM_SETFONT, hFont, 0);
- int /*long*/ hwndInsertAfter = OS.GetWindow (handle, OS.GW_HWNDPREV);
+ long /*int*/ hwndInsertAfter = OS.GetWindow (handle, OS.GW_HWNDPREV);
int flags = OS.SWP_NOSIZE | OS.SWP_NOMOVE | OS.SWP_NOACTIVATE;
SetWindowPos (hwndParent, hwndInsertAfter, 0, 0, 0, 0, flags);
SCROLLINFO info = new SCROLLINFO ();
@@ -2296,7 +2296,7 @@ void createParent () {
if ((oldStyle & OS.WS_VISIBLE) != 0) {
OS.ShowWindow (hwndParent, OS.SW_SHOW);
}
- int /*long*/ hwndFocus = OS.GetFocus ();
+ long /*int*/ hwndFocus = OS.GetFocus ();
if (hwndFocus == handle) OS.SetFocus (hwndParent);
OS.SetParent (handle, hwndParent);
if (hwndFocus == handle) OS.SetFocus (handle);
@@ -2321,13 +2321,13 @@ void deregister () {
if (hwndHeader != 0) display.removeControl (hwndHeader);
}
-void deselect (int /*long*/ hItem, TVITEM tvItem, int /*long*/ hIgnoreItem) {
+void deselect (long /*int*/ hItem, TVITEM tvItem, long /*int*/ hIgnoreItem) {
while (hItem != 0) {
if (hItem != hIgnoreItem) {
tvItem.hItem = hItem;
OS.SendMessage (handle, OS.TVM_SETITEM, 0, tvItem);
}
- int /*long*/ hFirstItem = OS.SendMessage (handle, OS.TVM_GETNEXTITEM, OS.TVGN_CHILD, hItem);
+ long /*int*/ hFirstItem = OS.SendMessage (handle, OS.TVM_GETNEXTITEM, OS.TVGN_CHILD, hItem);
deselect (hFirstItem, tvItem, hIgnoreItem);
hItem = OS.SendMessage (handle, OS.TVM_GETNEXTITEM, OS.TVGN_NEXT, hItem);
}
@@ -2375,16 +2375,16 @@ public void deselectAll () {
tvItem.mask = OS.TVIF_HANDLE | OS.TVIF_STATE;
tvItem.stateMask = OS.TVIS_SELECTED;
if ((style & SWT.SINGLE) != 0) {
- int /*long*/ hItem = OS.SendMessage (handle, OS.TVM_GETNEXTITEM, OS.TVGN_CARET, 0);
+ long /*int*/ hItem = OS.SendMessage (handle, OS.TVM_GETNEXTITEM, OS.TVGN_CARET, 0);
if (hItem != 0) {
tvItem.hItem = hItem;
OS.SendMessage (handle, OS.TVM_SETITEM, 0, tvItem);
}
} else {
- int /*long*/ oldProc = OS.GetWindowLongPtr (handle, OS.GWLP_WNDPROC);
+ long /*int*/ oldProc = OS.GetWindowLongPtr (handle, OS.GWLP_WNDPROC);
OS.SetWindowLongPtr (handle, OS.GWLP_WNDPROC, TreeProc);
if ((style & SWT.VIRTUAL) != 0) {
- int /*long*/ hItem = OS.SendMessage (handle, OS.TVM_GETNEXTITEM, OS.TVGN_ROOT, 0);
+ long /*int*/ hItem = OS.SendMessage (handle, OS.TVM_GETNEXTITEM, OS.TVGN_ROOT, 0);
deselect (hItem, tvItem, 0);
} else {
for (int i=0; i<items.length; i++) {
@@ -2537,7 +2537,7 @@ void destroyItem (TreeColumn column) {
}
}
-void destroyItem (TreeItem item, int /*long*/ hItem) {
+void destroyItem (TreeItem item, long /*int*/ hItem) {
hFirstIndexOf = hLastIndexOf = 0;
itemCount = -1;
/*
@@ -2555,7 +2555,7 @@ void destroyItem (TreeItem item, int /*long*/ hItem) {
* allowing application code to add or remove items during
* this remove operation.
*/
- int /*long*/ hParent = 0;
+ long /*int*/ hParent = 0;
boolean fixRedraw = false;
if ((style & SWT.DOUBLE_BUFFERED) == 0) {
if (getDrawing () && OS.IsWindowVisible (handle)) {
@@ -2587,7 +2587,7 @@ void destroyItem (TreeItem item, int /*long*/ hItem) {
* NOTE: This only happens on Vista.
*/
if (!OS.IsWinCE && OS.WIN32_VERSION >= OS.VERSION (6, 0)) {
- int /*long*/ hwndToolTip = OS.SendMessage (handle, OS.TVM_GETTOOLTIPS, 0, 0);
+ long /*int*/ hwndToolTip = OS.SendMessage (handle, OS.TVM_GETTOOLTIPS, 0, 0);
if (hwndToolTip != 0) OS.SendMessage (hwndToolTip, OS.TTM_POP, 0 ,0);
}
@@ -2704,8 +2704,8 @@ boolean findCell (int x, int y, TreeItem [] item, int [] index, RECT [] cellRect
POINT pt = new POINT ();
pt.x = x;
pt.y = y;
- int /*long*/ hDC = OS.GetDC (handle);
- int /*long*/ oldFont = 0, newFont = OS.SendMessage (handle, OS.WM_GETFONT, 0, 0);
+ long /*int*/ hDC = OS.GetDC (handle);
+ long /*int*/ oldFont = 0, newFont = OS.SendMessage (handle, OS.WM_GETFONT, 0, 0);
if (newFont != 0) oldFont = OS.SelectObject (hDC, newFont);
RECT rect = new RECT ();
if (hwndParent != 0) {
@@ -2720,7 +2720,7 @@ boolean findCell (int x, int y, TreeItem [] item, int [] index, RECT [] cellRect
index [0] = 0;
boolean quit = false;
while (index [0] < count && !quit) {
- int /*long*/ hFont = item [0].fontHandle (order [index [0]]);
+ long /*int*/ hFont = item [0].fontHandle (order [index [0]]);
if (hFont != -1) hFont = OS.SelectObject (hDC, hFont);
cellRect [0] = item [0].getBounds (order [index [0]], true, false, true, false, true, hDC);
if (cellRect [0].left > rect.right) {
@@ -2754,7 +2754,7 @@ boolean findCell (int x, int y, TreeItem [] item, int [] index, RECT [] cellRect
return found;
}
-int findIndex (int /*long*/ hFirstItem, int /*long*/ hItem) {
+int findIndex (long /*int*/ hFirstItem, long /*int*/ hItem) {
if (hFirstItem == 0) return -1;
if (hFirstItem == hFirstIndexOf) {
if (hFirstIndexOf == hItem) {
@@ -2762,12 +2762,12 @@ int findIndex (int /*long*/ hFirstItem, int /*long*/ hItem) {
return lastIndexOf = 0;
}
if (hLastIndexOf == hItem) return lastIndexOf;
- int /*long*/ hPrevItem = OS.SendMessage (handle, OS.TVM_GETNEXTITEM, OS.TVGN_PREVIOUS, hLastIndexOf);
+ long /*int*/ hPrevItem = OS.SendMessage (handle, OS.TVM_GETNEXTITEM, OS.TVGN_PREVIOUS, hLastIndexOf);
if (hPrevItem == hItem) {
hLastIndexOf = hPrevItem;
return --lastIndexOf;
}
- int /*long*/ hNextItem = OS.SendMessage (handle, OS.TVM_GETNEXTITEM, OS.TVGN_NEXT, hLastIndexOf);
+ long /*int*/ hNextItem = OS.SendMessage (handle, OS.TVM_GETNEXTITEM, OS.TVGN_NEXT, hLastIndexOf);
if (hNextItem == hItem) {
hLastIndexOf = hNextItem;
return ++lastIndexOf;
@@ -2793,7 +2793,7 @@ int findIndex (int /*long*/ hFirstItem, int /*long*/ hItem) {
return -1;
}
int index = 0;
- int /*long*/ hNextItem = hFirstItem;
+ long /*int*/ hNextItem = hFirstItem;
while (hNextItem != 0 && hNextItem != hItem) {
hNextItem = OS.SendMessage (handle, OS.TVM_GETNEXTITEM, OS.TVGN_NEXT, hNextItem);
index++;
@@ -2807,11 +2807,11 @@ int findIndex (int /*long*/ hFirstItem, int /*long*/ hItem) {
return -1;
}
-Widget findItem (int /*long*/ hItem) {
+Widget findItem (long /*int*/ hItem) {
return _getItem (hItem);
}
-int /*long*/ findItem (int /*long*/ hFirstItem, int index) {
+long /*int*/ findItem (long /*int*/ hFirstItem, int index) {
if (hFirstItem == 0) return 0;
if (hFirstItem == hFirstIndexOf) {
if (index == 0) {
@@ -2829,7 +2829,7 @@ int /*long*/ findItem (int /*long*/ hFirstItem, int index) {
}
if (index < lastIndexOf) {
int previousIndex = lastIndexOf - 1;
- int /*long*/ hPrevItem = OS.SendMessage (handle, OS.TVM_GETNEXTITEM, OS.TVGN_PREVIOUS, hLastIndexOf);
+ long /*int*/ hPrevItem = OS.SendMessage (handle, OS.TVM_GETNEXTITEM, OS.TVGN_PREVIOUS, hLastIndexOf);
while (hPrevItem != 0 && index < previousIndex) {
hPrevItem = OS.SendMessage (handle, OS.TVM_GETNEXTITEM, OS.TVGN_PREVIOUS, hPrevItem);
--previousIndex;
@@ -2840,7 +2840,7 @@ int /*long*/ findItem (int /*long*/ hFirstItem, int index) {
}
} else {
int nextIndex = lastIndexOf + 1;
- int /*long*/ hNextItem = OS.SendMessage (handle, OS.TVM_GETNEXTITEM, OS.TVGN_NEXT, hLastIndexOf);
+ long /*int*/ hNextItem = OS.SendMessage (handle, OS.TVM_GETNEXTITEM, OS.TVGN_NEXT, hLastIndexOf);
while (hNextItem != 0 && nextIndex < index) {
hNextItem = OS.SendMessage (handle, OS.TVM_GETNEXTITEM, OS.TVGN_NEXT, hNextItem);
nextIndex++;
@@ -2853,7 +2853,7 @@ int /*long*/ findItem (int /*long*/ hFirstItem, int index) {
return 0;
}
int nextIndex = 0;
- int /*long*/ hNextItem = hFirstItem;
+ long /*int*/ hNextItem = hFirstItem;
while (hNextItem != 0 && nextIndex < index) {
hNextItem = OS.SendMessage (handle, OS.TVM_GETNEXTITEM, OS.TVGN_NEXT, hNextItem);
nextIndex++;
@@ -2869,7 +2869,7 @@ int /*long*/ findItem (int /*long*/ hFirstItem, int index) {
TreeItem getFocusItem () {
// checkWidget ();
- int /*long*/ hItem = OS.SendMessage (handle, OS.TVM_GETNEXTITEM, OS.TVGN_CARET, 0);
+ long /*int*/ hItem = OS.SendMessage (handle, OS.TVM_GETNEXTITEM, OS.TVGN_CARET, 0);
return hItem != 0 ? _getItem (hItem) : null;
}
@@ -2941,12 +2941,12 @@ Point getImageSize () {
return new Point (0, getItemHeight ());
}
-int /*long*/ getBottomItem () {
- int /*long*/ hItem = OS.SendMessage (handle, OS.TVM_GETNEXTITEM, OS.TVGN_FIRSTVISIBLE, 0);
+long /*int*/ getBottomItem () {
+ long /*int*/ hItem = OS.SendMessage (handle, OS.TVM_GETNEXTITEM, OS.TVGN_FIRSTVISIBLE, 0);
if (hItem == 0) return 0;
int index = 0, count = (int)/*64*/OS.SendMessage (handle, OS.TVM_GETVISIBLECOUNT, 0, 0);
while (index <= count) {
- int /*long*/ hNextItem = OS.SendMessage (handle, OS.TVM_GETNEXTITEM, OS.TVGN_NEXTVISIBLE, hItem);
+ long /*int*/ hNextItem = OS.SendMessage (handle, OS.TVM_GETNEXTITEM, OS.TVGN_NEXTVISIBLE, hItem);
if (hNextItem == 0) return hItem;
hItem = hNextItem;
index++;
@@ -3102,9 +3102,9 @@ public TreeColumn [] getColumns () {
public TreeItem getItem (int index) {
checkWidget ();
if (index < 0) error (SWT.ERROR_INVALID_RANGE);
- int /*long*/ hFirstItem = OS.SendMessage (handle, OS.TVM_GETNEXTITEM, OS.TVGN_ROOT, 0);
+ long /*int*/ hFirstItem = OS.SendMessage (handle, OS.TVM_GETNEXTITEM, OS.TVGN_ROOT, 0);
if (hFirstItem == 0) error (SWT.ERROR_INVALID_RANGE);
- int /*long*/ hItem = findItem (hFirstItem, index);
+ long /*int*/ hItem = findItem (hFirstItem, index);
if (hItem == 0) error (SWT.ERROR_INVALID_RANGE);
return _getItem (hItem);
}
@@ -3193,14 +3193,14 @@ public TreeItem getItem (Point point) {
*/
public int getItemCount () {
checkWidget ();
- int /*long*/ hItem = OS.SendMessage (handle, OS.TVM_GETNEXTITEM, OS.TVGN_ROOT, 0);
+ long /*int*/ hItem = OS.SendMessage (handle, OS.TVM_GETNEXTITEM, OS.TVGN_ROOT, 0);
if (hItem == 0) return 0;
return getItemCount (hItem);
}
-int getItemCount (int /*long*/ hItem) {
+int getItemCount (long /*int*/ hItem) {
int count = 0;
- int /*long*/ hFirstItem = hItem;
+ long /*int*/ hFirstItem = hItem;
if (hItem == hFirstIndexOf) {
if (itemCount != -1) return itemCount;
hFirstItem = hLastIndexOf;
@@ -3249,14 +3249,14 @@ public int getItemHeight () {
*/
public TreeItem [] getItems () {
checkWidget ();
- int /*long*/ hItem = OS.SendMessage (handle, OS.TVM_GETNEXTITEM, OS.TVGN_ROOT, 0);
+ long /*int*/ hItem = OS.SendMessage (handle, OS.TVM_GETNEXTITEM, OS.TVGN_ROOT, 0);
if (hItem == 0) return new TreeItem [0];
return getItems (hItem);
}
-TreeItem [] getItems (int /*long*/ hTreeItem) {
+TreeItem [] getItems (long /*int*/ hTreeItem) {
int count = 0;
- int /*long*/ hItem = hTreeItem;
+ long /*int*/ hItem = hTreeItem;
while (hItem != 0) {
hItem = OS.SendMessage (handle, OS.TVM_GETNEXTITEM, OS.TVGN_NEXT, hItem);
count++;
@@ -3312,7 +3312,7 @@ public boolean getLinesVisible () {
return linesVisible;
}
-int /*long*/ getNextSelection (int /*long*/ hItem, TVITEM tvItem) {
+long /*int*/ getNextSelection (long /*int*/ hItem, TVITEM tvItem) {
while (hItem != 0) {
int state = 0;
if (OS.IsWinCE) {
@@ -3323,8 +3323,8 @@ int /*long*/ getNextSelection (int /*long*/ hItem, TVITEM tvItem) {
state = (int)/*64*/OS.SendMessage (handle, OS.TVM_GETITEMSTATE, hItem, OS.TVIS_SELECTED);
}
if ((state & OS.TVIS_SELECTED) != 0) return hItem;
- int /*long*/ hFirstItem = OS.SendMessage (handle, OS.TVM_GETNEXTITEM, OS.TVGN_CHILD, hItem);
- int /*long*/ hSelected = getNextSelection (hFirstItem, tvItem);
+ long /*int*/ hFirstItem = OS.SendMessage (handle, OS.TVM_GETNEXTITEM, OS.TVGN_CHILD, hItem);
+ long /*int*/ hSelected = getNextSelection (hFirstItem, tvItem);
if (hSelected != 0) return hSelected;
hItem = OS.SendMessage (handle, OS.TVM_GETNEXTITEM, OS.TVGN_NEXT, hItem);
}
@@ -3348,7 +3348,7 @@ public TreeItem getParentItem () {
return null;
}
-int getSelection (int /*long*/ hItem, TVITEM tvItem, TreeItem [] selection, int index, int count, boolean bigSelection, boolean all) {
+int getSelection (long /*int*/ hItem, TVITEM tvItem, TreeItem [] selection, int index, int count, boolean bigSelection, boolean all) {
while (hItem != 0) {
if (OS.IsWinCE || bigSelection) {
tvItem.hItem = hItem;
@@ -3372,7 +3372,7 @@ int getSelection (int /*long*/ hItem, TVITEM tvItem, TreeItem [] selection, int
}
if (index == count) break;
if (all) {
- int /*long*/ hFirstItem = OS.SendMessage (handle, OS.TVM_GETNEXTITEM, OS.TVGN_CHILD, hItem);
+ long /*int*/ hFirstItem = OS.SendMessage (handle, OS.TVM_GETNEXTITEM, OS.TVGN_CHILD, hItem);
if ((index = getSelection (hFirstItem, tvItem, selection, index, count, bigSelection, all)) == count) {
break;
}
@@ -3403,7 +3403,7 @@ int getSelection (int /*long*/ hItem, TVITEM tvItem, TreeItem [] selection, int
public TreeItem [] getSelection () {
checkWidget ();
if ((style & SWT.SINGLE) != 0) {
- int /*long*/ hItem = OS.SendMessage (handle, OS.TVM_GETNEXTITEM, OS.TVGN_CARET, 0);
+ long /*int*/ hItem = OS.SendMessage (handle, OS.TVM_GETNEXTITEM, OS.TVGN_CARET, 0);
if (hItem == 0) return new TreeItem [0];
TVITEM tvItem = new TVITEM ();
tvItem.mask = OS.TVIF_HANDLE | OS.TVIF_PARAM | OS.TVIF_STATE;
@@ -3414,12 +3414,12 @@ public TreeItem [] getSelection () {
}
int count = 0;
TreeItem [] guess = new TreeItem [(style & SWT.VIRTUAL) != 0 ? 8 : 1];
- int /*long*/ oldProc = OS.GetWindowLongPtr (handle, OS.GWLP_WNDPROC);
+ long /*int*/ oldProc = OS.GetWindowLongPtr (handle, OS.GWLP_WNDPROC);
OS.SetWindowLongPtr (handle, OS.GWLP_WNDPROC, TreeProc);
if ((style & SWT.VIRTUAL) != 0) {
TVITEM tvItem = new TVITEM ();
tvItem.mask = OS.TVIF_HANDLE | OS.TVIF_PARAM | OS.TVIF_STATE;
- int /*long*/ hItem = OS.SendMessage (handle, OS.TVM_GETNEXTITEM, OS.TVGN_ROOT, 0);
+ long /*int*/ hItem = OS.SendMessage (handle, OS.TVM_GETNEXTITEM, OS.TVGN_ROOT, 0);
count = getSelection (hItem, tvItem, guess, 0, -1, false, true);
} else {
TVITEM tvItem = null;
@@ -3430,7 +3430,7 @@ public TreeItem [] getSelection () {
for (int i=0; i<items.length; i++) {
TreeItem item = items [i];
if (item != null) {
- int /*long*/ hItem = item.handle;
+ long /*int*/ hItem = item.handle;
int state = 0;
if (OS.IsWinCE) {
tvItem.hItem = hItem;
@@ -3457,7 +3457,7 @@ public TreeItem [] getSelection () {
OS.SetWindowLongPtr (handle, OS.GWLP_WNDPROC, TreeProc);
TVITEM tvItem = new TVITEM ();
tvItem.mask = OS.TVIF_HANDLE | OS.TVIF_PARAM | OS.TVIF_STATE;
- int /*long*/ hItem = OS.SendMessage (handle, OS.TVM_GETNEXTITEM, OS.TVGN_ROOT, 0);
+ long /*int*/ hItem = OS.SendMessage (handle, OS.TVM_GETNEXTITEM, OS.TVGN_ROOT, 0);
int itemCount = (int)/*64*/OS.SendMessage (handle, OS.TVM_GETCOUNT, 0, 0);
boolean bigSelection = result.length > itemCount / 2;
if (count != getSelection (hItem, tvItem, result, 0, count, bigSelection, false)) {
@@ -3480,7 +3480,7 @@ public TreeItem [] getSelection () {
public int getSelectionCount () {
checkWidget ();
if ((style & SWT.SINGLE) != 0) {
- int /*long*/ hItem = OS.SendMessage (handle, OS.TVM_GETNEXTITEM, OS.TVGN_CARET, 0);
+ long /*int*/ hItem = OS.SendMessage (handle, OS.TVM_GETNEXTITEM, OS.TVGN_CARET, 0);
if (hItem == 0) return 0;
int state = 0;
if (OS.IsWinCE) {
@@ -3495,7 +3495,7 @@ public int getSelectionCount () {
return (state & OS.TVIS_SELECTED) == 0 ? 0 : 1;
}
int count = 0;
- int /*long*/ oldProc = OS.GetWindowLongPtr (handle, OS.GWLP_WNDPROC);
+ long /*int*/ oldProc = OS.GetWindowLongPtr (handle, OS.GWLP_WNDPROC);
TVITEM tvItem = null;
if (OS.IsWinCE) {
tvItem = new TVITEM ();
@@ -3503,13 +3503,13 @@ public int getSelectionCount () {
}
OS.SetWindowLongPtr (handle, OS.GWLP_WNDPROC, TreeProc);
if ((style & SWT.VIRTUAL) != 0) {
- int /*long*/ hItem = OS.SendMessage (handle, OS.TVM_GETNEXTITEM, OS.TVGN_ROOT, 0);
+ long /*int*/ hItem = OS.SendMessage (handle, OS.TVM_GETNEXTITEM, OS.TVGN_ROOT, 0);
count = getSelection (hItem, tvItem, null, 0, -1, false, true);
} else {
for (int i=0; i<items.length; i++) {
TreeItem item = items [i];
if (item != null) {
- int /*long*/ hItem = item.handle;
+ long /*int*/ hItem = item.handle;
int state = 0;
if (OS.IsWinCE) {
tvItem.hItem = hItem;
@@ -3601,11 +3601,11 @@ public int getSortDirection () {
*/
public TreeItem getTopItem () {
checkWidget ();
- int /*long*/ hItem = OS.SendMessage (handle, OS.TVM_GETNEXTITEM, OS.TVGN_FIRSTVISIBLE, 0);
+ long /*int*/ hItem = OS.SendMessage (handle, OS.TVM_GETNEXTITEM, OS.TVGN_FIRSTVISIBLE, 0);
return hItem != 0 ? _getItem (hItem) : null;
}
-boolean hitTestSelection (int /*long*/ hItem, int x, int y) {
+boolean hitTestSelection (long /*int*/ hItem, int x, int y) {
if (hItem == 0) return false;
TreeItem item = _getItem (hItem);
if (item == null) return false;
@@ -3616,10 +3616,10 @@ boolean hitTestSelection (int /*long*/ hItem, int x, int y) {
//BUG? - check drag detect
int [] order = new int [1], index = new int [1];
- int /*long*/ hDC = OS.GetDC (handle);
- int /*long*/ oldFont = 0, newFont = OS.SendMessage (handle, OS.WM_GETFONT, 0, 0);
+ long /*int*/ hDC = OS.GetDC (handle);
+ long /*int*/ oldFont = 0, newFont = OS.SendMessage (handle, OS.WM_GETFONT, 0, 0);
if (newFont != 0) oldFont = OS.SelectObject (hDC, newFont);
- int /*long*/ hFont = item.fontHandle (order [index [0]]);
+ long /*int*/ hFont = item.fontHandle (order [index [0]]);
if (hFont != -1) hFont = OS.SelectObject (hDC, hFont);
int state = (int)/*64*/OS.SendMessage (handle, OS.TVM_GETITEMSTATE, hItem, OS.TVIS_SELECTED);
int detail = (state & OS.TVIS_SELECTED) != 0 ? SWT.SELECTED : 0;
@@ -3645,8 +3645,8 @@ int imageIndex (Image image, int index) {
* times, Windows does work making this operation slow. The fix
* is to test for the same image list before setting the new one.
*/
- int /*long*/ hImageList = imageList.getHandle ();
- int /*long*/ hOldImageList = OS.SendMessage (handle, OS.TVM_GETIMAGELIST, OS.TVSIL_NORMAL, 0);
+ long /*int*/ hImageList = imageList.getHandle ();
+ long /*int*/ hOldImageList = OS.SendMessage (handle, OS.TVM_GETIMAGELIST, OS.TVSIL_NORMAL, 0);
if (hOldImageList != hImageList) {
OS.SendMessage (handle, OS.TVM_SETIMAGELIST, OS.TVSIL_NORMAL, hImageList);
updateScrollBar ();
@@ -3662,7 +3662,7 @@ int imageIndexHeader (Image image) {
headerImageList = display.getImageList (style & SWT.RIGHT_TO_LEFT, bounds.width, bounds.height);
int index = headerImageList.indexOf (image);
if (index == -1) index = headerImageList.add (image);
- int /*long*/ hImageList = headerImageList.getHandle ();
+ long /*int*/ hImageList = headerImageList.getHandle ();
if (hwndHeader != 0) {
OS.SendMessage (hwndHeader, OS.HDM_SETIMAGELIST, 0, hImageList);
}
@@ -3727,7 +3727,7 @@ public int indexOf (TreeItem item) {
checkWidget ();
if (item == null) error (SWT.ERROR_NULL_ARGUMENT);
if (item.isDisposed()) error(SWT.ERROR_INVALID_ARGUMENT);
- int /*long*/ hItem = OS.SendMessage (handle, OS.TVM_GETNEXTITEM, OS.TVGN_ROOT, 0);
+ long /*int*/ hItem = OS.SendMessage (handle, OS.TVM_GETNEXTITEM, OS.TVGN_ROOT, 0);
return hItem == 0 ? -1 : findIndex (hItem, item.handle);
}
@@ -3801,7 +3801,7 @@ boolean isItemSelected (NMTVCUSTOMDRAW nmcd) {
void redrawSelection () {
if ((style & SWT.SINGLE) != 0) {
- int /*long*/ hItem = OS.SendMessage (handle, OS.TVM_GETNEXTITEM, OS.TVGN_CARET, 0);
+ long /*int*/ hItem = OS.SendMessage (handle, OS.TVM_GETNEXTITEM, OS.TVGN_CARET, 0);
if (hItem != 0) {
RECT rect = new RECT ();
if (OS.TreeView_GetItemRect (handle, hItem, rect, false)) {
@@ -3809,7 +3809,7 @@ void redrawSelection () {
}
}
} else {
- int /*long*/ hItem = OS.SendMessage (handle, OS.TVM_GETNEXTITEM, OS.TVGN_FIRSTVISIBLE, 0);
+ long /*int*/ hItem = OS.SendMessage (handle, OS.TVM_GETNEXTITEM, OS.TVGN_FIRSTVISIBLE, 0);
if (hItem != 0) {
TVITEM tvItem = null;
if (OS.IsWinCE) {
@@ -3845,7 +3845,7 @@ void register () {
if (hwndHeader != 0) display.addControl (hwndHeader, this);
}
-void releaseItem (int /*long*/ hItem, TVITEM tvItem, boolean release) {
+void releaseItem (long /*int*/ hItem, TVITEM tvItem, boolean release) {
if (hItem == hAnchor) hAnchor = 0;
if (hItem == hInsert) hInsert = 0;
tvItem.hItem = hItem;
@@ -3861,7 +3861,7 @@ void releaseItem (int /*long*/ hItem, TVITEM tvItem, boolean release) {
}
}
-void releaseItems (int /*long*/ hItem, TVITEM tvItem) {
+void releaseItems (long /*int*/ hItem, TVITEM tvItem) {
hItem = OS.SendMessage (handle, OS.TVM_GETNEXTITEM, OS.TVGN_CHILD, hItem);
while (hItem != 0) {
releaseItems (hItem, tvItem);
@@ -3920,7 +3920,7 @@ void releaseWidget () {
display.releaseImageList (headerImageList);
}
imageList = headerImageList = null;
- int /*long*/ hStateList = OS.SendMessage (handle, OS.TVM_GETIMAGELIST, OS.TVSIL_STATE, 0);
+ long /*int*/ hStateList = OS.SendMessage (handle, OS.TVM_GETIMAGELIST, OS.TVSIL_STATE, 0);
OS.SendMessage (handle, OS.TVM_SETIMAGELIST, OS.TVSIL_STATE, 0);
if (hStateList != 0) OS.ImageList_Destroy (hStateList);
if (itemToolTipHandle != 0) OS.DestroyWindow (itemToolTipHandle);
@@ -3950,7 +3950,7 @@ public void removeAll () {
boolean redraw = getDrawing () && OS.IsWindowVisible (handle);
if (redraw) OS.DefWindowProc (handle, OS.WM_SETREDRAW, 0, 0);
shrink = ignoreShrink = true;
- int /*long*/ result = OS.SendMessage (handle, OS.TVM_DELETEITEM, 0, OS.TVI_ROOT);
+ long /*int*/ result = OS.SendMessage (handle, OS.TVM_DELETEITEM, 0, OS.TVI_ROOT);
ignoreShrink = false;
if (redraw) {
OS.DefWindowProc (handle, OS.WM_SETREDRAW, 1, 0);
@@ -4061,7 +4061,7 @@ void reskinChildren (int flags) {
*/
public void setInsertMark (TreeItem item, boolean before) {
checkWidget ();
- int /*long*/ hItem = 0;
+ long /*int*/ hItem = 0;
if (item != null) {
if (item.isDisposed()) error(SWT.ERROR_INVALID_ARGUMENT);
hItem = item.handle;
@@ -4086,11 +4086,11 @@ public void setInsertMark (TreeItem item, boolean before) {
public void setItemCount (int count) {
checkWidget ();
count = Math.max (0, count);
- int /*long*/ hItem = OS.SendMessage (handle, OS.TVM_GETNEXTITEM, OS.TVGN_ROOT, 0);
+ long /*int*/ hItem = OS.SendMessage (handle, OS.TVM_GETNEXTITEM, OS.TVGN_ROOT, 0);
setItemCount (count, OS.TVGN_ROOT, hItem);
}
-void setItemCount (int count, int /*long*/ hParent, int /*long*/ hItem) {
+void setItemCount (int count, long /*int*/ hParent, long /*int*/ hItem) {
boolean redraw = false;
if (OS.SendMessage (handle, OS.TVM_GETCOUNT, 0, 0) == 0) {
redraw = getDrawing () && OS.IsWindowVisible (handle);
@@ -4201,18 +4201,18 @@ public void setLinesVisible (boolean show) {
OS.InvalidateRect (handle, null, true);
}
-int /*long*/ scrolledHandle () {
+long /*int*/ scrolledHandle () {
if (hwndHeader == 0) return handle;
return columnCount == 0 && scrollWidth == 0 ? handle : hwndParent;
}
-void select (int /*long*/ hItem, TVITEM tvItem) {
+void select (long /*int*/ hItem, TVITEM tvItem) {
while (hItem != 0) {
tvItem.hItem = hItem;
OS.SendMessage (handle, OS.TVM_SETITEM, 0, tvItem);
int state = (int)/*64*/OS.SendMessage (handle, OS.TVM_GETITEMSTATE, hItem, OS.TVIS_EXPANDED);
if ((state & OS.TVIS_EXPANDED) != 0) {
- int /*long*/ hFirstItem = OS.SendMessage (handle, OS.TVM_GETNEXTITEM, OS.TVGN_CHILD, hItem);
+ long /*int*/ hFirstItem = OS.SendMessage (handle, OS.TVM_GETNEXTITEM, OS.TVGN_CHILD, hItem);
select (hFirstItem, tvItem);
}
@@ -4242,7 +4242,7 @@ public void select (TreeItem item) {
if (item == null) error (SWT.ERROR_NULL_ARGUMENT);
if (item.isDisposed ()) error (SWT.ERROR_INVALID_ARGUMENT);
if ((style & SWT.SINGLE) != 0) {
- int /*long*/ hItem = item.handle;
+ long /*int*/ hItem = item.handle;
int state = 0;
if (OS.IsWinCE) {
TVITEM tvItem = new TVITEM ();
@@ -4283,7 +4283,7 @@ public void select (TreeItem item) {
}
setSelection (item);
if (hInfo != null) {
- int /*long*/ hThumb = OS.MAKELPARAM (OS.SB_THUMBPOSITION, hInfo.nPos);
+ long /*int*/ hThumb = OS.MAKELPARAM (OS.SB_THUMBPOSITION, hInfo.nPos);
OS.SendMessage (handle, OS.WM_HSCROLL, hThumb, 0);
}
/*
@@ -4298,7 +4298,7 @@ public void select (TreeItem item) {
if (!OS.IsWinCE && OS.WIN32_VERSION >= OS.VERSION (6, 0)) {
OS.SetScrollInfo (handle, OS.SB_VERT, vInfo, true);
}
- int /*long*/ vThumb = OS.MAKELPARAM (OS.SB_THUMBPOSITION, vInfo.nPos);
+ long /*int*/ vThumb = OS.MAKELPARAM (OS.SB_THUMBPOSITION, vInfo.nPos);
OS.SendMessage (handle, OS.WM_VSCROLL, vThumb, 0);
if (redraw) {
OS.DefWindowProc (handle, OS.WM_SETREDRAW, 1, 0);
@@ -4338,9 +4338,9 @@ public void selectAll () {
tvItem.mask = OS.TVIF_HANDLE | OS.TVIF_STATE;
tvItem.state = OS.TVIS_SELECTED;
tvItem.stateMask = OS.TVIS_SELECTED;
- int /*long*/ oldProc = OS.GetWindowLongPtr (handle, OS.GWLP_WNDPROC);
+ long /*int*/ oldProc = OS.GetWindowLongPtr (handle, OS.GWLP_WNDPROC);
OS.SetWindowLongPtr (handle, OS.GWLP_WNDPROC, TreeProc);
- int /*long*/ hItem = OS.SendMessage (handle, OS.TVM_GETNEXTITEM, OS.TVGN_ROOT, 0);
+ long /*int*/ hItem = OS.SendMessage (handle, OS.TVM_GETNEXTITEM, OS.TVGN_ROOT, 0);
select (hItem, tvItem);
OS.SetWindowLongPtr (handle, OS.GWLP_WNDPROC, oldProc);
}
@@ -4374,7 +4374,7 @@ Event sendEraseItemEvent (TreeItem item, NMTTCUSTOMDRAW nmcd, int column, RECT c
return event;
}
-Event sendMeasureItemEvent (TreeItem item, int index, int /*long*/ hDC, int detail) {
+Event sendMeasureItemEvent (TreeItem item, int index, long /*int*/ hDC, int detail) {
RECT itemRect = item.getBounds (index, true, true, false, false, false, hDC);
int nSavedDC = OS.SaveDC (hDC);
GCData data = new GCData ();
@@ -4434,7 +4434,7 @@ Event sendPaintItemEvent (TreeItem item, NMTTCUSTOMDRAW nmcd, int column, RECT i
return event;
}
-void setBackgroundImage (int /*long*/ hBitmap) {
+void setBackgroundImage (long /*int*/ hBitmap) {
super.setBackgroundImage (hBitmap);
if (hBitmap != 0) {
/*
@@ -4507,7 +4507,7 @@ void setCursor () {
* is IDC_ARROW.
*/
Cursor cursor = findCursor ();
- int /*long*/ hCursor = cursor == null ? OS.LoadCursor (0, OS.IDC_ARROW) : cursor.handle;
+ long /*int*/ hCursor = cursor == null ? OS.LoadCursor (0, OS.IDC_ARROW) : cursor.handle;
OS.SetCursor (hCursor);
}
@@ -4588,7 +4588,7 @@ void setCheckboxImageList () {
if (OS.COMCTL32_MAJOR >= 6 && OS.IsAppThemed ()) {
flags |= OS.ILC_COLOR32;
} else {
- int /*long*/ hDC = OS.GetDC (handle);
+ long /*int*/ hDC = OS.GetDC (handle);
int bits = OS.GetDeviceCaps (hDC, OS.BITSPIXEL);
int planes = OS.GetDeviceCaps (hDC, OS.PLANES);
OS.ReleaseDC (handle, hDC);
@@ -4606,11 +4606,11 @@ void setCheckboxImageList () {
}
if ((style & SWT.RIGHT_TO_LEFT) != 0) flags |= OS.ILC_MIRROR;
int height = (int)/*64*/OS.SendMessage (handle, OS.TVM_GETITEMHEIGHT, 0, 0), width = height;
- int /*long*/ hStateList = OS.ImageList_Create (width, height, flags, count, count);
- int /*long*/ hDC = OS.GetDC (handle);
- int /*long*/ memDC = OS.CreateCompatibleDC (hDC);
- int /*long*/ hBitmap = OS.CreateCompatibleBitmap (hDC, width * count, height);
- int /*long*/ hOldBitmap = OS.SelectObject (memDC, hBitmap);
+ long /*int*/ hStateList = OS.ImageList_Create (width, height, flags, count, count);
+ long /*int*/ hDC = OS.GetDC (handle);
+ long /*int*/ memDC = OS.CreateCompatibleDC (hDC);
+ long /*int*/ hBitmap = OS.CreateCompatibleBitmap (hDC, width * count, height);
+ long /*int*/ hOldBitmap = OS.SelectObject (memDC, hBitmap);
RECT rect = new RECT ();
OS.SetRect (rect, 0, 0, width * count, height);
/*
@@ -4630,10 +4630,10 @@ void setCheckboxImageList () {
clrBackground = 0x0200FF00;
}
}
- int /*long*/ hBrush = OS.CreateSolidBrush (clrBackground);
+ long /*int*/ hBrush = OS.CreateSolidBrush (clrBackground);
OS.FillRect (memDC, rect, hBrush);
OS.DeleteObject (hBrush);
- int /*long*/ oldFont = OS.SelectObject (hDC, defaultFont ());
+ long /*int*/ oldFont = OS.SelectObject (hDC, defaultFont ());
TEXTMETRIC tm = OS.IsUnicode ? (TEXTMETRIC) new TEXTMETRICW () : new TEXTMETRICA ();
OS.GetTextMetrics (hDC, tm);
OS.SelectObject (hDC, oldFont);
@@ -4642,7 +4642,7 @@ void setCheckboxImageList () {
int left = (width - itemWidth) / 2, top = (height - itemHeight) / 2 + 1;
OS.SetRect (rect, left + width, top, left + width + itemWidth, top + itemHeight);
if (OS.COMCTL32_MAJOR >= 6 && OS.IsAppThemed ()) {
- int /*long*/ hTheme = display.hButtonTheme ();
+ long /*int*/ hTheme = display.hButtonTheme ();
OS.DrawThemeBackground (hTheme, memDC, OS.BP_CHECKBOX, OS.CBS_UNCHECKEDNORMAL, rect, null);
rect.left += width; rect.right += width;
OS.DrawThemeBackground (hTheme, memDC, OS.BP_CHECKBOX, OS.CBS_CHECKEDNORMAL, rect, null);
@@ -4668,7 +4668,7 @@ void setCheckboxImageList () {
OS.ImageList_AddMasked (hStateList, hBitmap, clrBackground);
}
OS.DeleteObject (hBitmap);
- int /*long*/ hOldStateList = OS.SendMessage (handle, OS.TVM_GETIMAGELIST, OS.TVSIL_STATE, 0);
+ long /*int*/ hOldStateList = OS.SendMessage (handle, OS.TVM_GETIMAGELIST, OS.TVSIL_STATE, 0);
OS.SendMessage (handle, OS.TVM_SETIMAGELIST, OS.TVSIL_STATE, hStateList);
if (hOldStateList != 0) OS.ImageList_Destroy (hOldStateList);
}
@@ -4753,7 +4753,7 @@ public void setRedraw (boolean redraw) {
* when redraw is turned on and there are no items in
* the tree.
*/
- int /*long*/ hItem = 0;
+ long /*int*/ hItem = 0;
if (redraw) {
if (drawCount == 1) {
int count = (int)/*64*/OS.SendMessage (handle, OS.TVM_GETCOUNT, 0, 0);
@@ -4822,7 +4822,7 @@ void setScrollWidth (int width) {
horizontalBar.setPageIncrement (info.nPage);
}
OS.GetClientRect (hwndParent, rect);
- int /*long*/ hHeap = OS.GetProcessHeap ();
+ long /*int*/ hHeap = OS.GetProcessHeap ();
HDLAYOUT playout = new HDLAYOUT ();
playout.prc = OS.HeapAlloc (hHeap, OS.HEAP_ZERO_MEMORY, RECT.sizeof);
playout.pwpos = OS.HeapAlloc (hHeap, OS.HEAP_ZERO_MEMORY, WINDOWPOS.sizeof);
@@ -4843,7 +4843,7 @@ void setScrollWidth (int width) {
ignoreResize = oldIgnore;
}
-void setSelection (int /*long*/ hItem, TVITEM tvItem, TreeItem [] selection) {
+void setSelection (long /*int*/ hItem, TVITEM tvItem, TreeItem [] selection) {
while (hItem != 0) {
int index = 0;
while (index < selection.length) {
@@ -4864,7 +4864,7 @@ void setSelection (int /*long*/ hItem, TVITEM tvItem, TreeItem [] selection) {
OS.SendMessage (handle, OS.TVM_SETITEM, 0, tvItem);
}
}
- int /*long*/ hFirstItem = OS.SendMessage (handle, OS.TVM_GETNEXTITEM, OS.TVGN_CHILD, hItem);
+ long /*int*/ hFirstItem = OS.SendMessage (handle, OS.TVM_GETNEXTITEM, OS.TVGN_CHILD, hItem);
setSelection (hFirstItem, tvItem, selection);
hItem = OS.SendMessage (handle, OS.TVM_GETNEXTITEM, OS.TVGN_NEXT, hItem);
}
@@ -4933,8 +4933,8 @@ public void setSelection (TreeItem [] items) {
TreeItem item = items [0];
if (item != null) {
if (item.isDisposed ()) error (SWT.ERROR_INVALID_ARGUMENT);
- int /*long*/ hOldItem = OS.SendMessage (handle, OS.TVM_GETNEXTITEM, OS.TVGN_CARET, 0);
- int /*long*/ hNewItem = hAnchor = item.handle;
+ long /*int*/ hOldItem = OS.SendMessage (handle, OS.TVM_GETNEXTITEM, OS.TVGN_CARET, 0);
+ long /*int*/ hNewItem = hAnchor = item.handle;
/*
* Bug in Windows. When TVM_SELECTITEM is used to select and
@@ -4958,7 +4958,7 @@ public void setSelection (TreeItem [] items) {
ignoreSelect = false;
if (OS.SendMessage (handle, OS.TVM_GETVISIBLECOUNT, 0, 0) == 0) {
OS.SendMessage (handle, OS.TVM_SELECTITEM, OS.TVGN_FIRSTVISIBLE, hNewItem);
- int /*long*/ hParent = OS.SendMessage (handle, OS.TVM_GETNEXTITEM, OS.TVGN_PARENT, hNewItem);
+ long /*int*/ hParent = OS.SendMessage (handle, OS.TVM_GETNEXTITEM, OS.TVGN_PARENT, hNewItem);
if (hParent == 0) OS.SendMessage (handle, OS.WM_HSCROLL, OS.SB_TOP, 0);
}
if (fixScroll) {
@@ -4989,10 +4989,10 @@ public void setSelection (TreeItem [] items) {
TVITEM tvItem = new TVITEM ();
tvItem.mask = OS.TVIF_HANDLE | OS.TVIF_STATE;
tvItem.stateMask = OS.TVIS_SELECTED;
- int /*long*/ oldProc = OS.GetWindowLongPtr (handle, OS.GWLP_WNDPROC);
+ long /*int*/ oldProc = OS.GetWindowLongPtr (handle, OS.GWLP_WNDPROC);
OS.SetWindowLongPtr (handle, OS.GWLP_WNDPROC, TreeProc);
if ((style & SWT.VIRTUAL) != 0) {
- int /*long*/ hItem = OS.SendMessage (handle, OS.TVM_GETNEXTITEM, OS.TVGN_ROOT, 0);
+ long /*int*/ hItem = OS.SendMessage (handle, OS.TVM_GETNEXTITEM, OS.TVGN_ROOT, 0);
setSelection (hItem, tvItem, items);
} else {
for (int i=0; i<this.items.length; i++) {
@@ -5097,8 +5097,8 @@ public void setTopItem (TreeItem item) {
checkWidget ();
if (item == null) error (SWT.ERROR_NULL_ARGUMENT);
if (item.isDisposed ()) error (SWT.ERROR_INVALID_ARGUMENT);
- int /*long*/ hItem = item.handle;
- int /*long*/ hTopItem = OS.SendMessage (handle, OS.TVM_GETNEXTITEM, OS.TVGN_FIRSTVISIBLE, 0);
+ long /*int*/ hItem = item.handle;
+ long /*int*/ hTopItem = OS.SendMessage (handle, OS.TVM_GETNEXTITEM, OS.TVGN_FIRSTVISIBLE, 0);
if (hItem == hTopItem) return;
boolean fixScroll = checkScroll (hItem), redraw = false;
if (fixScroll) {
@@ -5110,7 +5110,7 @@ public void setTopItem (TreeItem item) {
}
SCROLLINFO hInfo = null;
int bits = OS.GetWindowLong (handle, OS.GWL_STYLE);
- int /*long*/ hParent = OS.SendMessage (handle, OS.TVM_GETNEXTITEM, OS.TVGN_PARENT, hItem);
+ long /*int*/ hParent = OS.SendMessage (handle, OS.TVM_GETNEXTITEM, OS.TVGN_PARENT, hItem);
if (hParent != 0 && (bits & (OS.TVS_NOHSCROLL | OS.TVS_NOSCROLL)) == 0) {
hInfo = new SCROLLINFO ();
hInfo.cbSize = SCROLLINFO.sizeof;
@@ -5120,7 +5120,7 @@ public void setTopItem (TreeItem item) {
OS.SendMessage (handle, OS.TVM_SELECTITEM, OS.TVGN_FIRSTVISIBLE, hItem);
if (hParent != 0) {
if (hInfo != null) {
- int /*long*/ hThumb = OS.MAKELPARAM (OS.SB_THUMBPOSITION, hInfo.nPos);
+ long /*int*/ hThumb = OS.MAKELPARAM (OS.SB_THUMBPOSITION, hInfo.nPos);
OS.SendMessage (handle, OS.WM_HSCROLL, hThumb, 0);
}
} else {
@@ -5138,7 +5138,7 @@ public void setTopItem (TreeItem item) {
updateScrollBar ();
}
-void showItem (int /*long*/ hItem) {
+void showItem (long /*int*/ hItem) {
/*
* Bug in Windows. When TVM_ENSUREVISIBLE is used to ensure
* that an item is visible and the client area of the tree is
@@ -5304,7 +5304,7 @@ public void showItem (TreeItem item) {
*/
public void showSelection () {
checkWidget ();
- int /*long*/ hItem = 0;
+ long /*int*/ hItem = 0;
if ((style & SWT.SINGLE) != 0) {
hItem = OS.SendMessage (handle, OS.TVM_GETNEXTITEM, OS.TVGN_CARET, 0);
if (hItem == 0) return;
@@ -5320,7 +5320,7 @@ public void showSelection () {
}
if ((state & OS.TVIS_SELECTED) == 0) return;
} else {
- int /*long*/ oldProc = OS.GetWindowLongPtr (handle, OS.GWLP_WNDPROC);
+ long /*int*/ oldProc = OS.GetWindowLongPtr (handle, OS.GWLP_WNDPROC);
OS.SetWindowLongPtr (handle, OS.GWLP_WNDPROC, TreeProc);
TVITEM tvItem = null;
if (OS.IsWinCE) {
@@ -5328,7 +5328,7 @@ public void showSelection () {
tvItem.mask = OS.TVIF_STATE;
}
if ((style & SWT.VIRTUAL) != 0) {
- int /*long*/ hRoot = OS.SendMessage (handle, OS.TVM_GETNEXTITEM, OS.TVGN_ROOT, 0);
+ long /*int*/ hRoot = OS.SendMessage (handle, OS.TVM_GETNEXTITEM, OS.TVGN_ROOT, 0);
hItem = getNextSelection (hRoot, tvItem);
} else {
//FIXME - this code expands first selected item it finds
@@ -5363,7 +5363,7 @@ public void showSelection () {
sort (OS.TVI_ROOT, false);
}
-void sort (int /*long*/ hParent, boolean all) {
+void sort (long /*int*/ hParent, boolean all) {
int itemCount = (int)/*64*/OS.SendMessage (handle, OS.TVM_GETCOUNT, 0, 0);
if (itemCount == 0 || itemCount == 1) return;
hFirstIndexOf = hLastIndexOf = 0;
@@ -5372,7 +5372,7 @@ void sort (int /*long*/ hParent, boolean all) {
OS.SendMessage (handle, OS.TVM_SORTCHILDREN, all ? 1 : 0, hParent);
} else {
Callback compareCallback = new Callback (this, "CompareFunc", 3);
- int /*long*/ lpfnCompare = compareCallback.getAddress ();
+ long /*int*/ lpfnCompare = compareCallback.getAddress ();
TVSORTCB psort = new TVSORTCB ();
psort.hParent = hParent;
psort.lpfnCompare = lpfnCompare;
@@ -5412,7 +5412,7 @@ RECT toolTipRect (RECT rect) {
}
String toolTipText (NMTTDISPINFO hdr) {
- int /*long*/ hwndToolTip = OS.SendMessage (handle, OS.TVM_GETTOOLTIPS, 0, 0);
+ long /*int*/ hwndToolTip = OS.SendMessage (handle, OS.TVM_GETTOOLTIPS, 0, 0);
if (hwndToolTip == hdr.hwndFrom && toolTipText != null) return ""; //$NON-NLS-1$
if (headerToolTipHandle == hdr.hwndFrom) {
for (int i=0; i<columnCount; i++) {
@@ -5448,7 +5448,7 @@ String toolTipText (NMTTDISPINFO hdr) {
return super.toolTipText (hdr);
}
-int /*long*/ topHandle () {
+long /*int*/ topHandle () {
return hwndParent != 0 ? hwndParent : handle;
}
@@ -5517,8 +5517,8 @@ void updateImageList () {
* times, Windows does work making this operation slow. The fix
* is to test for the same image list before setting the new one.
*/
- int /*long*/ hImageList = i == items.length ? 0 : imageList.getHandle ();
- int /*long*/ hOldImageList = OS.SendMessage (handle, OS.TVM_GETIMAGELIST, OS.TVSIL_NORMAL, 0);
+ long /*int*/ hImageList = i == items.length ? 0 : imageList.getHandle ();
+ long /*int*/ hOldImageList = OS.SendMessage (handle, OS.TVM_GETIMAGELIST, OS.TVSIL_NORMAL, 0);
if (hImageList != hOldImageList) {
OS.SendMessage (handle, OS.TVM_SETIMAGELIST, OS.TVSIL_NORMAL, hImageList);
}
@@ -5602,7 +5602,7 @@ void updateOrientation () {
}
}
}
- int /*long*/ hImageList = imageList.getHandle ();
+ long /*int*/ hImageList = imageList.getHandle ();
OS.SendMessage (handle, OS.TVM_SETIMAGELIST, OS.TVSIL_NORMAL, hImageList);
}
if (hwndHeader != 0) {
@@ -5630,7 +5630,7 @@ void updateOrientation () {
}
}
}
- int /*long*/ hImageListHeader = headerImageList.getHandle ();
+ long /*int*/ hImageListHeader = headerImageList.getHandle ();
OS.SendMessage (hwndHeader, OS.HDM_SETIMAGELIST, 0, hImageListHeader);
}
}
@@ -5701,11 +5701,11 @@ TCHAR windowClass () {
return TreeClass;
}
-int /*long*/ windowProc () {
+long /*int*/ windowProc () {
return TreeProc;
}
-int /*long*/ windowProc (int /*long*/ hwnd, int msg, int /*long*/ wParam, int /*long*/ lParam) {
+long /*int*/ windowProc (long /*int*/ hwnd, int msg, long /*int*/ wParam, long /*int*/ lParam) {
if (hwndHeader != 0 && hwnd == hwndHeader) {
switch (msg) {
case OS.WM_CONTEXTMENU: {
@@ -5793,7 +5793,7 @@ int /*long*/ windowProc (int /*long*/ hwnd, int msg, int /*long*/ wParam, int /*
setScrollWidth ();
if (ignoreResize) return 0;
setResizeChildren (false);
- int /*long*/ code = callWindowProc (hwnd, OS.WM_SIZE, wParam, lParam);
+ long /*int*/ code = callWindowProc (hwnd, OS.WM_SIZE, wParam, lParam);
sendEvent (SWT.Resize);
if (isDisposed ()) return 0;
if (layout != null) {
@@ -5852,7 +5852,7 @@ int /*long*/ windowProc (int /*long*/ hwnd, int msg, int /*long*/ wParam, int /*
}
}
OS.SetScrollInfo (handle, OS.SB_VERT, info, true);
- int /*long*/ code = OS.SendMessage (handle, OS.WM_VSCROLL, wParam, lParam);
+ long /*int*/ code = OS.SendMessage (handle, OS.WM_VSCROLL, wParam, lParam);
OS.GetScrollInfo (handle, OS.SB_VERT, info);
OS.SetScrollInfo (hwndParent, OS.SB_VERT, info, true);
return code;
@@ -5869,7 +5869,7 @@ int /*long*/ windowProc (int /*long*/ hwnd, int msg, int /*long*/ wParam, int /*
* selected.
*/
if ((style & SWT.MULTI) != 0 || hooks (SWT.EraseItem) || hooks (SWT.PaintItem)) {
- int /*long*/ hItem = OS.SendMessage (handle, OS.TVM_GETNEXTITEM, OS.TVGN_FIRSTVISIBLE, 0);
+ long /*int*/ hItem = OS.SendMessage (handle, OS.TVM_GETNEXTITEM, OS.TVGN_FIRSTVISIBLE, 0);
TreeItem [] items = new TreeItem [10];
TVITEM tvItem = new TVITEM ();
tvItem.mask = OS.TVIF_HANDLE | OS.TVIF_PARAM | OS.TVIF_STATE;
@@ -5894,7 +5894,7 @@ int /*long*/ windowProc (int /*long*/ hwnd, int msg, int /*long*/ wParam, int /*
rect.left = Math.max (rect.left, clientRect.left);
rect.right = Math.min (rect.right, clientRect.right);
}
- int /*long*/ hRgn = OS.CreateRectRgn (rect.left, rect.top, rect.right, rect.bottom);
+ long /*int*/ hRgn = OS.CreateRectRgn (rect.left, rect.top, rect.right, rect.bottom);
for (int i = 1; i < count; i++) {
if (rect.bottom - rect.top > DRAG_IMAGE_SIZE) break;
if (rect.bottom > clientRect.bottom) break;
@@ -5906,7 +5906,7 @@ int /*long*/ windowProc (int /*long*/ hwnd, int msg, int /*long*/ wParam, int /*
itemRect.left = Math.max (itemRect.left, clientRect.left);
itemRect.right = Math.min (itemRect.right, clientRect.right);
}
- int /*long*/ rectRgn = OS.CreateRectRgn (itemRect.left, itemRect.top, itemRect.right, itemRect.bottom);
+ long /*int*/ rectRgn = OS.CreateRectRgn (itemRect.left, itemRect.top, itemRect.right, itemRect.bottom);
OS.CombineRgn (hRgn, hRgn, rectRgn, OS.RGN_OR);
OS.DeleteObject (rectRgn);
rect.bottom = itemRect.bottom;
@@ -5915,8 +5915,8 @@ int /*long*/ windowProc (int /*long*/ hwnd, int msg, int /*long*/ wParam, int /*
OS.GetRgnBox (hRgn, rect);
/* Create resources */
- int /*long*/ hdc = OS.GetDC (handle);
- int /*long*/ memHdc = OS.CreateCompatibleDC (hdc);
+ long /*int*/ hdc = OS.GetDC (handle);
+ long /*int*/ memHdc = OS.CreateCompatibleDC (hdc);
BITMAPINFOHEADER bmiHeader = new BITMAPINFOHEADER ();
bmiHeader.biSize = BITMAPINFOHEADER.sizeof;
bmiHeader.biWidth = rect.right - rect.left;
@@ -5926,10 +5926,10 @@ int /*long*/ windowProc (int /*long*/ hwnd, int msg, int /*long*/ wParam, int /*
bmiHeader.biCompression = OS.BI_RGB;
byte [] bmi = new byte [BITMAPINFOHEADER.sizeof];
OS.MoveMemory (bmi, bmiHeader, BITMAPINFOHEADER.sizeof);
- int /*long*/ [] pBits = new int /*long*/ [1];
- int /*long*/ memDib = OS.CreateDIBSection (0, bmi, OS.DIB_RGB_COLORS, pBits, 0, 0);
+ long /*int*/ [] pBits = new long /*int*/ [1];
+ long /*int*/ memDib = OS.CreateDIBSection (0, bmi, OS.DIB_RGB_COLORS, pBits, 0, 0);
if (memDib == 0) error (SWT.ERROR_NO_HANDLES);
- int /*long*/ oldMemBitmap = OS.SelectObject (memHdc, memDib);
+ long /*int*/ oldMemBitmap = OS.SelectObject (memHdc, memDib);
int colorKey = 0x0000FD;
POINT pt = new POINT ();
OS.SetWindowOrgEx (memHdc, rect.left, rect.top, pt);
@@ -5960,7 +5960,7 @@ int /*long*/ windowProc (int /*long*/ hwnd, int msg, int /*long*/ wParam, int /*
return super.windowProc (hwnd, msg, wParam, lParam);
}
-LRESULT WM_CHAR (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT WM_CHAR (long /*int*/ wParam, long /*int*/ lParam) {
LRESULT result = super.WM_CHAR (wParam, lParam);
if (result != null) return result;
/*
@@ -5974,7 +5974,7 @@ LRESULT WM_CHAR (int /*long*/ wParam, int /*long*/ lParam) {
*/
switch ((int)/*64*/wParam) {
case ' ': {
- int /*long*/ hItem = OS.SendMessage (handle, OS.TVM_GETNEXTITEM, OS.TVGN_CARET, 0);
+ long /*int*/ hItem = OS.SendMessage (handle, OS.TVM_GETNEXTITEM, OS.TVGN_CARET, 0);
if (hItem != 0) {
hAnchor = hItem;
OS.SendMessage (handle, OS.TVM_ENSUREVISIBLE, 0, hItem);
@@ -5993,7 +5993,7 @@ LRESULT WM_CHAR (int /*long*/ wParam, int /*long*/ lParam) {
tvItem.state = state << 12;
OS.SendMessage (handle, OS.TVM_SETITEM, 0, tvItem);
if (!OS.IsWinCE) {
- int /*long*/ id = hItem;
+ long /*int*/ id = hItem;
if (OS.COMCTL32_MAJOR >= 6) {
id = OS.SendMessage (handle, OS.TVM_MAPHTREEITEMTOACCID, hItem, 0);
}
@@ -6035,7 +6035,7 @@ LRESULT WM_CHAR (int /*long*/ wParam, int /*long*/ lParam) {
* using NM_RETURN.
*/
Event event = new Event ();
- int /*long*/ hItem = OS.SendMessage (handle, OS.TVM_GETNEXTITEM, OS.TVGN_CARET, 0);
+ long /*int*/ hItem = OS.SendMessage (handle, OS.TVM_GETNEXTITEM, OS.TVGN_CARET, 0);
if (hItem != 0) event.item = _getItem (hItem);
sendSelectionEvent (SWT.DefaultSelection, event, false);
return LRESULT.ZERO;
@@ -6046,14 +6046,14 @@ LRESULT WM_CHAR (int /*long*/ wParam, int /*long*/ lParam) {
return result;
}
-LRESULT WM_ERASEBKGND (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT WM_ERASEBKGND (long /*int*/ wParam, long /*int*/ lParam) {
LRESULT result = super.WM_ERASEBKGND (wParam, lParam);
if ((style & SWT.DOUBLE_BUFFERED) != 0) return LRESULT.ONE;
if (findImageControl () != null) return LRESULT.ONE;
return result;
}
-LRESULT WM_GETOBJECT (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT WM_GETOBJECT (long /*int*/ wParam, long /*int*/ lParam) {
/*
* Ensure that there is an accessible object created for this
* control because support for checked item and tree column
@@ -6066,7 +6066,7 @@ LRESULT WM_GETOBJECT (int /*long*/ wParam, int /*long*/ lParam) {
return super.WM_GETOBJECT (wParam, lParam);
}
-LRESULT WM_HSCROLL (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT WM_HSCROLL (long /*int*/ wParam, long /*int*/ lParam) {
boolean fixScroll = false;
if ((style & SWT.DOUBLE_BUFFERED) != 0) {
fixScroll = (style & SWT.VIRTUAL) != 0 || hooks (SWT.EraseItem) || hooks (SWT.PaintItem);
@@ -6088,7 +6088,7 @@ LRESULT WM_HSCROLL (int /*long*/ wParam, int /*long*/ lParam) {
return result;
}
-LRESULT WM_KEYDOWN (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT WM_KEYDOWN (long /*int*/ wParam, long /*int*/ lParam) {
LRESULT result = super.WM_KEYDOWN (wParam, lParam);
if (result != null) return result;
switch ((int)/*64*/wParam) {
@@ -6103,7 +6103,7 @@ LRESULT WM_KEYDOWN (int /*long*/ wParam, int /*long*/ lParam) {
*/
boolean isRTL = (style & SWT.RIGHT_TO_LEFT) != 0;
if (isRTL != createdAsRTL) {
- int /*long*/ code = callWindowProc (handle, OS.WM_KEYDOWN, wParam == OS.VK_RIGHT ? OS.VK_LEFT : OS.VK_RIGHT, lParam);
+ long /*int*/ code = callWindowProc (handle, OS.WM_KEYDOWN, wParam == OS.VK_RIGHT ? OS.VK_LEFT : OS.VK_RIGHT, lParam);
return new LRESULT (code);
}
break;
@@ -6139,17 +6139,17 @@ LRESULT WM_KEYDOWN (int /*long*/ wParam, int /*long*/ lParam) {
if (itemToolTipHandle != 0) OS.ShowWindow (itemToolTipHandle, OS.SW_HIDE);
if ((style & SWT.SINGLE) != 0) break;
if (OS.GetKeyState (OS.VK_SHIFT) < 0) {
- int /*long*/ hItem = OS.SendMessage (handle, OS.TVM_GETNEXTITEM, OS.TVGN_CARET, 0);
+ long /*int*/ hItem = OS.SendMessage (handle, OS.TVM_GETNEXTITEM, OS.TVGN_CARET, 0);
if (hItem != 0) {
if (hAnchor == 0) hAnchor = hItem;
ignoreSelect = ignoreDeselect = true;
- int /*long*/ code = callWindowProc (handle, OS.WM_KEYDOWN, wParam, lParam);
+ long /*int*/ code = callWindowProc (handle, OS.WM_KEYDOWN, wParam, lParam);
ignoreSelect = ignoreDeselect = false;
- int /*long*/ hNewItem = OS.SendMessage (handle, OS.TVM_GETNEXTITEM, OS.TVGN_CARET, 0);
+ long /*int*/ hNewItem = OS.SendMessage (handle, OS.TVM_GETNEXTITEM, OS.TVGN_CARET, 0);
TVITEM tvItem = new TVITEM ();
tvItem.mask = OS.TVIF_HANDLE | OS.TVIF_STATE;
tvItem.stateMask = OS.TVIS_SELECTED;
- int /*long*/ hDeselectItem = hItem;
+ long /*int*/ hDeselectItem = hItem;
RECT rect1 = new RECT ();
if (!OS.TreeView_GetItemRect (handle, hAnchor, rect1, false)) {
hAnchor = hItem;
@@ -6163,7 +6163,7 @@ LRESULT WM_KEYDOWN (int /*long*/ wParam, int /*long*/ lParam) {
OS.SendMessage (handle, OS.TVM_SETITEM, 0, tvItem);
hDeselectItem = OS.SendMessage (handle, OS.TVM_GETNEXTITEM, flags, hDeselectItem);
}
- int /*long*/ hSelectItem = hAnchor;
+ long /*int*/ hSelectItem = hAnchor;
OS.TreeView_GetItemRect (handle, hNewItem, rect1, false);
OS.TreeView_GetItemRect (handle, hSelectItem, rect2, false);
tvItem.state = OS.TVIS_SELECTED;
@@ -6185,7 +6185,7 @@ LRESULT WM_KEYDOWN (int /*long*/ wParam, int /*long*/ lParam) {
}
}
if (OS.GetKeyState (OS.VK_CONTROL) < 0) {
- int /*long*/ hItem = OS.SendMessage (handle, OS.TVM_GETNEXTITEM, OS.TVGN_CARET, 0);
+ long /*int*/ hItem = OS.SendMessage (handle, OS.TVM_GETNEXTITEM, OS.TVGN_CARET, 0);
if (hItem != 0) {
TVITEM tvItem = new TVITEM ();
tvItem.mask = OS.TVIF_HANDLE | OS.TVIF_STATE;
@@ -6193,7 +6193,7 @@ LRESULT WM_KEYDOWN (int /*long*/ wParam, int /*long*/ lParam) {
tvItem.hItem = hItem;
OS.SendMessage (handle, OS.TVM_GETITEM, 0, tvItem);
boolean oldSelected = (tvItem.state & OS.TVIS_SELECTED) != 0;
- int /*long*/ hNewItem = 0;
+ long /*int*/ hNewItem = 0;
switch ((int)/*64*/wParam) {
case OS.VK_UP:
hNewItem = OS.SendMessage (handle, OS.TVM_GETNEXTITEM, OS.TVGN_PREVIOUSVISIBLE, hItem);
@@ -6216,7 +6216,7 @@ LRESULT WM_KEYDOWN (int /*long*/ wParam, int /*long*/ lParam) {
OS.GetClientRect (handle, clientRect);
hNewItem = OS.SendMessage (handle, OS.TVM_GETNEXTITEM, OS.TVGN_FIRSTVISIBLE, 0);
do {
- int /*long*/ hVisible = OS.SendMessage (handle, OS.TVM_GETNEXTITEM, OS.TVGN_NEXTVISIBLE, hNewItem);
+ long /*int*/ hVisible = OS.SendMessage (handle, OS.TVM_GETNEXTITEM, OS.TVGN_NEXTVISIBLE, hNewItem);
if (hVisible == 0) break;
if (!OS.TreeView_GetItemRect (handle, hVisible, rect, false)) break;
if (rect.bottom > clientRect.bottom) break;
@@ -6270,7 +6270,7 @@ LRESULT WM_KEYDOWN (int /*long*/ wParam, int /*long*/ lParam) {
}
}
}
- int /*long*/ code = callWindowProc (handle, OS.WM_KEYDOWN, wParam, lParam);
+ long /*int*/ code = callWindowProc (handle, OS.WM_KEYDOWN, wParam, lParam);
hAnchor = OS.SendMessage (handle, OS.TVM_GETNEXTITEM, OS.TVGN_CARET, 0);
return new LRESULT (code);
}
@@ -6278,7 +6278,7 @@ LRESULT WM_KEYDOWN (int /*long*/ wParam, int /*long*/ lParam) {
return result;
}
-LRESULT WM_KILLFOCUS (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT WM_KILLFOCUS (long /*int*/ wParam, long /*int*/ lParam) {
/*
* Bug in Windows. When a tree item that has an image
* with alpha is expanded or collapsed, the area where
@@ -6308,7 +6308,7 @@ LRESULT WM_KILLFOCUS (int /*long*/ wParam, int /*long*/ lParam) {
return super.WM_KILLFOCUS (wParam, lParam);
}
-LRESULT WM_LBUTTONDBLCLK (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT WM_LBUTTONDBLCLK (long /*int*/ wParam, long /*int*/ lParam) {
TVHITTESTINFO lpht = new TVHITTESTINFO ();
lpht.x = OS.GET_X_LPARAM (lParam);
lpht.y = OS.GET_Y_LPARAM (lParam);
@@ -6343,7 +6343,7 @@ LRESULT WM_LBUTTONDBLCLK (int /*long*/ wParam, int /*long*/ lParam) {
tvItem.state = state << 12;
OS.SendMessage (handle, OS.TVM_SETITEM, 0, tvItem);
if (!OS.IsWinCE) {
- int /*long*/ id = tvItem.hItem;
+ long /*int*/ id = tvItem.hItem;
if (OS.COMCTL32_MAJOR >= 6) {
id = OS.SendMessage (handle, OS.TVM_MAPHTREEITEMTOACCID, tvItem.hItem, 0);
}
@@ -6380,7 +6380,7 @@ LRESULT WM_LBUTTONDBLCLK (int /*long*/ wParam, int /*long*/ lParam) {
return result;
}
-LRESULT WM_LBUTTONDOWN (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT WM_LBUTTONDOWN (long /*int*/ wParam, long /*int*/ lParam) {
/*
* In a multi-select tree, if the user is collapsing a subtree that
* contains selected items, clear the selection from these items and
@@ -6402,7 +6402,7 @@ LRESULT WM_LBUTTONDOWN (int /*long*/ wParam, int /*long*/ lParam) {
return LRESULT.ZERO;
}
boolean fixSelection = false, deselected = false;
- int /*long*/ hOldSelection = OS.SendMessage (handle, OS.TVM_GETNEXTITEM, OS.TVGN_CARET, 0);
+ long /*int*/ hOldSelection = OS.SendMessage (handle, OS.TVM_GETNEXTITEM, OS.TVGN_CARET, 0);
if (lpht.hItem != 0 && (style & SWT.MULTI) != 0) {
if (hOldSelection != 0) {
TVITEM tvItem = new TVITEM ();
@@ -6412,7 +6412,7 @@ LRESULT WM_LBUTTONDOWN (int /*long*/ wParam, int /*long*/ lParam) {
if ((tvItem.state & OS.TVIS_EXPANDED) != 0) {
fixSelection = true;
tvItem.stateMask = OS.TVIS_SELECTED;
- int /*long*/ hNext = OS.SendMessage (handle, OS.TVM_GETNEXTITEM, OS.TVGN_NEXTVISIBLE, lpht.hItem);
+ long /*int*/ hNext = OS.SendMessage (handle, OS.TVM_GETNEXTITEM, OS.TVGN_NEXTVISIBLE, lpht.hItem);
while (hNext != 0) {
if (hNext == hAnchor) hAnchor = 0;
tvItem.hItem = hNext;
@@ -6420,7 +6420,7 @@ LRESULT WM_LBUTTONDOWN (int /*long*/ wParam, int /*long*/ lParam) {
if ((tvItem.state & OS.TVIS_SELECTED) != 0) deselected = true;
tvItem.state = 0;
OS.SendMessage (handle, OS.TVM_SETITEM, 0, tvItem);
- int /*long*/ hItem = hNext = OS.SendMessage (handle, OS.TVM_GETNEXTITEM, OS.TVGN_NEXTVISIBLE, hNext);
+ long /*int*/ hItem = hNext = OS.SendMessage (handle, OS.TVM_GETNEXTITEM, OS.TVGN_NEXTVISIBLE, hNext);
while (hItem != 0 && hItem != lpht.hItem) {
hItem = OS.SendMessage (handle, OS.TVM_GETNEXTITEM, OS.TVGN_PARENT, hItem);
}
@@ -6434,7 +6434,7 @@ LRESULT WM_LBUTTONDOWN (int /*long*/ wParam, int /*long*/ lParam) {
hSelect = lpht.hItem;
ignoreDeselect = ignoreSelect = lockSelection = true;
}
- int /*long*/ code = callWindowProc (handle, OS.WM_LBUTTONDOWN, wParam, lParam);
+ long /*int*/ code = callWindowProc (handle, OS.WM_LBUTTONDOWN, wParam, lParam);
if (!OS.IsWinCE && OS.WIN32_VERSION >= OS.VERSION (6, 0)) {
if (OS.GetFocus () != handle) OS.SetFocus (handle);
}
@@ -6442,7 +6442,7 @@ LRESULT WM_LBUTTONDOWN (int /*long*/ wParam, int /*long*/ lParam) {
hSelect = 0;
ignoreDeselect = ignoreSelect = lockSelection = false;
}
- int /*long*/ hNewSelection = OS.SendMessage (handle, OS.TVM_GETNEXTITEM, OS.TVGN_CARET, 0);
+ long /*int*/ hNewSelection = OS.SendMessage (handle, OS.TVM_GETNEXTITEM, OS.TVGN_CARET, 0);
if (hOldSelection != hNewSelection) hAnchor = hNewSelection;
if (dragStarted) {
if (!display.captureChanged && !isDisposed ()) {
@@ -6463,7 +6463,7 @@ LRESULT WM_LBUTTONDOWN (int /*long*/ wParam, int /*long*/ lParam) {
int bits = OS.GetWindowLong (handle, OS.GWL_STYLE);
if ((bits & OS.TVS_FULLROWSELECT) == 0) {
if (OS.SendMessage (handle, OS.TVM_GETIMAGELIST, OS.TVSIL_NORMAL, 0) == 0) {
- int /*long*/ hItem = OS.SendMessage (handle, OS.TVM_GETNEXTITEM, OS.TVGN_CARET, 0);
+ long /*int*/ hItem = OS.SendMessage (handle, OS.TVM_GETNEXTITEM, OS.TVGN_CARET, 0);
if (hItem != 0) {
RECT rect = new RECT ();
if (OS.TreeView_GetItemRect (handle, hItem, rect, false)) {
@@ -6510,7 +6510,7 @@ LRESULT WM_LBUTTONDOWN (int /*long*/ wParam, int /*long*/ lParam) {
tvItem.state = state << 12;
OS.SendMessage (handle, OS.TVM_SETITEM, 0, tvItem);
if (!OS.IsWinCE) {
- int /*long*/ id = tvItem.hItem;
+ long /*int*/ id = tvItem.hItem;
if (OS.COMCTL32_MAJOR >= 6) {
id = OS.SendMessage (handle, OS.TVM_MAPHTREEITEMTOACCID, tvItem.hItem, 0);
}
@@ -6558,7 +6558,7 @@ LRESULT WM_LBUTTONDOWN (int /*long*/ wParam, int /*long*/ lParam) {
}
return LRESULT.ZERO;
}
- int /*long*/ code = callWindowProc (handle, OS.WM_LBUTTONDOWN, wParam, lParam);
+ long /*int*/ code = callWindowProc (handle, OS.WM_LBUTTONDOWN, wParam, lParam);
if (!OS.IsWinCE && OS.WIN32_VERSION >= OS.VERSION (6, 0)) {
if (OS.GetFocus () != handle) OS.SetFocus (handle);
}
@@ -6581,7 +6581,7 @@ LRESULT WM_LBUTTONDOWN (int /*long*/ wParam, int /*long*/ lParam) {
}
/* Get the selected state of the last selected item */
- int /*long*/ hOldItem = OS.SendMessage (handle, OS.TVM_GETNEXTITEM, OS.TVGN_CARET, 0);
+ long /*int*/ hOldItem = OS.SendMessage (handle, OS.TVM_GETNEXTITEM, OS.TVGN_CARET, 0);
if ((style & SWT.MULTI) != 0) {
tvItem.hItem = hOldItem;
OS.SendMessage (handle, OS.TVM_GETITEM, 0, tvItem);
@@ -6634,11 +6634,11 @@ LRESULT WM_LBUTTONDOWN (int /*long*/ wParam, int /*long*/ lParam) {
hSelect = lpht.hItem;
dragStarted = gestureCompleted = false;
ignoreDeselect = ignoreSelect = true;
- int /*long*/ code = callWindowProc (handle, OS.WM_LBUTTONDOWN, wParam, lParam);
+ long /*int*/ code = callWindowProc (handle, OS.WM_LBUTTONDOWN, wParam, lParam);
if (!OS.IsWinCE && OS.WIN32_VERSION >= OS.VERSION (6, 0)) {
if (OS.GetFocus () != handle) OS.SetFocus (handle);
}
- int /*long*/ hNewItem = OS.SendMessage (handle, OS.TVM_GETNEXTITEM, OS.TVGN_CARET, 0);
+ long /*int*/ hNewItem = OS.SendMessage (handle, OS.TVM_GETNEXTITEM, OS.TVGN_CARET, 0);
if (fakeSelection) {
if (hOldItem == 0 || (hNewItem == hOldItem && lpht.hItem != hOldItem)) {
OS.SendMessage (handle, OS.TVM_SELECTITEM, OS.TVGN_CARET, lpht.hItem);
@@ -6714,10 +6714,10 @@ LRESULT WM_LBUTTONDOWN (int /*long*/ wParam, int /*long*/ lParam) {
if ((wParam & OS.MK_CONTROL) == 0) {
if (!hittestSelected || !dragStarted) {
tvItem.state = 0;
- int /*long*/ oldProc = OS.GetWindowLongPtr (handle, OS.GWLP_WNDPROC);
+ long /*int*/ oldProc = OS.GetWindowLongPtr (handle, OS.GWLP_WNDPROC);
OS.SetWindowLongPtr (handle, OS.GWLP_WNDPROC, TreeProc);
if ((style & SWT.VIRTUAL) != 0) {
- int /*long*/ hItem = OS.SendMessage (handle, OS.TVM_GETNEXTITEM, OS.TVGN_ROOT, 0);
+ long /*int*/ hItem = OS.SendMessage (handle, OS.TVM_GETNEXTITEM, OS.TVGN_ROOT, 0);
deselect (hItem, tvItem, hNewItem);
} else {
for (int i=0; i<items.length; i++) {
@@ -6740,7 +6740,7 @@ LRESULT WM_LBUTTONDOWN (int /*long*/ wParam, int /*long*/ lParam) {
if (OS.TreeView_GetItemRect (handle, hNewItem, rect2, false)) {
int flags = rect1.top < rect2.top ? OS.TVGN_NEXTVISIBLE : OS.TVGN_PREVIOUSVISIBLE;
tvItem.state = OS.TVIS_SELECTED;
- int /*long*/ hItem = tvItem.hItem = hAnchor;
+ long /*int*/ hItem = tvItem.hItem = hAnchor;
OS.SendMessage (handle, OS.TVM_SETITEM, 0, tvItem);
while (hItem != hNewItem) {
tvItem.hItem = hItem;
@@ -6786,7 +6786,7 @@ LRESULT WM_LBUTTONDOWN (int /*long*/ wParam, int /*long*/ lParam) {
return new LRESULT (code);
}
-LRESULT WM_MOUSEMOVE (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT WM_MOUSEMOVE (long /*int*/ wParam, long /*int*/ lParam) {
Display display = this.display;
LRESULT result = super.WM_MOUSEMOVE (wParam, lParam);
if (result != null) return result;
@@ -6835,19 +6835,19 @@ LRESULT WM_MOUSEMOVE (int /*long*/ wParam, int /*long*/ lParam) {
return result;
}
-LRESULT WM_MOUSEWHEEL (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT WM_MOUSEWHEEL (long /*int*/ wParam, long /*int*/ lParam) {
LRESULT result = super.WM_MOUSEWHEEL (wParam, lParam);
if (itemToolTipHandle != 0) OS.ShowWindow (itemToolTipHandle, OS.SW_HIDE);
return result;
}
-LRESULT WM_MOVE (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT WM_MOVE (long /*int*/ wParam, long /*int*/ lParam) {
if (itemToolTipHandle != 0) OS.ShowWindow (itemToolTipHandle, OS.SW_HIDE);
if (ignoreResize) return null;
return super.WM_MOVE (wParam, lParam);
}
-LRESULT WM_RBUTTONDOWN (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT WM_RBUTTONDOWN (long /*int*/ wParam, long /*int*/ lParam) {
/*
* Feature in Windows. The receiver uses WM_RBUTTONDOWN
* to initiate a drag/drop operation depending on how the
@@ -6916,7 +6916,7 @@ LRESULT WM_RBUTTONDOWN (int /*long*/ wParam, int /*long*/ lParam) {
return LRESULT.ZERO;
}
-LRESULT WM_PAINT (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT WM_PAINT (long /*int*/ wParam, long /*int*/ lParam) {
if (shrink && !ignoreShrink) {
/* Resize the item array to fit the last item */
int count = items.length - 1;
@@ -6941,7 +6941,7 @@ LRESULT WM_PAINT (int /*long*/ wParam, int /*long*/ lParam) {
}
if (doubleBuffer) {
GC gc = null;
- int /*long*/ paintDC = 0;
+ long /*int*/ paintDC = 0;
PAINTSTRUCT ps = new PAINTSTRUCT ();
boolean hooksPaint = hooks (SWT.Paint) || filters (SWT.Paint);
if (hooksPaint) {
@@ -6956,12 +6956,12 @@ LRESULT WM_PAINT (int /*long*/ wParam, int /*long*/ lParam) {
int width = ps.right - ps.left;
int height = ps.bottom - ps.top;
if (width != 0 && height != 0) {
- int /*long*/ hDC = OS.CreateCompatibleDC (paintDC);
+ long /*int*/ hDC = OS.CreateCompatibleDC (paintDC);
POINT lpPoint1 = new POINT (), lpPoint2 = new POINT ();
OS.SetWindowOrgEx (hDC, ps.left, ps.top, lpPoint1);
OS.SetBrushOrgEx (hDC, ps.left, ps.top, lpPoint2);
- int /*long*/ hBitmap = OS.CreateCompatibleBitmap (paintDC, width, height);
- int /*long*/ hOldBitmap = OS.SelectObject (hDC, hBitmap);
+ long /*int*/ hBitmap = OS.CreateCompatibleBitmap (paintDC, width, height);
+ long /*int*/ hOldBitmap = OS.SelectObject (hDC, hBitmap);
RECT rect = new RECT ();
OS.SetRect (rect, ps.left, ps.top, ps.right, ps.bottom);
drawBackground (hDC, rect);
@@ -6995,7 +6995,7 @@ LRESULT WM_PAINT (int /*long*/ wParam, int /*long*/ lParam) {
return super.WM_PAINT (wParam, lParam);
}
-LRESULT WM_PRINTCLIENT (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT WM_PRINTCLIENT (long /*int*/ wParam, long /*int*/ lParam) {
LRESULT result = super.WM_PRINTCLIENT (wParam, lParam);
if (result != null) return result;
/*
@@ -7009,12 +7009,12 @@ LRESULT WM_PRINTCLIENT (int /*long*/ wParam, int /*long*/ lParam) {
* is happening in WM_PRINTCLIENT, the redrawing is not visible.
*/
printClient = true;
- int /*long*/ code = callWindowProc (handle, OS.WM_PRINTCLIENT, wParam, lParam);
+ long /*int*/ code = callWindowProc (handle, OS.WM_PRINTCLIENT, wParam, lParam);
printClient = false;
return new LRESULT (code);
}
-LRESULT WM_SETCURSOR (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT WM_SETCURSOR (long /*int*/ wParam, long /*int*/ lParam) {
LRESULT result = super.WM_SETCURSOR (wParam, lParam);
if (result != null) return result;
@@ -7036,7 +7036,7 @@ LRESULT WM_SETCURSOR (int /*long*/ wParam, int /*long*/ lParam) {
return null;
}
-LRESULT WM_SETFOCUS (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT WM_SETFOCUS (long /*int*/ wParam, long /*int*/ lParam) {
/*
* Bug in Windows. When a tree item that has an image
* with alpha is expanded or collapsed, the area where
@@ -7066,7 +7066,7 @@ LRESULT WM_SETFOCUS (int /*long*/ wParam, int /*long*/ lParam) {
return super.WM_SETFOCUS (wParam, lParam);
}
-LRESULT WM_SETFONT (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT WM_SETFONT (long /*int*/ wParam, long /*int*/ lParam) {
LRESULT result = super.WM_SETFONT (wParam, lParam);
if (result != null) return result;
if (hwndHeader != 0) {
@@ -7091,7 +7091,7 @@ LRESULT WM_SETFONT (int /*long*/ wParam, int /*long*/ lParam) {
return result;
}
-LRESULT WM_SETREDRAW (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT WM_SETREDRAW (long /*int*/ wParam, long /*int*/ lParam) {
LRESULT result = super.WM_SETREDRAW (wParam, lParam);
if (result != null) return result;
if (itemToolTipHandle != 0) OS.ShowWindow (itemToolTipHandle, OS.SW_HIDE);
@@ -7107,13 +7107,13 @@ LRESULT WM_SETREDRAW (int /*long*/ wParam, int /*long*/ lParam) {
* Windows Vista running under the theme manager.
*/
if (!OS.IsWinCE && OS.WIN32_VERSION >= OS.VERSION (6, 0)) {
- int /*long*/ code = OS.DefWindowProc (handle, OS.WM_SETREDRAW, wParam, lParam);
+ long /*int*/ code = OS.DefWindowProc (handle, OS.WM_SETREDRAW, wParam, lParam);
return code == 0 ? LRESULT.ZERO : new LRESULT (code);
}
return result;
}
-LRESULT WM_SIZE (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT WM_SIZE (long /*int*/ wParam, long /*int*/ lParam) {
if (itemToolTipHandle != 0) OS.ShowWindow (itemToolTipHandle, OS.SW_HIDE);
/*
* Bug in Windows. When TVS_NOHSCROLL is set when the
@@ -7139,7 +7139,7 @@ LRESULT WM_SIZE (int /*long*/ wParam, int /*long*/ lParam) {
return super.WM_SIZE (wParam, lParam);
}
-LRESULT WM_SYSCOLORCHANGE (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT WM_SYSCOLORCHANGE (long /*int*/ wParam, long /*int*/ lParam) {
LRESULT result = super.WM_SYSCOLORCHANGE (wParam, lParam);
if (result != null) return result;
/*
@@ -7155,7 +7155,7 @@ LRESULT WM_SYSCOLORCHANGE (int /*long*/ wParam, int /*long*/ lParam) {
return result;
}
-LRESULT WM_VSCROLL (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT WM_VSCROLL (long /*int*/ wParam, long /*int*/ lParam) {
boolean fixScroll = false;
if ((style & SWT.DOUBLE_BUFFERED) != 0) {
int code = OS.LOWORD (wParam);
@@ -7201,7 +7201,7 @@ LRESULT WM_TIMER (int wParam, int lParam) {
* Note: Just killing the timer could cause some internal clean up task related to the
* animation not to run.
*/
- int /*long*/ bits = OS.SendMessage (handle, OS.TVM_GETEXTENDEDSTYLE, 0, 0);
+ long /*int*/ bits = OS.SendMessage (handle, OS.TVM_GETEXTENDEDSTYLE, 0, 0);
if ((bits & OS.TVS_EX_FADEINOUTEXPANDOS) != 0) {
if (!OS.IsWindowVisible (handle)) {
if (lastTimerID == wParam) {
@@ -7223,7 +7223,7 @@ LRESULT WM_TIMER (int wParam, int lParam) {
return result;
};
-LRESULT wmColorChild (int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT wmColorChild (long /*int*/ wParam, long /*int*/ lParam) {
if (findImageControl () != null) {
if (OS.COMCTL32_MAJOR < 6) {
return super.wmColorChild (wParam, lParam);
@@ -7240,7 +7240,7 @@ LRESULT wmColorChild (int /*long*/ wParam, int /*long*/ lParam) {
return null;
}
-LRESULT wmNotify (NMHDR hdr, int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT wmNotify (NMHDR hdr, long /*int*/ wParam, long /*int*/ lParam) {
if (hdr.hwndFrom == itemToolTipHandle) {
LRESULT result = wmNotifyToolTip (hdr, wParam, lParam);
if (result != null) return result;
@@ -7252,7 +7252,7 @@ LRESULT wmNotify (NMHDR hdr, int /*long*/ wParam, int /*long*/ lParam) {
return super.wmNotify (hdr, wParam, lParam);
}
-LRESULT wmNotifyChild (NMHDR hdr, int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT wmNotifyChild (NMHDR hdr, long /*int*/ wParam, long /*int*/ lParam) {
switch (hdr.code) {
case OS.TVN_GETDISPINFOA:
case OS.TVN_GETDISPINFOW: {
@@ -7579,7 +7579,7 @@ LRESULT wmNotifyChild (NMHDR hdr, int /*long*/ wParam, int /*long*/ lParam) {
* The fix is to detect this case and run the TVN_ITEMEXPANDED
* code in this method.
*/
- int /*long*/ hFirstItem = OS.SendMessage (handle, OS.TVM_GETNEXTITEM, OS.TVGN_CHILD, tvItem.hItem);
+ long /*int*/ hFirstItem = OS.SendMessage (handle, OS.TVM_GETNEXTITEM, OS.TVGN_CHILD, tvItem.hItem);
runExpanded = hFirstItem == 0;
}
if (!runExpanded) break;
@@ -7681,7 +7681,7 @@ LRESULT wmNotifyChild (NMHDR hdr, int /*long*/ wParam, int /*long*/ lParam) {
return super.wmNotifyChild (hdr, wParam, lParam);
}
-LRESULT wmNotifyHeader (NMHDR hdr, int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT wmNotifyHeader (NMHDR hdr, long /*int*/ wParam, long /*int*/ lParam) {
/*
* Feature in Windows. On NT, the automatically created
* header control is created as a UNICODE window, not an
@@ -7883,7 +7883,7 @@ LRESULT wmNotifyHeader (NMHDR hdr, int /*long*/ wParam, int /*long*/ lParam) {
return null;
}
-LRESULT wmNotifyToolTip (NMHDR hdr, int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT wmNotifyToolTip (NMHDR hdr, long /*int*/ wParam, long /*int*/ lParam) {
if (OS.IsWinCE) return null;
switch (hdr.code) {
case OS.NM_CUSTOMDRAW: {
@@ -7917,7 +7917,7 @@ LRESULT wmNotifyToolTip (NMHDR hdr, int /*long*/ wParam, int /*long*/ lParam) {
return null;
}
-LRESULT wmNotifyToolTip (NMTTCUSTOMDRAW nmcd, int /*long*/ lParam) {
+LRESULT wmNotifyToolTip (NMTTCUSTOMDRAW nmcd, long /*int*/ lParam) {
if (OS.IsWinCE) return null;
switch (nmcd.dwDrawStage) {
case OS.CDDS_PREPAINT: {
@@ -7948,10 +7948,10 @@ LRESULT wmNotifyToolTip (NMTTCUSTOMDRAW nmcd, int /*long*/ lParam) {
OS.POINTSTOPOINT (pt, pos);
OS.ScreenToClient (handle, pt);
if (findCell (pt.x, pt.y, item, index, cellRect, itemRect)) {
- int /*long*/ hDC = OS.GetDC (handle);
- int /*long*/ hFont = item [0].fontHandle (index [0]);
+ long /*int*/ hDC = OS.GetDC (handle);
+ long /*int*/ hFont = item [0].fontHandle (index [0]);
if (hFont == -1) hFont = OS.SendMessage (handle, OS.WM_GETFONT, 0, 0);
- int /*long*/ oldFont = OS.SelectObject (hDC, hFont);
+ long /*int*/ oldFont = OS.SelectObject (hDC, hFont);
boolean drawForeground = true;
cellRect [0] = item [0].getBounds (index [0], true, true, false, false, false, hDC);
if (hooks (SWT.EraseItem)) {
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/TreeColumn.java b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/TreeColumn.java
index f796cc2113..fe90b9fade 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/TreeColumn.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/TreeColumn.java
@@ -310,7 +310,7 @@ public int getWidth () {
checkWidget ();
int index = parent.indexOf (this);
if (index == -1) return 0;
- int /*long*/ hwndHeader = parent.hwndHeader;
+ long /*int*/ hwndHeader = parent.hwndHeader;
if (hwndHeader == 0) return 0;
HDITEM hdItem = new HDITEM ();
hdItem.mask = OS.HDI_WIDTH;
@@ -334,11 +334,11 @@ public void pack () {
int index = parent.indexOf (this);
if (index == -1) return;
int columnWidth = 0;
- int /*long*/ hwnd = parent.handle, hwndHeader = parent.hwndHeader;
+ long /*int*/ hwnd = parent.handle, hwndHeader = parent.hwndHeader;
RECT headerRect = new RECT ();
OS.SendMessage (hwndHeader, OS.HDM_GETITEMRECT, index, headerRect);
- int /*long*/ hDC = OS.GetDC (hwnd);
- int /*long*/ oldFont = 0, newFont = OS.SendMessage (hwnd, OS.WM_GETFONT, 0, 0);
+ long /*int*/ hDC = OS.GetDC (hwnd);
+ long /*int*/ oldFont = 0, newFont = OS.SendMessage (hwnd, OS.WM_GETFONT, 0, 0);
if (newFont != 0) oldFont = OS.SelectObject (hDC, newFont);
TVITEM tvItem = new TVITEM ();
tvItem.mask = OS.TVIF_HANDLE | OS.TVIF_PARAM | OS.TVIF_STATE;
@@ -354,7 +354,7 @@ public void pack () {
if (isDisposed () || parent.isDisposed ()) break;
itemRight = event.x + event.width;
} else {
- int /*long*/ hFont = item.fontHandle (index);
+ long /*int*/ hFont = item.fontHandle (index);
if (hFont != -1) hFont = OS.SelectObject (hDC, hFont);
RECT itemRect = item.getBounds (index, true, true, false, false, false, hDC);
if (hFont != -1) OS.SelectObject (hDC, hFont);
@@ -483,7 +483,7 @@ public void setAlignment (int alignment) {
if (index == -1 || index == 0) return;
style &= ~(SWT.LEFT | SWT.RIGHT | SWT.CENTER);
style |= alignment & (SWT.LEFT | SWT.RIGHT | SWT.CENTER);
- int /*long*/ hwndHeader = parent.hwndHeader;
+ long /*int*/ hwndHeader = parent.hwndHeader;
if (hwndHeader == 0) return;
HDITEM hdItem = new HDITEM ();
hdItem.mask = OS.HDI_FORMAT;
@@ -494,7 +494,7 @@ public void setAlignment (int alignment) {
if ((style & SWT.RIGHT) == SWT.RIGHT) hdItem.fmt |= OS.HDF_RIGHT;
OS.SendMessage (hwndHeader, OS.HDM_SETITEM, index, hdItem);
if (index != 0) {
- int /*long*/ hwnd = parent.handle;
+ long /*int*/ hwnd = parent.handle;
parent.forceResize ();
RECT rect = new RECT (), headerRect = new RECT ();
OS.GetClientRect (hwnd, rect);
@@ -519,7 +519,7 @@ public void setImage (Image image) {
void setImage (Image image, boolean sort, boolean right) {
int index = parent.indexOf (this);
if (index == -1) return;
- int /*long*/ hwndHeader = parent.hwndHeader;
+ long /*int*/ hwndHeader = parent.hwndHeader;
if (hwndHeader == 0) return;
HDITEM hdItem = new HDITEM ();
hdItem.mask = OS.HDI_FORMAT | OS.HDI_IMAGE | OS.HDI_BITMAP;
@@ -590,7 +590,7 @@ public void setResizable (boolean resizable) {
void setSortDirection (int direction) {
if (OS.COMCTL32_MAJOR >= 6) {
- int /*long*/ hwndHeader = parent.hwndHeader;
+ long /*int*/ hwndHeader = parent.hwndHeader;
if (hwndHeader != 0) {
int index = parent.indexOf (this);
if (index == -1) return;
@@ -621,7 +621,7 @@ void setSortDirection (int direction) {
}
OS.SendMessage (hwndHeader, OS.HDM_SETITEM, index, hdItem);
if (OS.COMCTL32_MAJOR >= 6 && OS.IsAppThemed ()) {
- int /*long*/ hwnd = parent.handle;
+ long /*int*/ hwnd = parent.handle;
parent.forceResize ();
RECT rect = new RECT (), headerRect = new RECT ();
OS.GetClientRect (hwnd, rect);
@@ -660,17 +660,17 @@ public void setText (String string) {
* with spaces.
*/
boolean replace = !OS.IsWinCE && OS.WIN32_VERSION <= OS.VERSION (4, 10);
- int /*long*/ hHeap = OS.GetProcessHeap ();
+ long /*int*/ hHeap = OS.GetProcessHeap ();
TCHAR buffer = new TCHAR (parent.getCodePage (), fixMnemonic (string, replace), true);
int byteCount = buffer.length () * TCHAR.sizeof;
- int /*long*/ pszText = OS.HeapAlloc (hHeap, OS.HEAP_ZERO_MEMORY, byteCount);
+ long /*int*/ pszText = OS.HeapAlloc (hHeap, OS.HEAP_ZERO_MEMORY, byteCount);
OS.MoveMemory (pszText, buffer, byteCount);
- int /*long*/ hwndHeader = parent.hwndHeader;
+ long /*int*/ hwndHeader = parent.hwndHeader;
if (hwndHeader == 0) return;
HDITEM hdItem = new HDITEM ();
hdItem.mask = OS.HDI_TEXT;
hdItem.pszText = pszText;
- int /*long*/ result = OS.SendMessage (hwndHeader, OS.HDM_SETITEM, index, hdItem);
+ long /*int*/ result = OS.SendMessage (hwndHeader, OS.HDM_SETITEM, index, hdItem);
if (pszText != 0) OS.HeapFree (hHeap, 0, pszText);
if (result == 0) error (SWT.ERROR_CANNOT_SET_TEXT);
}
@@ -700,7 +700,7 @@ public void setText (String string) {
public void setToolTipText (String string) {
checkWidget();
toolTipText = string;
- int /*long*/ hwndHeaderToolTip = parent.headerToolTipHandle;
+ long /*int*/ hwndHeaderToolTip = parent.headerToolTipHandle;
if (hwndHeaderToolTip == 0) {
parent.createHeaderToolTips ();
parent.updateHeaderToolTips ();
@@ -722,7 +722,7 @@ public void setWidth (int width) {
if (width < 0) return;
int index = parent.indexOf (this);
if (index == -1) return;
- int /*long*/ hwndHeader = parent.hwndHeader;
+ long /*int*/ hwndHeader = parent.hwndHeader;
if (hwndHeader == 0) return;
HDITEM hdItem = new HDITEM ();
hdItem.mask = OS.HDI_WIDTH;
@@ -731,7 +731,7 @@ public void setWidth (int width) {
RECT headerRect = new RECT ();
OS.SendMessage (hwndHeader, OS.HDM_GETITEMRECT, index, headerRect);
parent.forceResize ();
- int /*long*/ hwnd = parent.handle;
+ long /*int*/ hwnd = parent.handle;
RECT rect = new RECT ();
OS.GetClientRect (hwnd, rect);
rect.left = headerRect.left;
@@ -740,9 +740,9 @@ public void setWidth (int width) {
}
void updateToolTip (int index) {
- int /*long*/ hwndHeaderToolTip = parent.headerToolTipHandle;
+ long /*int*/ hwndHeaderToolTip = parent.headerToolTipHandle;
if (hwndHeaderToolTip != 0) {
- int /*long*/ hwndHeader = parent.hwndHeader;
+ long /*int*/ hwndHeader = parent.hwndHeader;
RECT rect = new RECT ();
if (OS.SendMessage (hwndHeader, OS.HDM_GETITEMRECT, index, rect) != 0) {
TOOLINFO lpti = new TOOLINFO ();
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/TreeItem.java b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/TreeItem.java
index b781d611d9..671802bfe2 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/TreeItem.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/TreeItem.java
@@ -47,7 +47,7 @@ public class TreeItem extends Item {
*
* @noreference This field is not intended to be referenced by clients.
*/
- public int /*long*/ handle;
+ public long /*int*/ handle;
Tree parent;
String [] strings;
Image [] images;
@@ -197,7 +197,7 @@ public TreeItem (TreeItem parentItem, int style, int index) {
this (checkNull (parentItem).parent, style, parentItem.handle, findPrevious (parentItem, index), 0);
}
-TreeItem (Tree parent, int style, int /*long*/ hParent, int /*long*/ hInsertAfter, int /*long*/ hItem) {
+TreeItem (Tree parent, int style, long /*int*/ hParent, long /*int*/ hInsertAfter, long /*int*/ hItem) {
super (parent, style);
this.parent = parent;
parent.createItem (this, hParent, hInsertAfter, hItem);
@@ -208,25 +208,25 @@ static TreeItem checkNull (TreeItem item) {
return item;
}
-static int /*long*/ findPrevious (Tree parent, int index) {
+static long /*int*/ findPrevious (Tree parent, int index) {
if (parent == null) return 0;
if (index < 0) SWT.error (SWT.ERROR_INVALID_RANGE);
if (index == 0) return OS.TVI_FIRST;
- int /*long*/ hwnd = parent.handle;
- int /*long*/ hFirstItem = OS.SendMessage (hwnd, OS.TVM_GETNEXTITEM, OS.TVGN_ROOT, 0);
- int /*long*/ hItem = parent.findItem (hFirstItem, index - 1);
+ long /*int*/ hwnd = parent.handle;
+ long /*int*/ hFirstItem = OS.SendMessage (hwnd, OS.TVM_GETNEXTITEM, OS.TVGN_ROOT, 0);
+ long /*int*/ hItem = parent.findItem (hFirstItem, index - 1);
if (hItem == 0) SWT.error (SWT.ERROR_INVALID_RANGE);
return hItem;
}
-static int /*long*/ findPrevious (TreeItem parentItem, int index) {
+static long /*int*/ findPrevious (TreeItem parentItem, int index) {
if (parentItem == null) return 0;
if (index < 0) SWT.error (SWT.ERROR_INVALID_RANGE);
if (index == 0) return OS.TVI_FIRST;
Tree parent = parentItem.parent;
- int /*long*/ hwnd = parent.handle, hParent = parentItem.handle;
- int /*long*/ hFirstItem = OS.SendMessage (hwnd, OS.TVM_GETNEXTITEM, OS.TVGN_CHILD, hParent);
- int /*long*/ hItem = parent.findItem (hFirstItem, index - 1);
+ long /*int*/ hwnd = parent.handle, hParent = parentItem.handle;
+ long /*int*/ hFirstItem = OS.SendMessage (hwnd, OS.TVM_GETNEXTITEM, OS.TVGN_CHILD, hParent);
+ long /*int*/ hItem = parent.findItem (hFirstItem, index - 1);
if (hItem == 0) SWT.error (SWT.ERROR_INVALID_RANGE);
return hItem;
}
@@ -241,7 +241,7 @@ void clear () {
strings = null;
images = null;
if ((parent.style & SWT.CHECK) != 0) {
- int /*long*/ hwnd = parent.handle;
+ long /*int*/ hwnd = parent.handle;
TVITEM tvItem = new TVITEM ();
tvItem.mask = OS.TVIF_HANDLE | OS.TVIF_STATE;
tvItem.stateMask = OS.TVIS_STATEIMAGEMASK;
@@ -281,8 +281,8 @@ void clear () {
*/
public void clear (int index, boolean all) {
checkWidget ();
- int /*long*/ hwnd = parent.handle;
- int /*long*/ hItem = OS.SendMessage (hwnd, OS.TVM_GETNEXTITEM, OS.TVGN_CHILD, handle);
+ long /*int*/ hwnd = parent.handle;
+ long /*int*/ hItem = OS.SendMessage (hwnd, OS.TVM_GETNEXTITEM, OS.TVGN_CHILD, handle);
if (hItem == 0) error (SWT.ERROR_INVALID_RANGE);
hItem = parent.findItem (hItem, index);
if (hItem == 0) error (SWT.ERROR_INVALID_RANGE);
@@ -316,8 +316,8 @@ public void clear (int index, boolean all) {
*/
public void clearAll (boolean all) {
checkWidget ();
- int /*long*/ hwnd = parent.handle;
- int /*long*/ hItem = OS.SendMessage (hwnd, OS.TVM_GETNEXTITEM, OS.TVGN_CHILD, handle);
+ long /*int*/ hwnd = parent.handle;
+ long /*int*/ hItem = OS.SendMessage (hwnd, OS.TVM_GETNEXTITEM, OS.TVGN_CHILD, handle);
if (hItem == 0) return;
TVITEM tvItem = new TVITEM ();
tvItem.mask = OS.TVIF_HANDLE | OS.TVIF_PARAM;
@@ -332,7 +332,7 @@ void destroyWidget () {
releaseHandle ();
}
-int /*long*/ fontHandle (int index) {
+long /*int*/ fontHandle (int index) {
if (cellFont != null && cellFont [index] != null) return cellFont [index].handle;
if (font != null) return font.handle;
return -1;
@@ -426,9 +426,9 @@ RECT getBounds (int index, boolean getText, boolean getImage, boolean fullText)
}
//TODO - take into account grid (add boolean arg) to damage less during redraw
-RECT getBounds (int index, boolean getText, boolean getImage, boolean fullText, boolean fullImage, boolean clip, int /*long*/ hDC) {
+RECT getBounds (int index, boolean getText, boolean getImage, boolean fullText, boolean fullImage, boolean clip, long /*int*/ hDC) {
if (!getText && !getImage) return new RECT ();
- int /*long*/ hwnd = parent.handle;
+ long /*int*/ hwnd = parent.handle;
if ((parent.style & SWT.VIRTUAL) == 0 && !cached && !parent.painted) {
TVITEM tvItem = new TVITEM ();
tvItem.mask = OS.TVIF_HANDLE | OS.TVIF_TEXT;
@@ -440,7 +440,7 @@ RECT getBounds (int index, boolean getText, boolean getImage, boolean fullText,
}
boolean firstColumn = index == 0;
int columnCount = 0;
- int /*long*/ hwndHeader = parent.hwndHeader;
+ long /*int*/ hwndHeader = parent.hwndHeader;
if (hwndHeader != 0) {
columnCount = parent.columnCount;
firstColumn = index == OS.SendMessage (hwndHeader, OS.HDM_ORDERTOINDEX, 0, 0);
@@ -512,7 +512,7 @@ RECT getBounds (int index, boolean getText, boolean getImage, boolean fullText,
RECT textRect = new RECT ();
TCHAR buffer = new TCHAR (parent.getCodePage (), string, false);
int flags = OS.DT_NOPREFIX | OS.DT_SINGLELINE | OS.DT_CALCRECT;
- int /*long*/ hNewDC = hDC, hFont = 0;
+ long /*int*/ hNewDC = hDC, hFont = 0;
if (hDC == 0) {
hNewDC = OS.GetDC (hwnd);
hFont = fontHandle (index);
@@ -563,12 +563,12 @@ public boolean getChecked () {
checkWidget ();
if (!parent.checkData (this, true)) error (SWT.ERROR_WIDGET_DISPOSED);
if ((parent.style & SWT.CHECK) == 0) return false;
- int /*long*/ hwnd = parent.handle;
+ long /*int*/ hwnd = parent.handle;
TVITEM tvItem = new TVITEM ();
tvItem.mask = OS.TVIF_HANDLE | OS.TVIF_STATE;
tvItem.stateMask = OS.TVIS_STATEIMAGEMASK;
tvItem.hItem = handle;
- int /*long*/ result = OS.SendMessage (hwnd, OS.TVM_GETITEM, 0, tvItem);
+ long /*int*/ result = OS.SendMessage (hwnd, OS.TVM_GETITEM, 0, tvItem);
return (result != 0) && (((tvItem.state >> 12) & 1) == 0);
}
@@ -586,7 +586,7 @@ public boolean getChecked () {
*/
public boolean getExpanded () {
checkWidget ();
- int /*long*/ hwnd = parent.handle;
+ long /*int*/ hwnd = parent.handle;
int state = 0;
if (OS.IsWinCE) {
TVITEM tvItem = new TVITEM ();
@@ -707,12 +707,12 @@ public boolean getGrayed () {
checkWidget ();
if (!parent.checkData (this, true)) error (SWT.ERROR_WIDGET_DISPOSED);
if ((parent.style & SWT.CHECK) == 0) return false;
- int /*long*/ hwnd = parent.handle;
+ long /*int*/ hwnd = parent.handle;
TVITEM tvItem = new TVITEM ();
tvItem.mask = OS.TVIF_HANDLE | OS.TVIF_STATE;
tvItem.stateMask = OS.TVIS_STATEIMAGEMASK;
tvItem.hItem = handle;
- int /*long*/ result = OS.SendMessage (hwnd, OS.TVM_GETITEM, 0, tvItem);
+ long /*int*/ result = OS.SendMessage (hwnd, OS.TVM_GETITEM, 0, tvItem);
return (result != 0) && ((tvItem.state >> 12) > 2);
}
@@ -737,10 +737,10 @@ public TreeItem getItem (int index) {
checkWidget ();
if (index < 0) error (SWT.ERROR_INVALID_RANGE);
if (!parent.checkData (this, true)) error (SWT.ERROR_WIDGET_DISPOSED);
- int /*long*/ hwnd = parent.handle;
- int /*long*/ hFirstItem = OS.SendMessage (hwnd, OS.TVM_GETNEXTITEM, OS.TVGN_CHILD, handle);
+ long /*int*/ hwnd = parent.handle;
+ long /*int*/ hFirstItem = OS.SendMessage (hwnd, OS.TVM_GETNEXTITEM, OS.TVGN_CHILD, handle);
if (hFirstItem == 0) error (SWT.ERROR_INVALID_RANGE);
- int /*long*/ hItem = parent.findItem (hFirstItem, index);
+ long /*int*/ hItem = parent.findItem (hFirstItem, index);
if (hItem == 0) error (SWT.ERROR_INVALID_RANGE);
return parent._getItem (hItem);
}
@@ -759,8 +759,8 @@ public TreeItem getItem (int index) {
public int getItemCount () {
checkWidget ();
if (!parent.checkData (this, true)) error (SWT.ERROR_WIDGET_DISPOSED);
- int /*long*/ hwnd = parent.handle;
- int /*long*/ hItem = OS.SendMessage (hwnd, OS.TVM_GETNEXTITEM, OS.TVGN_CHILD, handle);
+ long /*int*/ hwnd = parent.handle;
+ long /*int*/ hItem = OS.SendMessage (hwnd, OS.TVM_GETNEXTITEM, OS.TVGN_CHILD, handle);
if (hItem == 0) return 0;
return parent.getItemCount (hItem);
}
@@ -784,8 +784,8 @@ public int getItemCount () {
public TreeItem [] getItems () {
checkWidget ();
if (!parent.checkData (this, true)) error (SWT.ERROR_WIDGET_DISPOSED);
- int /*long*/ hwnd = parent.handle;
- int /*long*/ hItem = OS.SendMessage (hwnd, OS.TVM_GETNEXTITEM, OS.TVGN_CHILD, handle);
+ long /*int*/ hwnd = parent.handle;
+ long /*int*/ hItem = OS.SendMessage (hwnd, OS.TVM_GETNEXTITEM, OS.TVGN_CHILD, handle);
if (hItem == 0) return new TreeItem [0];
return parent.getItems (hItem);
}
@@ -872,8 +872,8 @@ public Tree getParent () {
*/
public TreeItem getParentItem () {
checkWidget ();
- int /*long*/ hwnd = parent.handle;
- int /*long*/ hItem = OS.SendMessage (hwnd, OS.TVM_GETNEXTITEM, OS.TVGN_PARENT, handle);
+ long /*int*/ hwnd = parent.handle;
+ long /*int*/ hItem = OS.SendMessage (hwnd, OS.TVM_GETNEXTITEM, OS.TVGN_PARENT, handle);
return hItem != 0 ? parent._getItem (hItem) : null;
}
@@ -961,14 +961,14 @@ public int indexOf (TreeItem item) {
checkWidget ();
if (item == null) error (SWT.ERROR_NULL_ARGUMENT);
if (item.isDisposed()) error(SWT.ERROR_INVALID_ARGUMENT);
- int /*long*/ hwnd = parent.handle;
- int /*long*/ hItem = OS.SendMessage (hwnd, OS.TVM_GETNEXTITEM, OS.TVGN_CHILD, handle);
+ long /*int*/ hwnd = parent.handle;
+ long /*int*/ hItem = OS.SendMessage (hwnd, OS.TVM_GETNEXTITEM, OS.TVGN_CHILD, handle);
return hItem == 0 ? -1 : parent.findIndex (hItem, item.handle);
}
void redraw () {
if (parent.currentItem == this || !parent.getDrawing ()) return;
- int /*long*/ hwnd = parent.handle;
+ long /*int*/ hwnd = parent.handle;
if (!OS.IsWindowVisible (hwnd)) return;
/*
* When there are no columns and the tree is not
@@ -992,7 +992,7 @@ void redraw () {
void redraw (int column, boolean drawText, boolean drawImage) {
if (parent.currentItem == this || !parent.getDrawing ()) return;
- int /*long*/ hwnd = parent.handle;
+ long /*int*/ hwnd = parent.handle;
if (!OS.IsWindowVisible (hwnd)) return;
boolean fullImage = column == 0 && drawText && drawImage;
RECT rect = getBounds (column, drawText, drawImage, true, fullImage, true, 0);
@@ -1034,7 +1034,7 @@ void releaseWidget () {
*/
public void removeAll () {
checkWidget ();
- int /*long*/ hwnd = parent.handle;
+ long /*int*/ hwnd = parent.handle;
TVITEM tvItem = new TVITEM ();
tvItem.mask = OS.TVIF_HANDLE | OS.TVIF_PARAM;
tvItem.hItem = OS.SendMessage (hwnd, OS.TVM_GETNEXTITEM, OS.TVGN_CHILD, handle);
@@ -1142,7 +1142,7 @@ public void setBackground (int index, Color color) {
public void setChecked (boolean checked) {
checkWidget ();
if ((parent.style & SWT.CHECK) == 0) return;
- int /*long*/ hwnd = parent.handle;
+ long /*int*/ hwnd = parent.handle;
TVITEM tvItem = new TVITEM ();
tvItem.mask = OS.TVIF_HANDLE | OS.TVIF_STATE;
tvItem.stateMask = OS.TVIS_STATEIMAGEMASK;
@@ -1190,7 +1190,7 @@ public void setExpanded (boolean expanded) {
checkWidget ();
/* Do nothing when the item is a leaf or already expanded */
- int /*long*/ hwnd = parent.handle;
+ long /*int*/ hwnd = parent.handle;
if (OS.SendMessage (hwnd, OS.TVM_GETNEXTITEM, OS.TVGN_CHILD, handle) == 0) {
return;
}
@@ -1229,9 +1229,9 @@ public void setExpanded (boolean expanded) {
RECT [] rects = null;
SCROLLINFO oldInfo = null;
int count = 0;
- int /*long*/ hBottomItem = 0;
+ long /*int*/ hBottomItem = 0;
boolean redraw = false, noScroll = true;
- int /*long*/ hTopItem = OS.SendMessage (hwnd, OS.TVM_GETNEXTITEM, OS.TVGN_FIRSTVISIBLE, 0);
+ long /*int*/ hTopItem = OS.SendMessage (hwnd, OS.TVM_GETNEXTITEM, OS.TVGN_FIRSTVISIBLE, 0);
if (noScroll && hTopItem != 0) {
oldInfo = new SCROLLINFO ();
oldInfo.cbSize = SCROLLINFO.sizeof;
@@ -1243,7 +1243,7 @@ public void setExpanded (boolean expanded) {
boolean noAnimate = true;
count = (int)/*64*/OS.SendMessage (hwnd, OS.TVM_GETVISIBLECOUNT, 0, 0);
rects = new RECT [count + 1];
- int /*long*/ hItem = hTopItem;
+ long /*int*/ hItem = hTopItem;
int index = 0;
while (hItem != 0 && (noAnimate || hItem != handle) && index < count) {
RECT rect = new RECT ();
@@ -1258,7 +1258,7 @@ public void setExpanded (boolean expanded) {
hBottomItem = hItem;
oldRect = new RECT ();
OS.GetClientRect (hwnd, oldRect);
- int /*long*/ topHandle = parent.topHandle ();
+ long /*int*/ topHandle = parent.topHandle ();
OS.UpdateWindow (topHandle);
OS.DefWindowProc (topHandle, OS.WM_SETREDRAW, 0, 0);
if (hwnd != topHandle) {
@@ -1285,7 +1285,7 @@ public void setExpanded (boolean expanded) {
* check whether the selection has changed and issue
* the event.
*/
- int /*long*/ hOldItem = OS.SendMessage (hwnd, OS.TVM_GETNEXTITEM, OS.TVGN_CARET, 0);
+ long /*int*/ hOldItem = OS.SendMessage (hwnd, OS.TVM_GETNEXTITEM, OS.TVGN_CARET, 0);
/* Expand or collapse the item */
parent.ignoreExpand = true;
@@ -1313,7 +1313,7 @@ public void setExpanded (boolean expanded) {
newInfo.fMask = OS.SIF_ALL;
if (OS.GetScrollInfo (hwnd, OS.SB_HORZ, newInfo)) {
if (oldInfo.nPos != newInfo.nPos) {
- int /*long*/ lParam = OS.MAKELPARAM (OS.SB_THUMBPOSITION, oldInfo.nPos);
+ long /*int*/ lParam = OS.MAKELPARAM (OS.SB_THUMBPOSITION, oldInfo.nPos);
OS.SendMessage (hwnd, OS.WM_HSCROLL, lParam, 0);
}
}
@@ -1324,7 +1324,7 @@ public void setExpanded (boolean expanded) {
RECT newRect = new RECT ();
OS.GetClientRect (hwnd, newRect);
if (OS.EqualRect (oldRect, newRect)) {
- int /*long*/ hItem = hTopItem;
+ long /*int*/ hItem = hTopItem;
int index = 0;
while (hItem != 0 && index < count) {
RECT rect = new RECT ();
@@ -1339,7 +1339,7 @@ public void setExpanded (boolean expanded) {
fixScroll = index == count && hItem == hBottomItem;
}
}
- int /*long*/ topHandle = parent.topHandle ();
+ long /*int*/ topHandle = parent.topHandle ();
OS.DefWindowProc (topHandle, OS.WM_SETREDRAW, 1, 0);
if (hwnd != topHandle) {
OS.DefWindowProc (hwnd, OS.WM_SETREDRAW, 1, 0);
@@ -1375,7 +1375,7 @@ public void setExpanded (boolean expanded) {
}
/* Check for a selection event */
- int /*long*/ hNewItem = OS.SendMessage (hwnd, OS.TVM_GETNEXTITEM, OS.TVGN_CARET, 0);
+ long /*int*/ hNewItem = OS.SendMessage (hwnd, OS.TVM_GETNEXTITEM, OS.TVGN_CARET, 0);
if (hNewItem != hOldItem) {
Event event = new Event ();
if (hNewItem != 0) {
@@ -1423,7 +1423,7 @@ public void setFont (Font font){
if ((parent.style & SWT.VIRTUAL) == 0 && !cached && !parent.painted) {
return;
}
- int /*long*/ hwnd = parent.handle;
+ long /*int*/ hwnd = parent.handle;
TVITEM tvItem = new TVITEM ();
tvItem.mask = OS.TVIF_HANDLE | OS.TVIF_TEXT;
tvItem.hItem = handle;
@@ -1478,7 +1478,7 @@ public void setFont (int index, Font font) {
if ((parent.style & SWT.VIRTUAL) == 0 && !cached && !parent.painted) {
return;
}
- int /*long*/ hwnd = parent.handle;
+ long /*int*/ hwnd = parent.handle;
TVITEM tvItem = new TVITEM ();
tvItem.mask = OS.TVIF_HANDLE | OS.TVIF_TEXT;
tvItem.hItem = handle;
@@ -1580,7 +1580,7 @@ public void setForeground (int index, Color color){
public void setGrayed (boolean grayed) {
checkWidget ();
if ((parent.style & SWT.CHECK) == 0) return;
- int /*long*/ hwnd = parent.handle;
+ long /*int*/ hwnd = parent.handle;
TVITEM tvItem = new TVITEM ();
tvItem.mask = OS.TVIF_HANDLE | OS.TVIF_STATE;
tvItem.stateMask = OS.TVIS_STATEIMAGEMASK;
@@ -1689,7 +1689,7 @@ public void setImage (int index, Image image) {
if ((parent.style & SWT.VIRTUAL) == 0 &&!cached && !parent.painted) {
return;
}
- int /*long*/ hwnd = parent.handle;
+ long /*int*/ hwnd = parent.handle;
TVITEM tvItem = new TVITEM ();
tvItem.mask = OS.TVIF_HANDLE | OS.TVIF_IMAGE | OS.TVIF_SELECTEDIMAGE;
tvItem.hItem = handle;
@@ -1729,8 +1729,8 @@ public void setImage (Image image) {
public void setItemCount (int count) {
checkWidget ();
count = Math.max (0, count);
- int /*long*/ hwnd = parent.handle;
- int /*long*/ hItem = OS.SendMessage (hwnd, OS.TVM_GETNEXTITEM, OS.TVGN_CHILD, handle);
+ long /*int*/ hwnd = parent.handle;
+ long /*int*/ hItem = OS.SendMessage (hwnd, OS.TVM_GETNEXTITEM, OS.TVGN_CHILD, handle);
parent.setItemCount (count, handle, hItem);
}
@@ -1796,7 +1796,7 @@ public void setText (int index, String string) {
if ((parent.style & SWT.VIRTUAL) == 0 && !cached && !parent.painted) {
return;
}
- int /*long*/ hwnd = parent.handle;
+ long /*int*/ hwnd = parent.handle;
TVITEM tvItem = new TVITEM ();
tvItem.mask = OS.TVIF_HANDLE | OS.TVIF_TEXT;
tvItem.hItem = handle;
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Widget.java b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Widget.java
index 1d163f08f9..723256bc8c 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Widget.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Widget.java
@@ -213,7 +213,7 @@ public void addDisposeListener (DisposeListener listener) {
addListener (SWT.Dispose, typedListener);
}
-int /*long*/ callWindowProc (int /*long*/ hwnd, int msg, int /*long*/ wParam, int /*long*/ lParam) {
+long /*int*/ callWindowProc (long /*int*/ hwnd, int msg, long /*int*/ wParam, long /*int*/ lParam) {
return 0;
}
@@ -385,7 +385,7 @@ void destroyWidget () {
releaseHandle ();
}
-int /*long*/ DeferWindowPos(int /*long*/ hWinPosInfo, int /*long*/ hWnd, int /*long*/ hWndInsertAfter, int X, int Y, int cx, int cy, int uFlags){
+long /*int*/ DeferWindowPos(long /*int*/ hWinPosInfo, long /*int*/ hWnd, long /*int*/ hWndInsertAfter, int X, int Y, int cx, int cy, int uFlags){
if (OS.IsWinCE) {
/*
* Feature in Windows. On Windows CE, DeferWindowPos always causes
@@ -446,7 +446,7 @@ public void dispose () {
release (true);
}
-boolean dragDetect (int /*long*/ hwnd, int x, int y, boolean filter, boolean [] detect, boolean [] consume) {
+boolean dragDetect (long /*int*/ hwnd, int x, int y, boolean filter, boolean [] detect, boolean [] consume) {
if (consume != null) consume [0] = false;
if (detect != null) detect [0] = true;
POINT pt = new POINT ();
@@ -472,7 +472,7 @@ boolean filters (int eventType) {
return display.filters (eventType);
}
-Widget findItem (int /*long*/ id) {
+Widget findItem (long /*int*/ id) {
return null;
}
@@ -741,7 +741,7 @@ boolean isValidThread () {
return getDisplay ().isValidThread ();
}
-void mapEvent (int /*long*/ hwnd, Event event) {
+void mapEvent (long /*int*/ hwnd, Event event) {
}
GC new_GC (GCData data) {
@@ -1094,23 +1094,23 @@ void sendSelectionEvent (int type, Event event, boolean send) {
sendEvent (type, event, send);
}
-boolean sendKeyEvent (int type, int msg, int /*long*/ wParam, int /*long*/ lParam) {
+boolean sendKeyEvent (int type, int msg, long /*int*/ wParam, long /*int*/ lParam) {
Event event = new Event ();
if (!setKeyState (event, type, wParam, lParam)) return true;
return sendKeyEvent (type, msg, wParam, lParam, event);
}
-boolean sendKeyEvent (int type, int msg, int /*long*/ wParam, int /*long*/ lParam, Event event) {
+boolean sendKeyEvent (int type, int msg, long /*int*/ wParam, long /*int*/ lParam, Event event) {
sendEvent (type, event);
if (isDisposed ()) return false;
return event.doit;
}
-boolean sendMouseEvent (int type, int button, int /*long*/ hwnd, int msg, int /*long*/ wParam, int /*long*/ lParam) {
+boolean sendMouseEvent (int type, int button, long /*int*/ hwnd, int msg, long /*int*/ wParam, long /*int*/ lParam) {
return sendMouseEvent (type, button, display.getClickCount (type, button, hwnd, lParam), 0, false, hwnd, msg, wParam, lParam);
}
-boolean sendMouseEvent (int type, int button, int count, int detail, boolean send, int /*long*/ hwnd, int msg, int /*long*/ wParam, int /*long*/ lParam) {
+boolean sendMouseEvent (int type, int button, int count, int detail, boolean send, long /*int*/ hwnd, int msg, long /*int*/ wParam, long /*int*/ lParam) {
if (!hooks (type) && !filters (type)) return true;
Event event = new Event ();
event.button = button;
@@ -1129,7 +1129,7 @@ boolean sendMouseEvent (int type, int button, int count, int detail, boolean sen
return event.doit;
}
-boolean sendMouseWheelEvent (int type, int /*long*/ hwnd, int /*long*/ wParam, int /*long*/ lParam) {
+boolean sendMouseWheelEvent (int type, long /*int*/ hwnd, long /*int*/ wParam, long /*int*/ lParam) {
int delta = OS.GET_WHEEL_DELTA_WPARAM (wParam);
int detail = 0;
if (type == SWT.MouseWheel) {
@@ -1316,7 +1316,7 @@ boolean setInputState (Event event, int type) {
return true;
}
-boolean setKeyState (Event event, int type, int /*long*/ wParam, int /*long*/ lParam) {
+boolean setKeyState (Event event, int type, long /*int*/ wParam, long /*int*/ lParam) {
/*
* Feature in Windows. When the user presses Ctrl+Backspace
@@ -1380,7 +1380,7 @@ boolean setKeyState (Event event, int type, int /*long*/ wParam, int /*long*/ lP
return setInputState (event, type);
}
-int setLocationMask (Event event, int type, int /*long*/ wParam, int /*long*/ lParam) {
+int setLocationMask (Event event, int type, long /*int*/ wParam, long /*int*/ lParam) {
int location = SWT.NONE;
if (display.lastVirtual) {
switch (display.lastKey) {
@@ -1430,7 +1430,7 @@ boolean setTabItemFocus () {
return false;
}
-boolean SetWindowPos (int /*long*/ hWnd, int /*long*/ hWndInsertAfter, int X, int Y, int cx, int cy, int uFlags) {
+boolean SetWindowPos (long /*int*/ hWnd, long /*int*/ hWndInsertAfter, int X, int Y, int cx, int cy, int uFlags) {
if (OS.IsWinCE) {
/*
* Feature in Windows. On Windows CE, SetWindowPos() always causes
@@ -1503,12 +1503,12 @@ void updateMenuLocation (Event event) {
/* Do nothing */
}
-LRESULT wmCaptureChanged (int /*long*/ hwnd, int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT wmCaptureChanged (long /*int*/ hwnd, long /*int*/ wParam, long /*int*/ lParam) {
display.captureChanged = true;
return null;
}
-LRESULT wmChar (int /*long*/ hwnd, int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT wmChar (long /*int*/ hwnd, long /*int*/ wParam, long /*int*/ lParam) {
/*
* Do not report a lead byte as a key pressed.
*/
@@ -1525,7 +1525,7 @@ LRESULT wmChar (int /*long*/ hwnd, int /*long*/ wParam, int /*long*/ lParam) {
return null;
}
-LRESULT wmContextMenu (int /*long*/ hwnd, int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT wmContextMenu (long /*int*/ hwnd, long /*int*/ wParam, long /*int*/ lParam) {
if (wParam != hwnd) return null;
/*
@@ -1574,7 +1574,7 @@ LRESULT wmContextMenu (int /*long*/ hwnd, int /*long*/ wParam, int /*long*/ lPar
return showMenu (x, y, detail) ? LRESULT.ZERO : null;
}
-LRESULT wmIMEChar (int /*long*/ hwnd, int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT wmIMEChar (long /*int*/ hwnd, long /*int*/ wParam, long /*int*/ lParam) {
Display display = this.display;
display.lastKey = 0;
display.lastAscii = (int)/*64*/wParam;
@@ -1588,7 +1588,7 @@ LRESULT wmIMEChar (int /*long*/ hwnd, int /*long*/ wParam, int /*long*/ lParam)
return LRESULT.ONE;
}
-LRESULT wmKeyDown (int /*long*/ hwnd, int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT wmKeyDown (long /*int*/ hwnd, long /*int*/ wParam, long /*int*/ lParam) {
/* Ignore repeating modifier keys by testing key down state */
switch ((int)/*64*/wParam) {
@@ -1827,7 +1827,7 @@ LRESULT wmKeyDown (int /*long*/ hwnd, int /*long*/ wParam, int /*long*/ lParam)
return null;
}
-LRESULT wmKeyUp (int /*long*/ hwnd, int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT wmKeyUp (long /*int*/ hwnd, long /*int*/ wParam, long /*int*/ lParam) {
Display display = this.display;
/* Check for hardware keys */
@@ -1929,9 +1929,9 @@ LRESULT wmKeyUp (int /*long*/ hwnd, int /*long*/ wParam, int /*long*/ lParam) {
return result;
}
-LRESULT wmKillFocus (int /*long*/ hwnd, int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT wmKillFocus (long /*int*/ hwnd, long /*int*/ wParam, long /*int*/ lParam) {
display.scrollRemainder = display.scrollHRemainder = 0;
- int /*long*/ code = callWindowProc (hwnd, OS.WM_KILLFOCUS, wParam, lParam);
+ long /*int*/ code = callWindowProc (hwnd, OS.WM_KILLFOCUS, wParam, lParam);
sendFocusEvent (SWT.FocusOut);
// widget could be disposed at this point
@@ -1947,7 +1947,7 @@ LRESULT wmKillFocus (int /*long*/ hwnd, int /*long*/ wParam, int /*long*/ lParam
return new LRESULT (code);
}
-LRESULT wmLButtonDblClk (int /*long*/ hwnd, int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT wmLButtonDblClk (long /*int*/ hwnd, long /*int*/ wParam, long /*int*/ lParam) {
/*
* Feature in Windows. Windows sends the following
* messages when the user double clicks the mouse:
@@ -1976,7 +1976,7 @@ LRESULT wmLButtonDblClk (int /*long*/ hwnd, int /*long*/ wParam, int /*long*/ lP
return result;
}
-LRESULT wmLButtonDown (int /*long*/ hwnd, int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT wmLButtonDown (long /*int*/ hwnd, long /*int*/ wParam, long /*int*/ lParam) {
Display display = this.display;
LRESULT result = null;
int x = OS.GET_X_LPARAM (lParam);
@@ -2064,7 +2064,7 @@ LRESULT wmLButtonDown (int /*long*/ hwnd, int /*long*/ wParam, int /*long*/ lPar
return result;
}
-LRESULT wmLButtonUp (int /*long*/ hwnd, int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT wmLButtonUp (long /*int*/ hwnd, long /*int*/ wParam, long /*int*/ lParam) {
Display display = this.display;
LRESULT result = null;
if (sendMouseEvent (SWT.MouseUp, 1, hwnd, OS.WM_LBUTTONUP, wParam, lParam)) {
@@ -2086,7 +2086,7 @@ LRESULT wmLButtonUp (int /*long*/ hwnd, int /*long*/ wParam, int /*long*/ lParam
return result;
}
-LRESULT wmMButtonDblClk (int /*long*/ hwnd, int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT wmMButtonDblClk (long /*int*/ hwnd, long /*int*/ wParam, long /*int*/ lParam) {
/*
* Feature in Windows. Windows sends the following
* messages when the user double clicks the mouse:
@@ -2115,7 +2115,7 @@ LRESULT wmMButtonDblClk (int /*long*/ hwnd, int /*long*/ wParam, int /*long*/ lP
return result;
}
-LRESULT wmMButtonDown (int /*long*/ hwnd, int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT wmMButtonDown (long /*int*/ hwnd, long /*int*/ wParam, long /*int*/ lParam) {
LRESULT result = null;
Display display = this.display;
display.captureChanged = false;
@@ -2130,7 +2130,7 @@ LRESULT wmMButtonDown (int /*long*/ hwnd, int /*long*/ wParam, int /*long*/ lPar
return result;
}
-LRESULT wmMButtonUp (int /*long*/ hwnd, int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT wmMButtonUp (long /*int*/ hwnd, long /*int*/ wParam, long /*int*/ lParam) {
Display display = this.display;
LRESULT result = null;
if (sendMouseEvent (SWT.MouseUp, 2, hwnd, OS.WM_MBUTTONUP, wParam, lParam)) {
@@ -2152,14 +2152,14 @@ LRESULT wmMButtonUp (int /*long*/ hwnd, int /*long*/ wParam, int /*long*/ lParam
return result;
}
-LRESULT wmMouseHover (int /*long*/ hwnd, int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT wmMouseHover (long /*int*/ hwnd, long /*int*/ wParam, long /*int*/ lParam) {
if (!sendMouseEvent (SWT.MouseHover, 0, hwnd, OS.WM_MOUSEHOVER, wParam, lParam)) {
return LRESULT.ZERO;
}
return null;
}
-LRESULT wmMouseLeave (int /*long*/ hwnd, int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT wmMouseLeave (long /*int*/ hwnd, long /*int*/ wParam, long /*int*/ lParam) {
if (!hooks (SWT.MouseExit) && !filters (SWT.MouseExit)) return null;
int pos = OS.GetMessagePos ();
POINT pt = new POINT ();
@@ -2172,7 +2172,7 @@ LRESULT wmMouseLeave (int /*long*/ hwnd, int /*long*/ wParam, int /*long*/ lPara
return null;
}
-LRESULT wmMouseMove (int /*long*/ hwnd, int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT wmMouseMove (long /*int*/ hwnd, long /*int*/ wParam, long /*int*/ lParam) {
LRESULT result = null;
Display display = this.display;
int pos = OS.GetMessagePos ();
@@ -2224,19 +2224,19 @@ LRESULT wmMouseMove (int /*long*/ hwnd, int /*long*/ wParam, int /*long*/ lParam
return result;
}
-LRESULT wmMouseWheel (int /*long*/ hwnd, int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT wmMouseWheel (long /*int*/ hwnd, long /*int*/ wParam, long /*int*/ lParam) {
return sendMouseWheelEvent(SWT.MouseWheel, hwnd, wParam, lParam) ? null : LRESULT.ZERO;
}
-LRESULT wmMouseHWheel (int /*long*/ hwnd, int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT wmMouseHWheel (long /*int*/ hwnd, long /*int*/ wParam, long /*int*/ lParam) {
return sendMouseWheelEvent(SWT.MouseHorizontalWheel, hwnd, wParam, lParam) ? null : LRESULT.ZERO;
}
-LRESULT wmNCPaint (int /*long*/ hwnd, int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT wmNCPaint (long /*int*/ hwnd, long /*int*/ wParam, long /*int*/ lParam) {
return null;
}
-LRESULT wmPaint (int /*long*/ hwnd, int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT wmPaint (long /*int*/ hwnd, long /*int*/ wParam, long /*int*/ lParam) {
/* Exit early - don't draw the background */
if (!hooks (SWT.Paint) && !filters (SWT.Paint)) {
@@ -2244,7 +2244,7 @@ LRESULT wmPaint (int /*long*/ hwnd, int /*long*/ wParam, int /*long*/ lParam) {
}
/* Issue a paint event */
- int /*long*/ result = 0;
+ long /*int*/ result = 0;
if (OS.IsWinCE) {
RECT rect = new RECT ();
OS.GetUpdateRect (hwnd, rect, false);
@@ -2282,7 +2282,7 @@ LRESULT wmPaint (int /*long*/ hwnd, int /*long*/ wParam, int /*long*/ lParam) {
gc.dispose ();
}
} else {
- int /*long*/ rgn = OS.CreateRectRgn (0, 0, 0, 0);
+ long /*int*/ rgn = OS.CreateRectRgn (0, 0, 0, 0);
OS.GetUpdateRgn (hwnd, rgn, false);
result = callWindowProc (hwnd, OS.WM_PAINT, wParam, lParam);
GCData data = new GCData ();
@@ -2295,7 +2295,7 @@ LRESULT wmPaint (int /*long*/ hwnd, int /*long*/ wParam, int /*long*/ lParam) {
int width = rect.right - rect.left;
int height = rect.bottom - rect.top;
if (width != 0 && height != 0) {
- int /*long*/ hDC = gc.handle;
+ long /*int*/ hDC = gc.handle;
OS.SelectClipRgn (hDC, rgn);
OS.SetMetaRgn (hDC);
Event event = new Event ();
@@ -2317,7 +2317,7 @@ LRESULT wmPaint (int /*long*/ hwnd, int /*long*/ wParam, int /*long*/ lParam) {
return new LRESULT (result);
}
-LRESULT wmPrint (int /*long*/ hwnd, int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT wmPrint (long /*int*/ hwnd, long /*int*/ wParam, long /*int*/ lParam) {
/*
* Bug in Windows. When WM_PRINT is used to print the contents
* of a control that has WS_EX_CLIENTEDGE, the old 3D border is
@@ -2328,7 +2328,7 @@ LRESULT wmPrint (int /*long*/ hwnd, int /*long*/ wParam, int /*long*/ lParam) {
if (OS.COMCTL32_MAJOR >= 6 && OS.IsAppThemed ()) {
int bits = OS.GetWindowLong (hwnd, OS.GWL_EXSTYLE);
if ((bits & OS.WS_EX_CLIENTEDGE) != 0) {
- int /*long*/ code = callWindowProc (hwnd, OS.WM_PRINT, wParam, lParam);
+ long /*int*/ code = callWindowProc (hwnd, OS.WM_PRINT, wParam, lParam);
RECT rect = new RECT ();
OS.GetWindowRect (hwnd, rect);
rect.right -= rect.left;
@@ -2344,7 +2344,7 @@ LRESULT wmPrint (int /*long*/ hwnd, int /*long*/ wParam, int /*long*/ lParam) {
return null;
}
-LRESULT wmRButtonDblClk (int /*long*/ hwnd, int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT wmRButtonDblClk (long /*int*/ hwnd, long /*int*/ wParam, long /*int*/ lParam) {
/*
* Feature in Windows. Windows sends the following
* messages when the user double clicks the mouse:
@@ -2373,7 +2373,7 @@ LRESULT wmRButtonDblClk (int /*long*/ hwnd, int /*long*/ wParam, int /*long*/ lP
return result;
}
-LRESULT wmRButtonDown (int /*long*/ hwnd, int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT wmRButtonDown (long /*int*/ hwnd, long /*int*/ wParam, long /*int*/ lParam) {
LRESULT result = null;
Display display = this.display;
display.captureChanged = false;
@@ -2388,7 +2388,7 @@ LRESULT wmRButtonDown (int /*long*/ hwnd, int /*long*/ wParam, int /*long*/ lPar
return result;
}
-LRESULT wmRButtonUp (int /*long*/ hwnd, int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT wmRButtonUp (long /*int*/ hwnd, long /*int*/ wParam, long /*int*/ lParam) {
Display display = this.display;
LRESULT result = null;
if (sendMouseEvent (SWT.MouseUp, 3, hwnd, OS.WM_RBUTTONUP, wParam, lParam)) {
@@ -2412,8 +2412,8 @@ LRESULT wmRButtonUp (int /*long*/ hwnd, int /*long*/ wParam, int /*long*/ lParam
return result;
}
-LRESULT wmSetFocus (int /*long*/ hwnd, int /*long*/ wParam, int /*long*/ lParam) {
- int /*long*/ code = callWindowProc (hwnd, OS.WM_SETFOCUS, wParam, lParam);
+LRESULT wmSetFocus (long /*int*/ hwnd, long /*int*/ wParam, long /*int*/ lParam) {
+ long /*int*/ code = callWindowProc (hwnd, OS.WM_SETFOCUS, wParam, lParam);
sendFocusEvent (SWT.FocusIn);
// widget could be disposed at this point
@@ -2429,7 +2429,7 @@ LRESULT wmSetFocus (int /*long*/ hwnd, int /*long*/ wParam, int /*long*/ lParam)
return new LRESULT (code);
}
-LRESULT wmSysChar (int /*long*/ hwnd, int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT wmSysChar (long /*int*/ hwnd, long /*int*/ wParam, long /*int*/ lParam) {
Display display = this.display;
display.lastAscii = (int)/*64*/wParam;
display.lastNull = wParam == 0;
@@ -2442,7 +2442,7 @@ LRESULT wmSysChar (int /*long*/ hwnd, int /*long*/ wParam, int /*long*/ lParam)
/* Call the window proc to determine whether it is a system key or mnemonic */
boolean oldKeyHit = display.mnemonicKeyHit;
display.mnemonicKeyHit = true;
- int /*long*/ result = callWindowProc (hwnd, OS.WM_SYSCHAR, wParam, lParam);
+ long /*int*/ result = callWindowProc (hwnd, OS.WM_SYSCHAR, wParam, lParam);
boolean consumed = false;
if (!display.mnemonicKeyHit) {
consumed = !sendKeyEvent (SWT.KeyDown, OS.WM_SYSCHAR, wParam, lParam);
@@ -2453,7 +2453,7 @@ LRESULT wmSysChar (int /*long*/ hwnd, int /*long*/ wParam, int /*long*/ lParam)
return consumed ? LRESULT.ONE : new LRESULT (result);
}
-LRESULT wmSysKeyDown (int /*long*/ hwnd, int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT wmSysKeyDown (long /*int*/ hwnd, long /*int*/ wParam, long /*int*/ lParam) {
/*
* Feature in Windows. When WM_SYSKEYDOWN is sent,
* the user pressed ALT+<key> or F10 to get to the
@@ -2470,7 +2470,7 @@ LRESULT wmSysKeyDown (int /*long*/ hwnd, int /*long*/ wParam, int /*long*/ lPara
/* Ignore well known system keys */
switch ((int)/*64*/wParam) {
case OS.VK_F4: {
- int /*long*/ hwndShell = hwnd;
+ long /*int*/ hwndShell = hwnd;
while (OS.GetParent (hwndShell) != 0) {
if (OS.GetWindow (hwndShell, OS.GW_OWNER) != 0) break;
hwndShell = OS.GetParent (hwndShell);
@@ -2576,11 +2576,11 @@ LRESULT wmSysKeyDown (int /*long*/ hwnd, int /*long*/ wParam, int /*long*/ lPara
return null;
}
-LRESULT wmSysKeyUp (int /*long*/ hwnd, int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT wmSysKeyUp (long /*int*/ hwnd, long /*int*/ wParam, long /*int*/ lParam) {
return wmKeyUp (hwnd, wParam, lParam);
}
-LRESULT wmXButtonDblClk (int /*long*/ hwnd, int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT wmXButtonDblClk (long /*int*/ hwnd, long /*int*/ wParam, long /*int*/ lParam) {
/*
* Feature in Windows. Windows sends the following
* messages when the user double clicks the mouse:
@@ -2610,7 +2610,7 @@ LRESULT wmXButtonDblClk (int /*long*/ hwnd, int /*long*/ wParam, int /*long*/ lP
return result;
}
-LRESULT wmXButtonDown (int /*long*/ hwnd, int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT wmXButtonDown (long /*int*/ hwnd, long /*int*/ wParam, long /*int*/ lParam) {
LRESULT result = null;
Display display = this.display;
display.captureChanged = false;
@@ -2627,7 +2627,7 @@ LRESULT wmXButtonDown (int /*long*/ hwnd, int /*long*/ wParam, int /*long*/ lPar
return result;
}
-LRESULT wmXButtonUp (int /*long*/ hwnd, int /*long*/ wParam, int /*long*/ lParam) {
+LRESULT wmXButtonUp (long /*int*/ hwnd, long /*int*/ wParam, long /*int*/ lParam) {
Display display = this.display;
LRESULT result = null;
int button = OS.HIWORD (wParam) == OS.XBUTTON1 ? 4 : 5;

Back to the top