summaryrefslogtreecommitdiffstats
path: root/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets
diff options
context:
space:
mode:
authorGrant Gayed <ggayed>2007-07-10 15:48:09 +0000
committerGrant Gayed <ggayed>2007-07-10 15:48:09 +0000
commitee543bcb83fee603dbf808a397bfdb1dd9d1075a (patch)
treea1aa553baf59df75b3aa7808883d68f1acbb0ef4 /bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets
parentef390566d4164ae7a1f970e53f45de12a5265cf6 (diff)
downloadeclipse.platform.swt-ee543bcb83fee603dbf808a397bfdb1dd9d1075a.tar.gz
eclipse.platform.swt-ee543bcb83fee603dbf808a397bfdb1dd9d1075a.tar.xz
eclipse.platform.swt-ee543bcb83fee603dbf808a397bfdb1dd9d1075a.zip
57151 - [64] 64 bit support needed for Windows XP 64-Bit EditionafterInitialReleaseOfWindows64
Diffstat (limited to 'bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets')
-rwxr-xr-xbundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Button.java67
-rwxr-xr-xbundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Canvas.java22
-rwxr-xr-xbundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Caret.java34
-rwxr-xr-xbundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/ColorDialog.java11
-rwxr-xr-xbundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Combo.java280
-rwxr-xr-xbundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Composite.java78
-rwxr-xr-xbundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Control.java356
-rwxr-xr-xbundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/CoolBar.java72
-rwxr-xr-xbundles/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.java14
-rwxr-xr-xbundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Decorations.java63
-rwxr-xr-xbundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/DirectoryDialog.java16
-rwxr-xr-xbundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Display.java274
-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
-rwxr-xr-xbundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/FileDialog.java26
-rwxr-xr-xbundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/FontDialog.java14
-rwxr-xr-xbundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Group.java42
-rwxr-xr-xbundles/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.java59
-rwxr-xr-xbundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/List.java183
-rwxr-xr-xbundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Menu.java49
-rwxr-xr-xbundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/MenuItem.java51
-rwxr-xr-xbundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/MessageBox.java2
-rwxr-xr-xbundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/ProgressBar.java28
-rwxr-xr-xbundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Sash.java38
-rwxr-xr-xbundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Scale.java42
-rwxr-xr-xbundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/ScrollBar.java41
-rwxr-xr-xbundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Scrollable.java26
-rwxr-xr-xbundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Shell.java159
-rwxr-xr-xbundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Slider.java22
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Spinner.java102
-rwxr-xr-xbundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/TabFolder.java84
-rwxr-xr-xbundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/TabItem.java8
-rwxr-xr-xbundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Table.java599
-rwxr-xr-xbundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/TableColumn.java62
-rwxr-xr-xbundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/TableItem.java61
-rwxr-xr-xbundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Text.java128
-rwxr-xr-xbundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/ToolBar.java116
-rwxr-xr-xbundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/ToolItem.java48
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/ToolTip.java18
-rwxr-xr-xbundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Tracker.java40
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/TrayItem.java6
-rwxr-xr-xbundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Tree.java712
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/TreeColumn.java42
-rwxr-xr-xbundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/TreeItem.java152
-rwxr-xr-xbundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Widget.java142
47 files changed, 2292 insertions, 2225 deletions
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 c7a40c57e6..58dfbadfe9 100755
--- 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
@@ -50,10 +50,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 ButtonProc;
+ static final int /*long*/ ButtonProc;
static final TCHAR ButtonClass = new TCHAR (0, "BUTTON", true);
static {
- int hBitmap = OS.LoadBitmap (0, OS.OBM_CHECKBOXES);
+ int /*long*/ 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);
@@ -158,7 +158,8 @@ void _setImage (Image image) {
} else {
if (image2 != null) image2.dispose ();
image2 = null;
- int hImage = 0, imageBits = 0, fImageType = 0;
+ int /*long*/ hImage = 0;
+ int imageBits = 0, fImageType = 0;
if (image != null) {
switch (image.type) {
case SWT.BITMAP: {
@@ -208,14 +209,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 hDC = OS.GetDC (handle);
- int dstHdc = OS.CreateCompatibleDC (hDC);
- int hBitmap = OS.CreateCompatibleBitmap (hDC, rect.width, rect.height);
- int oldBitmap = OS.SelectObject (dstHdc, hBitmap);
+ 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);
OS.SetLayout (dstHdc, OS.LAYOUT_RTL);
if (fImageType == OS.IMAGE_BITMAP) {
- int srcHdc = OS.CreateCompatibleDC (hDC);
- int oldSrcBitmap = OS.SelectObject (srcHdc, hImage);
+ int /*long*/ srcHdc = OS.CreateCompatibleDC (hDC);
+ int /*long*/ 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);
@@ -223,8 +224,8 @@ void _setImage (Image image) {
} else {
Control control = findBackgroundControl ();
if (control == null) control = this;
- int newBrush = OS.CreateSolidBrush (control.getBackgroundPixel ());
- int oldBrush = OS.SelectObject (dstHdc, newBrush);
+ int /*long*/ newBrush = OS.CreateSolidBrush (control.getBackgroundPixel ());
+ int /*long*/ 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);
@@ -325,7 +326,7 @@ public void addSelectionListener (SelectionListener listener) {
addListener (SWT.DefaultSelection,typedListener);
}
-int callWindowProc (int hwnd, int msg, int wParam, int lParam) {
+int /*long*/ callWindowProc (int /*long*/ hwnd, int msg, int /*long*/ wParam, int /*long*/ lParam) {
if (handle == 0) return 0;
return OS.CallWindowProc (ButtonProc, hwnd, msg, wParam, lParam);
}
@@ -364,9 +365,9 @@ int computeLeftMargin () {
if (image != null && text.length () != 0) {
Rectangle bounds = image.getBounds ();
margin += bounds.width + MARGIN * 2;
- int oldFont = 0;
- int hDC = OS.GetDC (handle);
- int newFont = OS.SendMessage (handle, OS.WM_GETFONT, 0, 0);
+ int /*long*/ oldFont = 0;
+ int /*long*/ hDC = OS.GetDC (handle);
+ int /*long*/ 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 ();
@@ -433,9 +434,9 @@ public Point computeSize (int wHint, int hHint, boolean changed) {
}
}
if (hasText) {
- int oldFont = 0;
- int hDC = OS.GetDC (handle);
- int newFont = OS.SendMessage (handle, OS.WM_GETFONT, 0, 0);
+ int /*long*/ oldFont = 0;
+ int /*long*/ hDC = OS.GetDC (handle);
+ int /*long*/ 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);
@@ -649,7 +650,7 @@ String getNameText () {
public boolean getSelection () {
checkWidget ();
if ((style & (SWT.CHECK | SWT.RADIO | SWT.TOGGLE)) == 0) return false;
- int state = OS.SendMessage (handle, OS.BM_GETCHECK, 0, 0);
+ int /*long*/ state = OS.SendMessage (handle, OS.BM_GETCHECK, 0, 0);
return (state & OS.BST_CHECKED) != 0;
}
@@ -816,7 +817,7 @@ public void setAlignment (int alignment) {
void setDefault (boolean value) {
if ((style & SWT.PUSH) == 0) return;
- int hwndShell = menuShell ().handle;
+ int /*long*/ hwndShell = menuShell ().handle;
int bits = OS.GetWindowLong (handle, OS.GWL_STYLE);
if (value) {
bits |= OS.BS_DEFPUSHBUTTON;
@@ -1027,7 +1028,7 @@ TCHAR windowClass () {
return ButtonClass;
}
-int windowProc () {
+int /*long*/ windowProc () {
return ButtonProc;
}
@@ -1054,7 +1055,7 @@ LRESULT WM_ERASEBKGND (int wParam, int lParam) {
return result;
}
-LRESULT WM_GETDLGCODE (int wParam, int lParam) {
+LRESULT WM_GETDLGCODE (int /*long*/ wParam, int /*long*/ lParam) {
LRESULT result = super.WM_GETDLGCODE (wParam, lParam);
if (result != null) return result;
if ((style & SWT.ARROW) != 0) {
@@ -1063,7 +1064,7 @@ LRESULT WM_GETDLGCODE (int wParam, int lParam) {
return result;
}
-LRESULT WM_KILLFOCUS (int wParam, int lParam) {
+LRESULT WM_KILLFOCUS (int /*long*/ wParam, int /*long*/ lParam) {
LRESULT result = super.WM_KILLFOCUS (wParam, lParam);
if ((style & SWT.PUSH) != 0 && getDefault ()) {
menuShell ().setDefaultButton (null, false);
@@ -1071,17 +1072,17 @@ LRESULT WM_KILLFOCUS (int wParam, int lParam) {
return result;
}
-LRESULT WM_LBUTTONDOWN (int wParam, int lParam) {
+LRESULT WM_LBUTTONDOWN (int /*long*/ wParam, int /*long*/ lParam) {
if (ignoreMouse) return null;
return super.WM_LBUTTONDOWN (wParam, lParam);
}
-LRESULT WM_LBUTTONUP (int wParam, int lParam) {
+LRESULT WM_LBUTTONUP (int /*long*/ wParam, int /*long*/ lParam) {
if (ignoreMouse) return null;
return super.WM_LBUTTONUP (wParam, lParam);
}
-LRESULT WM_SETFOCUS (int wParam, int lParam) {
+LRESULT WM_SETFOCUS (int /*long*/ wParam, int /*long*/ lParam) {
/*
* Feature in Windows. When Windows sets focus to
* a radio button, it sets the WM_TABSTOP style.
@@ -1102,7 +1103,7 @@ LRESULT WM_SETFOCUS (int wParam, int lParam) {
return result;
}
-LRESULT WM_SIZE (int wParam, int lParam) {
+LRESULT WM_SIZE (int /*long*/ wParam, int /*long*/ lParam) {
LRESULT result = super.WM_SIZE (wParam, lParam);
if (result != null) return result;
if (OS.COMCTL32_MAJOR >= 6) {
@@ -1120,14 +1121,14 @@ LRESULT WM_SIZE (int wParam, int lParam) {
return result;
}
-LRESULT WM_SYSCOLORCHANGE (int wParam, int lParam) {
+LRESULT WM_SYSCOLORCHANGE (int /*long*/ wParam, int /*long*/ lParam) {
LRESULT result = super.WM_SYSCOLORCHANGE (wParam, lParam);
if (result != null) return result;
if (image2 != null) _setImage (image);
return result;
}
-LRESULT WM_UPDATEUISTATE (int wParam, int lParam) {
+LRESULT WM_UPDATEUISTATE (int /*long*/ wParam, int /*long*/ lParam) {
LRESULT result = super.WM_UPDATEUISTATE (wParam, lParam);
if (result != null) return result;
/*
@@ -1154,7 +1155,7 @@ LRESULT WM_UPDATEUISTATE (int wParam, int lParam) {
}
if (redraw) {
OS.InvalidateRect (handle, null, false);
- int code = OS.DefWindowProc (handle, OS.WM_UPDATEUISTATE, wParam, lParam);
+ int /*long*/ code = OS.DefWindowProc (handle, OS.WM_UPDATEUISTATE, wParam, lParam);
return new LRESULT (code);
}
}
@@ -1162,7 +1163,7 @@ LRESULT WM_UPDATEUISTATE (int wParam, int lParam) {
return result;
}
-LRESULT wmCommandChild (int wParam, int lParam) {
+LRESULT wmCommandChild (int /*long*/ wParam, int /*long*/ lParam) {
int code = OS.HIWORD (wParam);
switch (code) {
case OS.BN_CLICKED:
@@ -1183,7 +1184,7 @@ LRESULT wmCommandChild (int wParam, int lParam) {
return super.wmCommandChild (wParam, lParam);
}
-LRESULT wmColorChild (int wParam, int lParam) {
+LRESULT wmColorChild (int /*long*/ wParam, int /*long*/ lParam) {
/*
* Bug in Windows. For some reason, the HBRUSH that
* is returned from WM_CTRLCOLOR is misaligned when
@@ -1204,7 +1205,7 @@ LRESULT wmColorChild (int wParam, int lParam) {
return result;
}
-LRESULT wmDrawChild (int wParam, int lParam) {
+LRESULT wmDrawChild (int /*long*/ wParam, int /*long*/ 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 7298c53fa2..20f61fa6a6 100755
--- 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
@@ -80,7 +80,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 hDC = OS.GetDCEx (handle, 0, OS.DCX_CACHE | OS.DCX_CLIPCHILDREN | OS.DCX_CLIPSIBLINGS);
+ int /*long*/ hDC = OS.GetDCEx (handle, 0, OS.DCX_CACHE | OS.DCX_CLIPCHILDREN | OS.DCX_CLIPSIBLINGS);
drawBackground (hDC, rect);
OS.ReleaseDC (handle, hDC);
}
@@ -144,7 +144,7 @@ public void drawBackground (GC gc, int x, int y, int width, int height) {
if (gc.isDisposed ()) error (SWT.ERROR_INVALID_ARGUMENT);
RECT rect = new RECT ();
OS.SetRect (rect, x, y, x + width, y + height);
- int hDC = gc.handle;
+ int /*long*/ hDC = gc.handle;
int pixel = background == -1 ? gc.getBackground ().handle : -1;
drawBackground (hDC, rect, pixel);
}
@@ -278,7 +278,7 @@ public void setFont (Font font) {
super.setFont (font);
}
-int windowProc (int hwnd, int msg, int wParam, int lParam) {
+int /*long*/ windowProc (int /*long*/ hwnd, int msg, int /*long*/ wParam, int /*long*/ lParam) {
if (msg == Display.SWT_RESTORECARET) {
if ((state & CANVAS) != 0) {
if (caret != null) {
@@ -291,7 +291,7 @@ int windowProc (int hwnd, int msg, int wParam, int lParam) {
return super.windowProc (hwnd, msg, wParam, lParam);
}
-LRESULT WM_IME_COMPOSITION (int wParam, int lParam) {
+LRESULT WM_IME_COMPOSITION (int /*long*/ wParam, int /*long*/ lParam) {
LRESULT result = super.WM_IME_COMPOSITION (wParam, lParam);
/*
* Bug in Windows. On Korean Windows XP, the IME window
@@ -313,7 +313,7 @@ LRESULT WM_IME_COMPOSITION (int wParam, int lParam) {
lpCompForm.dwStyle = OS.CFS_POINT;
lpCompForm.x = ptCurrentPos.x;
lpCompForm.y = ptCurrentPos.y;
- int hIMC = OS.ImmGetContext (handle);
+ int /*long*/ hIMC = OS.ImmGetContext (handle);
OS.ImmSetCompositionWindow (hIMC, lpCompForm);
OS.ImmReleaseContext (handle, hIMC);
}
@@ -324,7 +324,7 @@ LRESULT WM_IME_COMPOSITION (int wParam, int lParam) {
return result;
}
-LRESULT WM_INPUTLANGCHANGE (int wParam, int lParam) {
+LRESULT WM_INPUTLANGCHANGE (int /*long*/ wParam, int /*long*/ lParam) {
LRESULT result = super.WM_INPUTLANGCHANGE (wParam, lParam);
if (caret != null && caret.isFocusCaret ()) {
caret.setIMEFont ();
@@ -333,25 +333,25 @@ LRESULT WM_INPUTLANGCHANGE (int wParam, int lParam) {
return result;
}
-LRESULT WM_KILLFOCUS (int wParam, int lParam) {
+LRESULT WM_KILLFOCUS (int /*long*/ wParam, int /*long*/ lParam) {
LRESULT result = super.WM_KILLFOCUS (wParam, lParam);
if (caret != null) caret.killFocus ();
return result;
}
-LRESULT WM_SETFOCUS (int wParam, int lParam) {
+LRESULT WM_SETFOCUS (int /*long*/ wParam, int /*long*/ lParam) {
LRESULT result = super.WM_SETFOCUS (wParam, lParam);
if (caret != null) caret.setFocus ();
return result;
}
-LRESULT WM_SIZE (int wParam, int lParam) {
+LRESULT WM_SIZE (int /*long*/ wParam, int /*long*/ lParam) {
LRESULT result = super.WM_SIZE (wParam, lParam);
if (caret != null && caret.isFocusCaret ()) caret.resizeIME ();
return result;
}
-LRESULT WM_WINDOWPOSCHANGED (int wParam, int lParam) {
+LRESULT WM_WINDOWPOSCHANGED (int /*long*/ wParam, int /*long*/ lParam) {
LRESULT result = super.WM_WINDOWPOSCHANGED (wParam, lParam);
if (result != null) return result;
/*
@@ -366,7 +366,7 @@ LRESULT WM_WINDOWPOSCHANGED (int wParam, int lParam) {
return result;
}
-LRESULT WM_WINDOWPOSCHANGING (int wParam, int lParam) {
+LRESULT WM_WINDOWPOSCHANGING (int /*long*/ wParam, int /*long*/ 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 f5ae930e3f..6698835877 100755
--- 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
@@ -80,10 +80,10 @@ void createWidget () {
}
}
-int defaultFont () {
- int hwnd = parent.handle;
- int hwndIME = OS.ImmGetDefaultIMEWnd (hwnd);
- int hFont = 0;
+int /*long*/ defaultFont () {
+ int /*long*/ hwnd = parent.handle;
+ int /*long*/ hwndIME = OS.ImmGetDefaultIMEWnd (hwnd);
+ int /*long*/ hFont = 0;
if (hwndIME != 0) {
hFont = OS.SendMessage (hwndIME, OS.WM_GETFONT, 0, 0);
}
@@ -127,7 +127,7 @@ public Rectangle getBounds () {
public Font getFont () {
checkWidget();
if (font == null) {
- int hFont = defaultFont ();
+ int /*long*/ hFont = defaultFont ();
return Font.win32_new (display, hFont);
}
return font;
@@ -262,7 +262,7 @@ void resizeIME () {
if (!OS.IsDBLocale) return;
POINT ptCurrentPos = new POINT ();
if (!OS.GetCaretPos (ptCurrentPos)) return;
- int hwnd = parent.handle;
+ int /*long*/ hwnd = parent.handle;
RECT rect = new RECT ();
OS.GetClientRect (hwnd, rect);
COMPOSITIONFORM lpCompForm = new COMPOSITIONFORM ();
@@ -273,7 +273,7 @@ void resizeIME () {
lpCompForm.right = rect.right;
lpCompForm.top = rect.top;
lpCompForm.bottom = rect.bottom;
- int hIMC = OS.ImmGetContext (hwnd);
+ int /*long*/ hIMC = OS.ImmGetContext (hwnd);
OS.ImmSetCompositionWindow (hIMC, lpCompForm);
OS.ImmReleaseContext (hwnd, hIMC);
}
@@ -293,9 +293,9 @@ void releaseWidget () {
void resize () {
resized = false;
- int hwnd = parent.handle;
+ int /*long*/ hwnd = parent.handle;
OS.DestroyCaret ();
- int hBitmap = image != null ? image.handle : 0;
+ int /*long*/ hBitmap = image != null ? image.handle : 0;
OS.CreateCaret (hwnd, hBitmap, width, height);
OS.SetCaretPos (x, y);
OS.ShowCaret (hwnd);
@@ -305,8 +305,8 @@ void resize () {
void restoreIMEFont () {
if (!OS.IsDBLocale) return;
if (oldFont == null) return;
- int hwnd = parent.handle;
- int hIMC = OS.ImmGetContext (hwnd);
+ int /*long*/ hwnd = parent.handle;
+ int /*long*/ hIMC = OS.ImmGetContext (hwnd);
OS.ImmSetCompositionFont (hIMC, oldFont);
OS.ImmReleaseContext (hwnd, hIMC);
oldFont = null;
@@ -363,8 +363,8 @@ public void setBounds (Rectangle rect) {
}
void setFocus () {
- int hwnd = parent.handle;
- int hBitmap = 0;
+ int /*long*/ hwnd = parent.handle;
+ int /*long*/ hBitmap = 0;
if (image != null) hBitmap = image.handle;
OS.CreateCaret (hwnd, hBitmap, width, height);
move ();
@@ -422,11 +422,11 @@ public void setImage (Image image) {
void setIMEFont () {
if (!OS.IsDBLocale) return;
- int hFont = 0;
+ int /*long*/ hFont = 0;
if (font != null) hFont = font.handle;
if (hFont == 0) hFont = defaultFont ();
- int hwnd = parent.handle;
- int hIMC = OS.ImmGetContext (hwnd);
+ int /*long*/ hwnd = parent.handle;
+ int /*long*/ hIMC = OS.ImmGetContext (hwnd);
/* Save the current IME font */
if (oldFont == null) {
oldFont = OS.IsUnicode ? (LOGFONT) new LOGFONTW () : new LOGFONTA ();
@@ -537,7 +537,7 @@ public void setVisible (boolean visible) {
checkWidget();
if (visible == isVisible) return;
isVisible = visible;
- int hwnd = parent.handle;
+ int /*long*/ 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 6e3392959a..038445de42 100755
--- 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
@@ -90,8 +90,8 @@ public ColorDialog (Shell parent, int style) {
checkSubclass ();
}
-int CCHookProc (int hdlg, int uiMsg, int lParam, int lpData) {
- switch (uiMsg) {
+int /*long*/ CCHookProc (int /*long*/ hdlg, int /*long*/ uiMsg, int /*long*/ lParam, int /*long*/ lpData) {
+ switch ((int)/*64*/uiMsg) {
case OS.WM_INITDIALOG: {
RECT rect = new RECT ();
OS.GetWindowRect (hdlg, rect);
@@ -149,17 +149,17 @@ public RGB getRGB () {
public RGB open () {
/* Get the owner HWND for the dialog */
- int hwndOwner = parent.handle;
+ int /*long*/ hwndOwner = parent.handle;
/* Create the CCHookProc */
Callback callback = new Callback (this, "CCHookProc", 4); //$NON-NLS-1$
- int lpfnHook = callback.getAddress ();
+ int /*long*/ lpfnHook = callback.getAddress ();
if (lpfnHook == 0) SWT.error(SWT.ERROR_NO_MORE_CALLBACKS);
/* Allocate the Custom Colors */
display = parent.display;
if (display.lpCustColors == 0) {
- int hHeap = OS.GetProcessHeap ();
+ int /*long*/ hHeap = OS.GetProcessHeap ();
display.lpCustColors = OS.HeapAlloc (hHeap, OS.HEAP_ZERO_MEMORY, 16 * 4);
}
@@ -221,6 +221,7 @@ public RGB open () {
*/
// if (hwndOwner != 0) OS.UpdateWindow (hwndOwner);
+ display = null;
if (!success) return null;
return rgb;
}
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 378c235859..d0b7744e46 100755
--- 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
@@ -55,8 +55,8 @@ import org.eclipse.swt.events.*;
public class Combo extends Composite {
boolean noSelection, ignoreDefaultSelection, ignoreCharacter, ignoreModify;
- int cbtHook, scrollWidth, visibleCount = 5;
-
+ int scrollWidth, visibleCount = 5;
+ int /*long*/ cbtHook;
/**
* the operating system limit for the number of characters
* that the text field in an instance of this class can hold
@@ -80,9 +80,9 @@ public class Combo extends Composite {
*/
static final int CBID_LIST = 1000;
static final int CBID_EDIT = 1001;
- static /*final*/ int EditProc, ListProc;
+ static /*final*/ int /*long*/ EditProc, ListProc;
- static final int ComboProc;
+ static final int /*long*/ ComboProc;
static final TCHAR ComboClass = new TCHAR (0, "COMBOBOX", true);
static {
WNDCLASS lpWndClass = new WNDCLASS ();
@@ -146,7 +146,7 @@ public void add (String string) {
checkWidget ();
if (string == null) error (SWT.ERROR_NULL_ARGUMENT);
TCHAR buffer = new TCHAR (getCodePage (), string, true);
- int result = OS.SendMessage (handle, OS.CB_ADDSTRING, 0, buffer);
+ int result = (int)/*64*/OS.SendMessage (handle, OS.CB_ADDSTRING, 0, buffer);
if (result == OS.CB_ERR) error (SWT.ERROR_ITEM_NOT_ADDED);
if (result == OS.CB_ERRSPACE) error (SWT.ERROR_ITEM_NOT_ADDED);
if ((style & SWT.H_SCROLL) != 0) setScrollWidth (buffer, true);
@@ -178,12 +178,12 @@ public void add (String string) {
public void add (String string, int index) {
checkWidget ();
if (string == null) error (SWT.ERROR_NULL_ARGUMENT);
- int count = OS.SendMessage (handle, OS.CB_GETCOUNT, 0, 0);
+ int count = (int)/*64*/OS.SendMessage (handle, OS.CB_GETCOUNT, 0, 0);
if (!(0 <= index && index <= count)) {
error (SWT.ERROR_INVALID_RANGE);
}
TCHAR buffer = new TCHAR (getCodePage (), string, true);
- int result = OS.SendMessage (handle, OS.CB_INSERTSTRING, index, buffer);
+ int result = (int)/*64*/OS.SendMessage (handle, OS.CB_INSERTSTRING, index, buffer);
if (result == OS.CB_ERRSPACE || result == OS.CB_ERR) {
error (SWT.ERROR_ITEM_NOT_ADDED);
}
@@ -276,24 +276,24 @@ public void addVerifyListener (VerifyListener listener) {
addListener (SWT.Verify, typedListener);
}
-int callWindowProc (int hwnd, int msg, int wParam, int lParam) {
+int /*long*/ callWindowProc (int /*long*/ hwnd, int msg, int /*long*/ wParam, int /*long*/ lParam) {
if (handle == 0) return 0;
if (hwnd == handle) {
return OS.CallWindowProc (ComboProc, hwnd, msg, wParam, lParam);
}
- int hwndText = OS.GetDlgItem (handle, CBID_EDIT);
+ int /*long*/ hwndText = OS.GetDlgItem (handle, CBID_EDIT);
if (hwnd == hwndText) {
return OS.CallWindowProc (EditProc, hwnd, msg, wParam, lParam);
}
- int hwndList = OS.GetDlgItem (handle, CBID_LIST);
+ int /*long*/ 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 CBTProc (int nCode, int wParam, int lParam) {
- if (nCode == OS.HCBT_CREATEWND) {
+int /*long*/ CBTProc (int /*long*/ nCode, int /*long*/ wParam, int /*long*/ lParam) {
+ if ((int)/*64*/nCode == OS.HCBT_CREATEWND) {
TCHAR buffer = new TCHAR (0, 128);
OS.GetClassName (wParam, buffer, buffer.length ());
String className = buffer.toString (0, buffer.strlen ());
@@ -302,10 +302,10 @@ int CBTProc (int nCode, int wParam, int lParam) {
OS.SetWindowLong (wParam, OS.GWL_STYLE, bits & ~OS.ES_NOHIDESEL);
}
}
- return OS.CallNextHookEx (cbtHook, nCode, wParam, lParam);
+ return OS.CallNextHookEx (cbtHook, (int)/*64*/nCode, wParam, lParam);
}
-boolean checkHandle (int hwnd) {
+boolean checkHandle (int /*long*/ hwnd) {
return hwnd == handle || hwnd == OS.GetDlgItem (handle, CBID_EDIT) || hwnd == OS.GetDlgItem (handle, CBID_LIST);
}
@@ -367,11 +367,11 @@ public Point computeSize (int wHint, int hHint, boolean changed) {
checkWidget ();
int width = 0, height = 0;
if (wHint == SWT.DEFAULT) {
- int newFont, oldFont = 0;
- int hDC = OS.GetDC (handle);
+ int /*long*/ newFont, oldFont = 0;
+ int /*long*/ hDC = OS.GetDC (handle);
newFont = OS.SendMessage (handle, OS.WM_GETFONT, 0, 0);
if (newFont != 0) oldFont = OS.SelectObject (hDC, newFont);
- int count = OS.SendMessage (handle, OS.CB_GETCOUNT, 0, 0);
+ int count = (int)/*64*/OS.SendMessage (handle, OS.CB_GETCOUNT, 0, 0);
RECT rect = new RECT ();
int flags = OS.DT_CALCRECT | OS.DT_NOPREFIX;
if ((style & SWT.READ_ONLY) == 0) flags |= OS.DT_EDITCONTROL;
@@ -385,10 +385,10 @@ public Point computeSize (int wHint, int hHint, boolean changed) {
width = Math.max (width, scrollWidth);
} else {
for (int i=0; i<count; i++) {
- length = OS.SendMessage (handle, OS.CB_GETLBTEXTLEN, i, 0);
+ length = (int)/*64*/OS.SendMessage (handle, OS.CB_GETLBTEXTLEN, i, 0);
if (length != OS.CB_ERR) {
if (length + 1 > buffer.length ()) buffer = new TCHAR (cp, length + 1);
- int result = OS.SendMessage (handle, OS.CB_GETLBTEXT, i, buffer);
+ int result = (int)/*64*/OS.SendMessage (handle, OS.CB_GETLBTEXT, i, buffer);
if (result != OS.CB_ERR) {
OS.DrawText (hDC, buffer, length, rect, flags);
width = Math.max (width, rect.right - rect.left);
@@ -401,8 +401,8 @@ public Point computeSize (int wHint, int hHint, boolean changed) {
}
if (hHint == SWT.DEFAULT) {
if ((style & SWT.SIMPLE) != 0) {
- int count = OS.SendMessage (handle, OS.CB_GETCOUNT, 0, 0);
- int itemHeight = OS.SendMessage (handle, OS.CB_GETITEMHEIGHT, 0, 0);
+ int count = (int)/*64*/OS.SendMessage (handle, OS.CB_GETCOUNT, 0, 0);
+ int itemHeight = (int)/*64*/OS.SendMessage (handle, OS.CB_GETITEMHEIGHT, 0, 0);
height = count * itemHeight;
}
}
@@ -413,9 +413,9 @@ public Point computeSize (int wHint, int hHint, boolean changed) {
if ((style & SWT.READ_ONLY) != 0) {
width += 8;
} else {
- int hwndText = OS.GetDlgItem (handle, CBID_EDIT);
+ int /*long*/ hwndText = OS.GetDlgItem (handle, CBID_EDIT);
if (hwndText != 0) {
- int margins = OS.SendMessage (hwndText, OS.EM_GETMARGINS, 0, 0);
+ int /*long*/ margins = OS.SendMessage (hwndText, OS.EM_GETMARGINS, 0, 0);
int marginWidth = OS.LOWORD (margins) + OS.HIWORD (margins);
width += marginWidth + 3;
}
@@ -428,7 +428,7 @@ public Point computeSize (int wHint, int hHint, boolean changed) {
} else {
int border = OS.GetSystemMetrics (OS.SM_CXEDGE);
width += OS.GetSystemMetrics (OS.SM_CXVSCROLL) + border * 2;
- int textHeight = OS.SendMessage (handle, OS.CB_GETITEMHEIGHT, -1, 0);
+ int textHeight = (int)/*64*/OS.SendMessage (handle, OS.CB_GETITEMHEIGHT, -1, 0);
if ((style & SWT.DROP_DOWN) != 0) {
height = textHeight + 6;
} else {
@@ -475,7 +475,7 @@ void createHandle () {
} else {
int threadId = OS.GetCurrentThreadId ();
Callback cbtCallback = new Callback (this, "CBTProc", 3); //$NON-NLS-1$
- int cbtProc = cbtCallback.getAddress ();
+ int /*long*/ cbtProc = cbtCallback.getAddress ();
if (cbtProc == 0) error (SWT.ERROR_NO_MORE_CALLBACKS);
cbtHook = OS.SetWindowsHookEx (OS.WH_CBT, cbtProc, 0, threadId);
super.createHandle ();
@@ -486,13 +486,13 @@ void createHandle () {
state &= ~(CANVAS | THEME_BACKGROUND);
/* Get the text and list window procs */
- int hwndText = OS.GetDlgItem (handle, CBID_EDIT);
+ int /*long*/ hwndText = OS.GetDlgItem (handle, CBID_EDIT);
if (hwndText != 0 && EditProc == 0) {
- EditProc = OS.GetWindowLong (hwndText, OS.GWL_WNDPROC);
+ EditProc = OS.GetWindowLongPtr (hwndText, OS.GWLP_WNDPROC);
}
- int hwndList = OS.GetDlgItem (handle, CBID_LIST);
+ int /*long*/ hwndList = OS.GetDlgItem (handle, CBID_LIST);
if (hwndList != 0 && ListProc == 0) {
- ListProc = OS.GetWindowLong (hwndList, OS.GWL_WNDPROC);
+ ListProc = OS.GetWindowLongPtr (hwndList, OS.GWLP_WNDPROC);
}
/*
@@ -534,9 +534,9 @@ int defaultBackground () {
void deregister () {
super.deregister ();
- int hwndText = OS.GetDlgItem (handle, CBID_EDIT);
+ int /*long*/ hwndText = OS.GetDlgItem (handle, CBID_EDIT);
if (hwndText != 0) display.removeControl (hwndText);
- int hwndList = OS.GetDlgItem (handle, CBID_LIST);
+ int /*long*/ hwndList = OS.GetDlgItem (handle, CBID_LIST);
if (hwndList != 0) display.removeControl (hwndList);
}
@@ -554,7 +554,7 @@ void deregister () {
*/
public void deselect (int index) {
checkWidget ();
- int selection = OS.SendMessage (handle, OS.CB_GETCURSEL, 0, 0);
+ int selection = (int)/*64*/OS.SendMessage (handle, OS.CB_GETCURSEL, 0, 0);
if (index != selection) return;
OS.SendMessage (handle, OS.CB_SETCURSEL, -1, 0);
sendEvent (SWT.Modify);
@@ -582,14 +582,14 @@ public void deselectAll () {
// widget could be disposed at this point
}
-boolean dragDetect (int hwnd, int x, int y, boolean filter, boolean [] detect, boolean [] consume) {
+boolean dragDetect (int /*long*/ hwnd, int x, int y, boolean filter, boolean [] detect, boolean [] consume) {
if (filter && (style & SWT.READ_ONLY) == 0) {
- int hwndText = OS.GetDlgItem (handle, CBID_EDIT);
+ int /*long*/ 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 lParam = OS.MAKELPARAM (x, y);
+ int /*long*/ 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)) {
@@ -622,13 +622,13 @@ boolean dragDetect (int hwnd, int x, int y, boolean filter, boolean [] detect, b
*/
public String getItem (int index) {
checkWidget ();
- int length = OS.SendMessage (handle, OS.CB_GETLBTEXTLEN, index, 0);
+ int length = (int)/*64*/OS.SendMessage (handle, OS.CB_GETLBTEXTLEN, index, 0);
if (length != OS.CB_ERR) {
TCHAR buffer = new TCHAR (getCodePage (), length + 1);
- int result = OS.SendMessage (handle, OS.CB_GETLBTEXT, index, buffer);
+ int result = (int)/*64*/OS.SendMessage (handle, OS.CB_GETLBTEXT, index, buffer);
if (result != OS.CB_ERR) return buffer.toString (0, length);
}
- int count = OS.SendMessage (handle, OS.CB_GETCOUNT, 0, 0);
+ int count = (int)/*64*/OS.SendMessage (handle, OS.CB_GETCOUNT, 0, 0);
if (0 <= index && index < count) error (SWT.ERROR_CANNOT_GET_ITEM);
error (SWT.ERROR_INVALID_RANGE);
return "";
@@ -646,7 +646,7 @@ public String getItem (int index) {
*/
public int getItemCount () {
checkWidget ();
- int count = OS.SendMessage (handle, OS.CB_GETCOUNT, 0, 0);
+ int count = (int)/*64*/OS.SendMessage (handle, OS.CB_GETCOUNT, 0, 0);
if (count == OS.CB_ERR) error (SWT.ERROR_CANNOT_GET_COUNT);
return count;
}
@@ -664,7 +664,7 @@ public int getItemCount () {
*/
public int getItemHeight () {
checkWidget ();
- int result = OS.SendMessage (handle, OS.CB_GETITEMHEIGHT, 0, 0);
+ int result = (int)/*64*/OS.SendMessage (handle, OS.CB_GETITEMHEIGHT, 0, 0);
if (result == OS.CB_ERR) error (SWT.ERROR_CANNOT_GET_ITEM_HEIGHT);
return result;
}
@@ -788,7 +788,7 @@ public Point getSelection () {
public int getSelectionIndex () {
checkWidget ();
if (noSelection) return -1;
- return OS.SendMessage (handle, OS.CB_GETCURSEL, 0, 0);
+ return (int)/*64*/OS.SendMessage (handle, OS.CB_GETCURSEL, 0, 0);
}
/**
@@ -829,7 +829,7 @@ public int getTextHeight () {
if (((style & SWT.SIMPLE) == 0) && !OS.IsWinCE && OS.GetComboBoxInfo (handle, pcbi)) {
return (pcbi.buttonBottom - pcbi.buttonTop) + pcbi.buttonTop * 2;
}
- int result = OS.SendMessage (handle, OS.CB_GETITEMHEIGHT, -1, 0);
+ int result = (int)/*64*/OS.SendMessage (handle, OS.CB_GETITEMHEIGHT, -1, 0);
if (result == OS.CB_ERR) error (SWT.ERROR_CANNOT_GET_ITEM_HEIGHT);
return (style & SWT.DROP_DOWN) != 0 ? result + 6 : result + 10;
}
@@ -851,9 +851,9 @@ public int getTextHeight () {
*/
public int getTextLimit () {
checkWidget ();
- int hwndText = OS.GetDlgItem (handle, CBID_EDIT);
+ int /*long*/ hwndText = OS.GetDlgItem (handle, CBID_EDIT);
if (hwndText == 0) return LIMIT;
- return OS.SendMessage (hwndText, OS.EM_GETLIMITTEXT, 0, 0) & 0x7FFFFFFF;
+ return (int)/*64*/OS.SendMessage (hwndText, OS.EM_GETLIMITTEXT, 0, 0) & 0x7FFFFFFF;
}
/**
@@ -879,12 +879,12 @@ public int getVisibleItemCount () {
}
boolean hasFocus () {
- int hwndFocus = OS.GetFocus ();
+ int /*long*/ hwndFocus = OS.GetFocus ();
if (hwndFocus == handle) return true;
if (hwndFocus == 0) return false;
- int hwndText = OS.GetDlgItem (handle, CBID_EDIT);
+ int /*long*/ hwndText = OS.GetDlgItem (handle, CBID_EDIT);
if (hwndFocus == hwndText) return true;
- int hwndList = OS.GetDlgItem (handle, CBID_LIST);
+ int /*long*/ hwndList = OS.GetDlgItem (handle, CBID_LIST);
if (hwndFocus == hwndList) return true;
return false;
}
@@ -948,12 +948,12 @@ public int indexOf (String string, int start) {
}
/* Use CB_FINDSTRINGEXACT to search for the item */
- int count = OS.SendMessage (handle, OS.CB_GETCOUNT, 0, 0);
+ int count = (int)/*64*/OS.SendMessage (handle, OS.CB_GETCOUNT, 0, 0);
if (!(0 <= start && start < count)) return -1;
int index = start - 1, last = 0;
TCHAR buffer = new TCHAR (getCodePage (), string, true);
do {
- index = OS.SendMessage (handle, OS.CB_FINDSTRINGEXACT, last = index, buffer);
+ index = (int)/*64*/OS.SendMessage (handle, OS.CB_FINDSTRINGEXACT, last = index, buffer);
if (index == OS.CB_ERR || index <= last) return -1;
} while (!string.equals (getItem (index)));
return index;
@@ -962,7 +962,7 @@ public int indexOf (String string, int start) {
int mbcsToWcsPos (int mbcsPos) {
if (mbcsPos <= 0) return 0;
if (OS.IsUnicode) return mbcsPos;
- int hwndText = OS.GetDlgItem (handle, CBID_EDIT);
+ int /*long*/ hwndText = OS.GetDlgItem (handle, CBID_EDIT);
if (hwndText == 0) return mbcsPos;
int mbcsSize = OS.GetWindowTextLengthA (hwndText);
if (mbcsSize == 0) return 0;
@@ -994,9 +994,9 @@ public void paste () {
void register () {
super.register ();
- int hwndText = OS.GetDlgItem (handle, CBID_EDIT);
+ int /*long*/ hwndText = OS.GetDlgItem (handle, CBID_EDIT);
if (hwndText != 0) display.addControl (hwndText, this);
- int hwndList = OS.GetDlgItem (handle, CBID_LIST);
+ int /*long*/ hwndList = OS.GetDlgItem (handle, CBID_LIST);
if (hwndList != 0) display.addControl (hwndList, this);
}
@@ -1022,24 +1022,24 @@ public void remove (int index) {
void remove (int index, boolean notify) {
TCHAR buffer = null;
if ((style & SWT.H_SCROLL) != 0) {
- int length = OS.SendMessage (handle, OS.CB_GETLBTEXTLEN, index, 0);
+ int length = (int)/*64*/OS.SendMessage (handle, OS.CB_GETLBTEXTLEN, index, 0);
if (length == OS.CB_ERR) {
- int count = OS.SendMessage (handle, OS.CB_GETCOUNT, 0, 0);
+ int count = (int)/*64*/OS.SendMessage (handle, OS.CB_GETCOUNT, 0, 0);
if (0 <= index && index < count) error (SWT.ERROR_ITEM_NOT_REMOVED);
error (SWT.ERROR_INVALID_RANGE);
}
buffer = new TCHAR (getCodePage (), length + 1);
- int result = OS.SendMessage (handle, OS.CB_GETLBTEXT, index, buffer);
+ int result = (int)/*64*/OS.SendMessage (handle, OS.CB_GETLBTEXT, index, buffer);
if (result == OS.CB_ERR) {
- int count = OS.SendMessage (handle, OS.CB_GETCOUNT, 0, 0);
+ int count = (int)/*64*/OS.SendMessage (handle, OS.CB_GETCOUNT, 0, 0);
if (0 <= index && index < count) error (SWT.ERROR_ITEM_NOT_REMOVED);
error (SWT.ERROR_INVALID_RANGE);
}
}
int length = OS.GetWindowTextLength (handle);
- int code = OS.SendMessage (handle, OS.CB_DELETESTRING, index, 0);
+ int code = (int)/*64*/OS.SendMessage (handle, OS.CB_DELETESTRING, index, 0);
if (code == OS.CB_ERR) {
- int count = OS.SendMessage (handle, OS.CB_GETCOUNT, 0, 0);
+ int count = (int)/*64*/OS.SendMessage (handle, OS.CB_GETCOUNT, 0, 0);
if (0 <= index && index < count) error (SWT.ERROR_ITEM_NOT_REMOVED);
error (SWT.ERROR_INVALID_RANGE);
}
@@ -1056,7 +1056,7 @@ void remove (int index, boolean notify) {
* force a redraw.
*/
if ((style & SWT.READ_ONLY) != 0) {
- int count = OS.SendMessage (handle, OS.CB_GETCOUNT, 0, 0);
+ int count = (int)/*64*/OS.SendMessage (handle, OS.CB_GETCOUNT, 0, 0);
if (count == 0) OS.InvalidateRect (handle, null, true);
}
}
@@ -1080,13 +1080,14 @@ void remove (int index, boolean notify) {
public void remove (int start, int end) {
checkWidget ();
if (start > end) return;
- int count = OS.SendMessage (handle, OS.CB_GETCOUNT, 0, 0);
+ int count = (int)/*64*/OS.SendMessage (handle, OS.CB_GETCOUNT, 0, 0);
if (!(0 <= start && start <= end && end < count)) {
error (SWT.ERROR_INVALID_RANGE);
}
int textLength = OS.GetWindowTextLength (handle);
RECT rect = null;
- int hDC = 0, oldFont = 0, newFont = 0, newWidth = 0;
+ int /*long*/ hDC = 0, oldFont = 0, newFont = 0;
+ int newWidth = 0;
if ((style & SWT.H_SCROLL) != 0) {
rect = new RECT ();
hDC = OS.GetDC (handle);
@@ -1098,13 +1099,13 @@ public void remove (int start, int end) {
for (int i=start; i<=end; i++) {
TCHAR buffer = null;
if ((style & SWT.H_SCROLL) != 0) {
- int length = OS.SendMessage (handle, OS.CB_GETLBTEXTLEN, start, 0);
+ int length = (int)/*64*/OS.SendMessage (handle, OS.CB_GETLBTEXTLEN, start, 0);
if (length == OS.CB_ERR) break;
buffer = new TCHAR (cp, length + 1);
- int result = OS.SendMessage (handle, OS.CB_GETLBTEXT, start, buffer);
+ int result = (int)/*64*/OS.SendMessage (handle, OS.CB_GETLBTEXT, start, buffer);
if (result == OS.CB_ERR) break;
}
- int result = OS.SendMessage (handle, OS.CB_DELETESTRING, start, 0);
+ int result = (int)/*64*/OS.SendMessage (handle, OS.CB_DELETESTRING, start, 0);
if (result == OS.CB_ERR) error (SWT.ERROR_ITEM_NOT_REMOVED);
if ((style & SWT.H_SCROLL) != 0) {
OS.DrawText (hDC, buffer, -1, rect, flags);
@@ -1128,7 +1129,7 @@ public void remove (int start, int end) {
* force a redraw.
*/
if ((style & SWT.READ_ONLY) != 0) {
- count = OS.SendMessage (handle, OS.CB_GETCOUNT, 0, 0);
+ count = (int)/*64*/OS.SendMessage (handle, OS.CB_GETCOUNT, 0, 0);
if (count == 0) OS.InvalidateRect (handle, null, true);
}
}
@@ -1249,7 +1250,7 @@ public void removeVerifyListener (VerifyListener listener) {
eventTable.unhook (SWT.Verify, listener);
}
-boolean sendKeyEvent (int type, int msg, int wParam, int lParam, Event event) {
+boolean sendKeyEvent (int type, int msg, int /*long*/ wParam, int /*long*/ lParam, Event event) {
if (!super.sendKeyEvent (type, msg, wParam, lParam, event)) {
return false;
}
@@ -1287,7 +1288,7 @@ boolean sendKeyEvent (int type, int msg, int wParam, int lParam, Event event) {
/* Verify the character */
String oldText = "";
int [] start = new int [1], end = new int [1];
- int hwndText = OS.GetDlgItem (handle, CBID_EDIT);
+ int /*long*/ hwndText = OS.GetDlgItem (handle, CBID_EDIT);
if (hwndText == 0) return true;
OS.SendMessage (hwndText, OS.EM_GETSEL, start, end);
switch (key) {
@@ -1348,10 +1349,10 @@ boolean sendKeyEvent (int type, int msg, int wParam, int lParam, Event event) {
*/
public void select (int index) {
checkWidget ();
- int count = OS.SendMessage (handle, OS.CB_GETCOUNT, 0, 0);
+ int count = (int)/*64*/OS.SendMessage (handle, OS.CB_GETCOUNT, 0, 0);
if (0 <= index && index < count) {
- int selection = OS.SendMessage (handle, OS.CB_GETCURSEL, 0, 0);
- int code = OS.SendMessage (handle, OS.CB_SETCURSEL, index, 0);
+ int selection = (int)/*64*/OS.SendMessage (handle, OS.CB_GETCURSEL, 0, 0);
+ int code = (int)/*64*/OS.SendMessage (handle, OS.CB_SETCURSEL, index, 0);
if (code != OS.CB_ERR && code != selection) {
sendEvent (SWT.Modify);
// widget could be disposed at this point
@@ -1359,19 +1360,19 @@ public void select (int index) {
}
}
-void setBackgroundImage (int hBitmap) {
+void setBackgroundImage (int /*long*/ hBitmap) {
super.setBackgroundImage (hBitmap);
- int hwndText = OS.GetDlgItem (handle, CBID_EDIT);
+ int /*long*/ hwndText = OS.GetDlgItem (handle, CBID_EDIT);
if (hwndText != 0) OS.InvalidateRect (hwndText, null, true);
- int hwndList = OS.GetDlgItem (handle, CBID_LIST);
+ int /*long*/ hwndList = OS.GetDlgItem (handle, CBID_LIST);
if (hwndList != 0) OS.InvalidateRect (hwndList, null, true);
}
void setBackgroundPixel (int pixel) {
super.setBackgroundPixel (pixel);
- int hwndText = OS.GetDlgItem (handle, CBID_EDIT);
+ int /*long*/ hwndText = OS.GetDlgItem (handle, CBID_EDIT);
if (hwndText != 0) OS.InvalidateRect (hwndText, null, true);
- int hwndList = OS.GetDlgItem (handle, CBID_LIST);
+ int /*long*/ hwndList = OS.GetDlgItem (handle, CBID_LIST);
if (hwndList != 0) OS.InvalidateRect (hwndList, null, true);
}
@@ -1430,9 +1431,9 @@ public void setFont (Font font) {
void setForegroundPixel (int pixel) {
super.setForegroundPixel (pixel);
- int hwndText = OS.GetDlgItem (handle, CBID_EDIT);
+ int /*long*/ hwndText = OS.GetDlgItem (handle, CBID_EDIT);
if (hwndText != 0) OS.InvalidateRect (hwndText, null, true);
- int hwndList = OS.GetDlgItem (handle, CBID_LIST);
+ int /*long*/ hwndList = OS.GetDlgItem (handle, CBID_LIST);
if (hwndList != 0) OS.InvalidateRect (hwndList, null, true);
}
@@ -1483,7 +1484,8 @@ public void setItems (String [] items) {
if (items [i] == null) error (SWT.ERROR_INVALID_ARGUMENT);
}
RECT rect = null;
- int hDC = 0, oldFont = 0, newFont = 0, newWidth = 0;
+ int /*long*/ hDC = 0, oldFont = 0, newFont = 0;
+ int newWidth = 0;
if ((style & SWT.H_SCROLL) != 0) {
rect = new RECT ();
hDC = OS.GetDC (handle);
@@ -1496,7 +1498,7 @@ public void setItems (String [] items) {
for (int i=0; i<items.length; i++) {
String string = items [i];
TCHAR buffer = new TCHAR (codePage, string, true);
- int code = OS.SendMessage (handle, OS.CB_ADDSTRING, 0, buffer);
+ int code = (int)/*64*/OS.SendMessage (handle, OS.CB_ADDSTRING, 0, buffer);
if (code == OS.CB_ERR) error (SWT.ERROR_ITEM_NOT_ADDED);
if (code == OS.CB_ERRSPACE) error (SWT.ERROR_ITEM_NOT_ADDED);
if ((style & SWT.H_SCROLL) != 0) {
@@ -1568,7 +1570,7 @@ public void setOrientation (int orientation) {
bits &= ~OS.WS_EX_LAYOUTRTL;
}
OS.SetWindowLong (handle, OS.GWL_EXSTYLE, bits);
- int hwndText = 0, hwndList = 0;
+ int /*long*/ hwndText = 0, hwndList = 0;
COMBOBOXINFO pcbi = new COMBOBOXINFO ();
pcbi.cbSize = COMBOBOXINFO.sizeof;
if (OS.GetComboBoxInfo (handle, pcbi)) {
@@ -1620,18 +1622,18 @@ public void setOrientation (int orientation) {
void setScrollWidth () {
int newWidth = 0;
RECT rect = new RECT ();
- int newFont, oldFont = 0;
- int hDC = OS.GetDC (handle);
+ int /*long*/ newFont, oldFont = 0;
+ int /*long*/ hDC = OS.GetDC (handle);
newFont = OS.SendMessage (handle, OS.WM_GETFONT, 0, 0);
if (newFont != 0) oldFont = OS.SelectObject (hDC, newFont);
int cp = getCodePage ();
- int count = OS.SendMessage (handle, OS.CB_GETCOUNT, 0, 0);
+ int count = (int)/*64*/OS.SendMessage (handle, OS.CB_GETCOUNT, 0, 0);
int flags = OS.DT_CALCRECT | OS.DT_SINGLELINE | OS.DT_NOPREFIX;
for (int i=0; i<count; i++) {
- int length = OS.SendMessage (handle, OS.CB_GETLBTEXTLEN, i, 0);
+ int length = (int)/*64*/OS.SendMessage (handle, OS.CB_GETLBTEXTLEN, i, 0);
if (length != OS.CB_ERR) {
TCHAR buffer = new TCHAR (cp, length + 1);
- int result = OS.SendMessage (handle, OS.CB_GETLBTEXT, i, buffer);
+ int result = (int)/*64*/OS.SendMessage (handle, OS.CB_GETLBTEXT, i, buffer);
if (result != OS.CB_ERR) {
OS.DrawText (hDC, buffer, -1, rect, flags);
newWidth = Math.max (newWidth, rect.right - rect.left);
@@ -1650,7 +1652,7 @@ void setScrollWidth (int scrollWidth) {
return;
}
boolean scroll = false;
- int count = OS.SendMessage (handle, OS.CB_GETCOUNT, 0, 0);
+ int count = (int)/*64*/OS.SendMessage (handle, OS.CB_GETCOUNT, 0, 0);
if (count > 3) {
int maxWidth = 0;
if (OS.IsWinCE || OS.WIN32_VERSION < OS.VERSION (4, 10)) {
@@ -1658,7 +1660,7 @@ void setScrollWidth (int scrollWidth) {
OS.SystemParametersInfo (OS.SPI_GETWORKAREA, 0, rect, 0);
maxWidth = (rect.right - rect.left) / 4;
} else {
- int hmonitor = OS.MonitorFromWindow (handle, OS.MONITOR_DEFAULTTONEAREST);
+ int /*long*/ hmonitor = OS.MonitorFromWindow (handle, OS.MONITOR_DEFAULTTONEAREST);
MONITORINFO lpmi = new MONITORINFO ();
lpmi.cbSize = MONITORINFO.sizeof;
OS.GetMonitorInfo (hmonitor, lpmi);
@@ -1678,8 +1680,8 @@ void setScrollWidth (int scrollWidth) {
void setScrollWidth (TCHAR buffer, boolean grow) {
RECT rect = new RECT ();
- int newFont, oldFont = 0;
- int hDC = OS.GetDC (handle);
+ int /*long*/ newFont, oldFont = 0;
+ int /*long*/ 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;
@@ -1723,7 +1725,7 @@ public void setSelection (Point selection) {
start = wcsToMbcsPos (start);
end = wcsToMbcsPos (end);
}
- int bits = OS.MAKELPARAM (start, end);
+ int /*long*/ bits = OS.MAKELPARAM (start, end);
OS.SendMessage (handle, OS.CB_SETEDITSEL, 0, bits);
}
@@ -1757,9 +1759,9 @@ public void setText (String string) {
return;
}
int limit = LIMIT;
- int hwndText = OS.GetDlgItem (handle, CBID_EDIT);
+ int /*long*/ hwndText = OS.GetDlgItem (handle, CBID_EDIT);
if (hwndText != 0) {
- limit = OS.SendMessage (hwndText, OS.EM_GETLIMITTEXT, 0, 0);
+ limit = (int)/*64*/OS.SendMessage (hwndText, OS.EM_GETLIMITTEXT, 0, 0) & 0x7FFFFFFF;
}
if (string.length () > limit) string = string.substring (0, limit);
TCHAR buffer = new TCHAR (getCodePage (), string, true);
@@ -1796,8 +1798,8 @@ public void setTextLimit (int limit) {
}
void setToolTipText (Shell shell, String string) {
- int hwndText = OS.GetDlgItem (handle, CBID_EDIT);
- int hwndList = OS.GetDlgItem (handle, CBID_LIST);
+ int /*long*/ hwndText = OS.GetDlgItem (handle, CBID_EDIT);
+ int /*long*/ hwndList = OS.GetDlgItem (handle, CBID_LIST);
if (hwndText != 0) shell.setToolTipText (hwndText, string);
if (hwndList != 0) shell.setToolTipText (hwndList, string);
shell.setToolTipText (handle, string);
@@ -1835,14 +1837,14 @@ public void setVisibleItemCount (int count) {
void subclass () {
super.subclass ();
- int newProc = display.windowProc;
- int hwndText = OS.GetDlgItem (handle, CBID_EDIT);
+ int /*long*/ newProc = display.windowProc;
+ int /*long*/ hwndText = OS.GetDlgItem (handle, CBID_EDIT);
if (hwndText != 0) {
- OS.SetWindowLong (hwndText, OS.GWL_WNDPROC, newProc);
+ OS.SetWindowLongPtr (hwndText, OS.GWLP_WNDPROC, newProc);
}
- int hwndList = OS.GetDlgItem (handle, CBID_LIST);
+ int /*long*/ hwndList = OS.GetDlgItem (handle, CBID_LIST);
if (hwndList != 0) {
- OS.SetWindowLong (hwndList, OS.GWL_WNDPROC, newProc);
+ OS.SetWindowLongPtr (hwndList, OS.GWLP_WNDPROC, newProc);
}
}
@@ -1852,7 +1854,7 @@ boolean translateTraversal (MSG msg) {
* to select an item in the list and escape to close
* the combo box.
*/
- switch (msg.wParam) {
+ switch ((int)/*64*/(msg.wParam)) {
case OS.VK_RETURN:
case OS.VK_ESCAPE:
if ((style & SWT.DROP_DOWN) != 0) {
@@ -1886,13 +1888,13 @@ boolean traverseReturn () {
void unsubclass () {
super.unsubclass ();
- int hwndText = OS.GetDlgItem (handle, CBID_EDIT);
+ int /*long*/ hwndText = OS.GetDlgItem (handle, CBID_EDIT);
if (hwndText != 0 && EditProc != 0) {
- OS.SetWindowLong (hwndText, OS.GWL_WNDPROC, EditProc);
+ OS.SetWindowLongPtr (hwndText, OS.GWLP_WNDPROC, EditProc);
}
- int hwndList = OS.GetDlgItem (handle, CBID_LIST);
+ int /*long*/ hwndList = OS.GetDlgItem (handle, CBID_LIST);
if (hwndList != 0 && ListProc != 0) {
- OS.SetWindowLong (hwndList, OS.GWL_WNDPROC, ListProc);
+ OS.SetWindowLongPtr (hwndList, OS.GWLP_WNDPROC, ListProc);
}
}
@@ -1924,7 +1926,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 hwndText = OS.GetDlgItem (handle, CBID_EDIT);
+ int /*long*/ hwndText = OS.GetDlgItem (handle, CBID_EDIT);
if (hwndText == 0) return wcsPos;
int mbcsSize = OS.GetWindowTextLengthA (hwndText);
if (mbcsSize == 0) return 0;
@@ -1954,15 +1956,15 @@ TCHAR windowClass () {
return ComboClass;
}
-int windowProc () {
+int /*long*/ windowProc () {
return ComboProc;
}
-int windowProc (int hwnd, int msg, int wParam, int lParam) {
+int /*long*/ windowProc (int /*long*/ hwnd, int msg, int /*long*/ wParam, int /*long*/ lParam) {
if (handle == 0) return 0;
if (hwnd != handle) {
- int hwndText = OS.GetDlgItem (handle, CBID_EDIT);
- int hwndList = OS.GetDlgItem (handle, CBID_LIST);
+ int /*long*/ hwndText = OS.GetDlgItem (handle, CBID_EDIT);
+ int /*long*/ hwndList = OS.GetDlgItem (handle, CBID_LIST);
if ((hwndText != 0 && hwnd == hwndText) || (hwndList != 0 && hwnd == hwndList)) {
LRESULT result = null;
switch (msg) {
@@ -2024,7 +2026,7 @@ int windowProc (int hwnd, int msg, int wParam, int lParam) {
newText = "";
} else {
if (0 <= wParam && wParam < getItemCount ()) {
- newText = getItem (wParam);
+ newText = getItem ((int)/*64*/wParam);
}
}
if (newText != null && !newText.equals (oldText)) {
@@ -2045,16 +2047,16 @@ int windowProc (int hwnd, int msg, int wParam, int lParam) {
return super.windowProc (hwnd, msg, wParam, lParam);
}
-LRESULT WM_CTLCOLOR (int wParam, int lParam) {
+LRESULT WM_CTLCOLOR (int /*long*/ wParam, int /*long*/ lParam) {
return wmColorChild (wParam, lParam);
}
-LRESULT WM_GETDLGCODE (int wParam, int lParam) {
- int code = callWindowProc (handle, OS.WM_GETDLGCODE, wParam, lParam);
+LRESULT WM_GETDLGCODE (int /*long*/ wParam, int /*long*/ lParam) {
+ int /*long*/ code = callWindowProc (handle, OS.WM_GETDLGCODE, wParam, lParam);
return new LRESULT (code | OS.DLGC_WANTARROWS);
}
-LRESULT WM_KILLFOCUS (int wParam, int lParam) {
+LRESULT WM_KILLFOCUS (int /*long*/ wParam, int /*long*/ lParam) {
/*
* Bug in Windows. When a combo box that is read only
* is disposed in CBN_KILLFOCUS, Windows segment faults.
@@ -2074,7 +2076,7 @@ LRESULT WM_KILLFOCUS (int wParam, int lParam) {
return null;
}
-LRESULT WM_LBUTTONDOWN (int wParam, int lParam) {
+LRESULT WM_LBUTTONDOWN (int /*long*/ wParam, int /*long*/ lParam) {
/*
* Feature in Windows. When an editable combo box is dropped
* down and the text in the entry field partially matches an
@@ -2082,11 +2084,11 @@ LRESULT WM_LBUTTONDOWN (int wParam, int lParam) {
* WM_COMMAND with CBN_SELCHANGE. The fix is to detect that
* the selection has changed and issue the notification.
*/
- int oldSelection = OS.SendMessage (handle, OS.CB_GETCURSEL, 0, 0);
+ int oldSelection = (int)/*64*/OS.SendMessage (handle, OS.CB_GETCURSEL, 0, 0);
LRESULT result = super.WM_LBUTTONDOWN (wParam, lParam);
if (result == LRESULT.ZERO) return result;
if ((style & SWT.READ_ONLY) == 0) {
- int newSelection = OS.SendMessage (handle, OS.CB_GETCURSEL, 0, 0);
+ int newSelection = (int)/*64*/OS.SendMessage (handle, OS.CB_GETCURSEL, 0, 0);
if (oldSelection != newSelection) {
sendEvent (SWT.Modify);
if (isDisposed ()) return LRESULT.ZERO;
@@ -2097,7 +2099,7 @@ LRESULT WM_LBUTTONDOWN (int wParam, int lParam) {
return result;
}
-LRESULT WM_SETFOCUS (int wParam, int lParam) {
+LRESULT WM_SETFOCUS (int /*long*/ wParam, int /*long*/ lParam) {
/*
* Return NULL - Focus notification is
* done by WM_COMMAND with CBN_SETFOCUS.
@@ -2105,7 +2107,7 @@ LRESULT WM_SETFOCUS (int wParam, int lParam) {
return null;
}
-LRESULT WM_SIZE (int wParam, int lParam) {
+LRESULT WM_SIZE (int /*long*/ wParam, int /*long*/ lParam) {
/*
* Bug in Windows. If the combo box has the CBS_SIMPLE style,
* the list portion of the combo box is not redrawn when the
@@ -2116,9 +2118,9 @@ LRESULT WM_SIZE (int wParam, int lParam) {
LRESULT result = super.WM_SIZE (wParam, lParam);
if (OS.IsWindowVisible (handle)) {
if (OS.IsWinCE) {
- int hwndText = OS.GetDlgItem (handle, CBID_EDIT);
+ int /*long*/ hwndText = OS.GetDlgItem (handle, CBID_EDIT);
if (hwndText != 0) OS.InvalidateRect (hwndText, null, true);
- int hwndList = OS.GetDlgItem (handle, CBID_LIST);
+ int /*long*/ 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;
@@ -2139,7 +2141,7 @@ LRESULT WM_SIZE (int wParam, int lParam) {
if ((style & SWT.READ_ONLY) != 0) {
result = super.WM_SIZE (wParam, lParam);
} else {
- int index = OS.SendMessage (handle, OS.CB_GETCURSEL, 0, 0);
+ int index = (int)/*64*/OS.SendMessage (handle, OS.CB_GETCURSEL, 0, 0);
boolean redraw = false;
TCHAR buffer = null;
int [] start = null, end = null;
@@ -2165,7 +2167,7 @@ LRESULT WM_SIZE (int wParam, int lParam) {
if (isDisposed ()) return result;
if (buffer != null) {
OS.SetWindowText (handle, buffer);
- int bits = OS.MAKELPARAM (start [0], end [0]);
+ int /*long*/ bits = OS.MAKELPARAM (start [0], end [0]);
OS.SendMessage (handle, OS.CB_SETEDITSEL, 0, bits);
if (redraw) setRedraw (true);
}
@@ -2180,7 +2182,7 @@ LRESULT WM_SIZE (int wParam, int lParam) {
return result;
}
-LRESULT wmChar (int hwnd, int wParam, int lParam) {
+LRESULT wmChar (int /*long*/ hwnd, int /*long*/ wParam, int /*long*/ lParam) {
if (ignoreCharacter) return null;
LRESULT result = super.wmChar (hwnd, wParam, lParam);
if (result != null) return result;
@@ -2194,7 +2196,7 @@ LRESULT wmChar (int hwnd, int wParam, int lParam) {
* NOTE: This only happens when the drop down list
* is not visible.
*/
- switch (wParam) {
+ switch ((int)/*64*/wParam) {
case SWT.TAB: return LRESULT.ZERO;
case SWT.CR:
if (!ignoreDefaultSelection) postEvent (SWT.DefaultSelection);
@@ -2210,7 +2212,7 @@ LRESULT wmChar (int hwnd, int wParam, int lParam) {
return result;
}
-LRESULT wmClipboard (int hwndText, int msg, int wParam, int lParam) {
+LRESULT wmClipboard (int /*long*/ hwndText, int msg, int /*long*/ wParam, int /*long*/ lParam) {
if ((style & SWT.READ_ONLY) != 0) return null;
if (!hooks (SWT.Verify) && !filters (SWT.Verify)) return null;
boolean call = false;
@@ -2268,11 +2270,11 @@ LRESULT wmClipboard (int hwndText, int msg, int wParam, int lParam) {
}
TCHAR buffer = new TCHAR (getCodePage (), newText, true);
if (msg == OS.WM_SETTEXT) {
- int hHeap = OS.GetProcessHeap ();
+ int /*long*/ hHeap = OS.GetProcessHeap ();
int byteCount = buffer.length () * TCHAR.sizeof;
- int pszText = OS.HeapAlloc (hHeap, OS.HEAP_ZERO_MEMORY, byteCount);
+ int /*long*/ pszText = OS.HeapAlloc (hHeap, OS.HEAP_ZERO_MEMORY, byteCount);
OS.MoveMemory (pszText, buffer, byteCount);
- int code = OS.CallWindowProc (EditProc, hwndText, msg, wParam, pszText);
+ int /*long*/ code = OS.CallWindowProc (EditProc, hwndText, msg, wParam, pszText);
OS.HeapFree (hHeap, 0, pszText);
return new LRESULT (code);
} else {
@@ -2284,7 +2286,7 @@ LRESULT wmClipboard (int hwndText, int msg, int wParam, int lParam) {
return null;
}
-LRESULT wmCommandChild (int wParam, int lParam) {
+LRESULT wmCommandChild (int /*long*/ wParam, int /*long*/ lParam) {
int code = OS.HIWORD (wParam);
switch (code) {
case OS.CBN_EDITCHANGE:
@@ -2313,7 +2315,7 @@ LRESULT wmCommandChild (int wParam, int lParam) {
* match the list selection. The fix is to force the text field
* to match the list selection by re-selecting the list item.
*/
- int index = OS.SendMessage (handle, OS.CB_GETCURSEL, 0, 0);
+ int index = (int)/*64*/OS.SendMessage (handle, OS.CB_GETCURSEL, 0, 0);
if (index != OS.CB_ERR) {
OS.SendMessage (handle, OS.CB_SETCURSEL, index, 0);
}
@@ -2349,12 +2351,12 @@ LRESULT wmCommandChild (int wParam, int lParam) {
return super.wmCommandChild (wParam, lParam);
}
-LRESULT wmIMEChar (int hwnd, int wParam, int lParam) {
+LRESULT wmIMEChar (int /*long*/ hwnd, int /*long*/ wParam, int /*long*/ lParam) {
/* Process a DBCS character */
Display display = this.display;
display.lastKey = 0;
- display.lastAscii = wParam;
+ display.lastAscii = (int)/*64*/wParam;
display.lastVirtual = display.lastNull = display.lastDead = false;
if (!sendKeyEvent (SWT.KeyDown, OS.WM_IME_CHAR, wParam, lParam)) {
return LRESULT.ZERO;
@@ -2368,7 +2370,7 @@ LRESULT wmIMEChar (int hwnd, int wParam, int lParam) {
* them to the application.
*/
ignoreCharacter = true;
- int result = callWindowProc (hwnd, OS.WM_IME_CHAR, wParam, lParam);
+ int /*long*/ 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)) {
@@ -2383,7 +2385,7 @@ LRESULT wmIMEChar (int hwnd, int wParam, int lParam) {
return new LRESULT (result);
}
-LRESULT wmKeyDown (int hwnd, int wParam, int lParam) {
+LRESULT wmKeyDown (int /*long*/ hwnd, int /*long*/ wParam, int /*long*/ lParam) {
if (ignoreCharacter) return null;
LRESULT result = super.wmKeyDown (hwnd, wParam, lParam);
if (result != null) return result;
@@ -2398,7 +2400,7 @@ LRESULT wmKeyDown (int hwnd, int wParam, int lParam) {
return result;
}
-LRESULT wmSysKeyDown (int hwnd, int wParam, int lParam) {
+LRESULT wmSysKeyDown (int /*long*/ hwnd, int /*long*/ wParam, int /*long*/ lParam) {
/*
* Feature in Windows. When an editable combo box is dropped
* down using Alt+Down and the text in the entry field partially
@@ -2406,13 +2408,13 @@ LRESULT wmSysKeyDown (int hwnd, int wParam, int lParam) {
* send WM_COMMAND with CBN_SELCHANGE. The fix is to detect that
* the selection has changed and issue the notification.
*/
- int oldSelection = OS.SendMessage (handle, OS.CB_GETCURSEL, 0, 0);
+ int oldSelection = (int)/*64*/OS.SendMessage (handle, OS.CB_GETCURSEL, 0, 0);
LRESULT result = super.wmSysKeyDown (hwnd, wParam, lParam);
if (result != null) return result;
if ((style & SWT.READ_ONLY) == 0) {
if (wParam == OS.VK_DOWN) {
- int code = callWindowProc (hwnd, OS.WM_SYSKEYDOWN, wParam, lParam);
- int newSelection = OS.SendMessage (handle, OS.CB_GETCURSEL, 0, 0);
+ int /*long*/ 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);
if (isDisposed ()) return LRESULT.ZERO;
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 f36e09b19c..cfe6cae3cb 100755
--- 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
@@ -48,7 +48,7 @@ import org.eclipse.swt.graphics.*;
public class Composite extends Scrollable {
Layout layout;
- int font;
+ int /*long*/ font;
WINDOWPOS [] lpwp;
Control [] tabList;
int layoutCount, backgroundMode;
@@ -95,7 +95,7 @@ public Composite (Composite parent, int style) {
Control [] _getChildren () {
int count = 0;
- int hwndChild = OS.GetWindow (handle, OS.GW_CHILD);
+ int /*long*/ hwndChild = OS.GetWindow (handle, OS.GW_CHILD);
if (hwndChild == 0) return new Control [0];
while (hwndChild != 0) {
count++;
@@ -344,7 +344,7 @@ int getChildrenCount () {
* non-registered children.
*/
int count = 0;
- int hwndChild = OS.GetWindow (handle, OS.GW_CHILD);
+ int /*long*/ hwndChild = OS.GetWindow (handle, OS.GW_CHILD);
while (hwndChild != 0) {
count++;
hwndChild = OS.GetWindow (hwndChild, OS.GW_HWNDNEXT);
@@ -668,7 +668,7 @@ void releaseChildren (boolean destroy) {
void releaseWidget () {
super.releaseWidget ();
if ((state & CANVAS) != 0 && (style & SWT.EMBEDDED) != 0) {
- int hwndChild = OS.GetWindow (handle, OS.GW_CHILD);
+ int /*long*/ hwndChild = OS.GetWindow (handle, OS.GW_CHILD);
if (hwndChild != 0) {
int threadId = OS.GetWindowThreadProcessId (hwndChild, null);
if (threadId != OS.GetCurrentThreadId ()) {
@@ -700,7 +700,7 @@ void resizeChildren () {
boolean resizeChildren (boolean defer, WINDOWPOS [] pwp) {
if (pwp == null) return true;
- int hdwp = 0;
+ int /*long*/ hdwp = 0;
if (defer) {
hdwp = OS.BeginDeferWindowPos (pwp.length);
if (hdwp == 0) return false;
@@ -730,7 +730,7 @@ boolean resizeChildren (boolean defer, WINDOWPOS [] pwp) {
return true;
}
-void resizeEmbeddedHandle(int embeddedHandle, int width, int height) {
+void resizeEmbeddedHandle(int /*long*/ embeddedHandle, int width, int height) {
if (embeddedHandle == 0) return;
int [] processID = new int [1];
int threadId = OS.GetWindowThreadProcessId (embeddedHandle, processID);
@@ -959,7 +959,7 @@ boolean translateMnemonic (Event event, Control control) {
boolean translateTraversal (MSG msg) {
if ((state & CANVAS) != 0 ) {
if ((style & SWT.EMBEDDED) != 0) return false;
- switch (msg.wParam) {
+ switch ((int)/*64*/msg.wParam) {
case OS.VK_UP:
case OS.VK_LEFT:
case OS.VK_DOWN:
@@ -1039,7 +1039,7 @@ int widgetStyle () {
return super.widgetStyle () | OS.WS_CLIPCHILDREN;
}
-LRESULT WM_ERASEBKGND (int wParam, int lParam) {
+LRESULT WM_ERASEBKGND (int /*long*/ wParam, int /*long*/ lParam) {
LRESULT result = super.WM_ERASEBKGND (wParam, lParam);
if (result != null) return result;
if ((state & CANVAS) != 0) {
@@ -1049,7 +1049,7 @@ LRESULT WM_ERASEBKGND (int wParam, int lParam) {
return result;
}
-LRESULT WM_GETDLGCODE (int wParam, int lParam) {
+LRESULT WM_GETDLGCODE (int /*long*/ wParam, int /*long*/ lParam) {
LRESULT result = super.WM_GETDLGCODE (wParam, lParam);
if (result != null) return result;
if ((state & CANVAS) != 0) {
@@ -1064,16 +1064,16 @@ LRESULT WM_GETDLGCODE (int wParam, int lParam) {
return result;
}
-LRESULT WM_GETFONT (int wParam, int lParam) {
+LRESULT WM_GETFONT (int /*long*/ wParam, int /*long*/ lParam) {
LRESULT result = super.WM_GETFONT (wParam, lParam);
if (result != null) return result;
- int code = callWindowProc (handle, OS.WM_GETFONT, wParam, lParam);
+ int /*long*/ 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_LBUTTONDOWN (int wParam, int lParam) {
+LRESULT WM_LBUTTONDOWN (int /*long*/ wParam, int /*long*/ lParam) {
LRESULT result = super.WM_LBUTTONDOWN (wParam, lParam);
if (result == LRESULT.ZERO) return result;
@@ -1086,7 +1086,7 @@ LRESULT WM_LBUTTONDOWN (int wParam, int lParam) {
return result;
}
-LRESULT WM_NCPAINT (int wParam, int lParam) {
+LRESULT WM_NCPAINT (int /*long*/ wParam, int /*long*/ lParam) {
LRESULT result = super.WM_NCPAINT (wParam, lParam);
if (result != null) return result;
if ((state & CANVAS) != 0) {
@@ -1095,7 +1095,7 @@ LRESULT WM_NCPAINT (int wParam, int lParam) {
return result;
}
-LRESULT WM_PARENTNOTIFY (int wParam, int lParam) {
+LRESULT WM_PARENTNOTIFY (int /*long*/ wParam, int /*long*/ lParam) {
if ((state & CANVAS) != 0 && (style & SWT.EMBEDDED) != 0) {
if (OS.LOWORD (wParam) == OS.WM_CREATE) {
RECT rect = new RECT ();
@@ -1106,7 +1106,7 @@ LRESULT WM_PARENTNOTIFY (int wParam, int lParam) {
return super.WM_PARENTNOTIFY (wParam, lParam);
}
-LRESULT WM_PAINT (int wParam, int lParam) {
+LRESULT WM_PAINT (int /*long*/ wParam, int /*long*/ lParam) {
if ((state & CANVAS) == 0 || (state & FOREIGN_HANDLE) != 0) {
return super.WM_PAINT (wParam, lParam);
}
@@ -1133,15 +1133,15 @@ LRESULT WM_PAINT (int wParam, int lParam) {
}
}
if (bufferedPaint) {
- int hDC = OS.BeginPaint (handle, ps);
+ int /*long*/ hDC = OS.BeginPaint (handle, ps);
int width = ps.right - ps.left;
int height = ps.bottom - ps.top;
if (width != 0 && height != 0) {
- int [] phdc = new int [1];
+ int /*long*/ [] phdc = new int /*long*/ [1];
int flags = OS.BPBF_COMPATIBLEBITMAP;
RECT prcTarget = new RECT ();
OS.SetRect (prcTarget, ps.left, ps.top, ps.right, ps.bottom);
- int hBufferedPaint = OS.BeginBufferedPaint (hDC, prcTarget, flags, null, phdc);
+ int /*long*/ hBufferedPaint = OS.BeginBufferedPaint (hDC, prcTarget, flags, null, phdc);
GCData data = new GCData ();
if ((OS.GetLayout (hDC) & OS.LAYOUT_RTL) != 0) {
data.style = SWT.RIGHT_TO_LEFT | SWT.MIRRORED;
@@ -1154,7 +1154,7 @@ LRESULT WM_PAINT (int wParam, int lParam) {
if (control == null) control = this;
data.background = control.getBackgroundPixel ();
data.hFont = OS.SendMessage (handle, OS.WM_GETFONT, 0, 0);
- data.uiState = OS.SendMessage (handle, OS.WM_QUERYUISTATE, 0, 0);
+ data.uiState = (int)/*64*/OS.SendMessage (handle, OS.WM_QUERYUISTATE, 0, 0);
if ((style & SWT.NO_BACKGROUND) != 0) {
/* This code is intentionally commented because it may be slow to copy bits from the screen */
//paintGC.copyArea (image, ps.left, ps.top);
@@ -1184,7 +1184,7 @@ LRESULT WM_PAINT (int wParam, int lParam) {
GC gc = GC.win32_new (this, data);
/* Get the system region for the paint HDC */
- int sysRgn = 0;
+ int /*long*/ sysRgn = 0;
if ((style & (SWT.NO_MERGE_PAINTS | SWT.DOUBLE_BUFFERED)) != 0) {
sysRgn = OS.CreateRectRgn (0, 0, 0, 0);
if (OS.GetRandomRgn (gc.handle, sysRgn, OS.SYSRGN) == 1) {
@@ -1193,7 +1193,7 @@ LRESULT WM_PAINT (int wParam, int lParam) {
int nBytes = OS.GetRegionData (sysRgn, 0, null);
int [] lpRgnData = new int [nBytes / 4];
OS.GetRegionData (sysRgn, nBytes, lpRgnData);
- int newSysRgn = OS.ExtCreateRegion (new float [] {-1, 0, 0, 1, 0, 0}, nBytes, lpRgnData);
+ int /*long*/ newSysRgn = OS.ExtCreateRegion (new float [] {-1, 0, 0, 1, 0, 0}, nBytes, lpRgnData);
OS.DeleteObject (sysRgn);
sysRgn = newSysRgn;
}
@@ -1284,7 +1284,7 @@ LRESULT WM_PAINT (int wParam, int lParam) {
gc.dispose ();
}
} else {
- int hDC = OS.BeginPaint (handle, ps);
+ int /*long*/ hDC = OS.BeginPaint (handle, ps);
if ((style & SWT.NO_BACKGROUND) == 0) {
RECT rect = new RECT ();
OS.SetRect (rect, ps.left, ps.top, ps.right, ps.bottom);
@@ -1310,7 +1310,7 @@ LRESULT WM_PAINT (int wParam, int lParam) {
return LRESULT.ZERO;
}
-LRESULT WM_PRINTCLIENT (int wParam, int lParam) {
+LRESULT WM_PRINTCLIENT (int /*long*/ wParam, int /*long*/ lParam) {
LRESULT result = super.WM_PRINTCLIENT (wParam, lParam);
if (result != null) return result;
if ((state & CANVAS) != 0) {
@@ -1329,7 +1329,7 @@ LRESULT WM_PRINTCLIENT (int wParam, int lParam) {
if (control == null) control = this;
data.background = control.getBackgroundPixel ();
data.hFont = OS.SendMessage (handle, OS.WM_GETFONT, 0, 0);
- data.uiState = OS.SendMessage (handle, OS.WM_QUERYUISTATE, 0, 0);
+ data.uiState = (int)/*64*/OS.SendMessage (handle, OS.WM_QUERYUISTATE, 0, 0);
GC gc = GC.win32_new (wParam, data);
Event event = new Event ();
event.gc = gc;
@@ -1346,12 +1346,12 @@ LRESULT WM_PRINTCLIENT (int wParam, int lParam) {
return result;
}
-LRESULT WM_SETFONT (int wParam, int lParam) {
+LRESULT WM_SETFONT (int /*long*/ wParam, int /*long*/ lParam) {
if (lParam != 0) OS.InvalidateRect (handle, null, true);
return super.WM_SETFONT (font = wParam, lParam);
}
-LRESULT WM_SIZE (int wParam, int lParam) {
+LRESULT WM_SIZE (int /*long*/ wParam, int /*long*/ lParam) {
/* Begin deferred window positioning */
setResizeChildren (false);
@@ -1395,10 +1395,10 @@ LRESULT WM_SIZE (int wParam, int lParam) {
return result;
}
-LRESULT WM_SYSCOLORCHANGE (int wParam, int lParam) {
+LRESULT WM_SYSCOLORCHANGE (int /*long*/ wParam, int /*long*/ lParam) {
LRESULT result = super.WM_SYSCOLORCHANGE (wParam, lParam);
if (result != null) return result;
- int hwndChild = OS.GetWindow (handle, OS.GW_CHILD);
+ int /*long*/ 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);
@@ -1406,7 +1406,7 @@ LRESULT WM_SYSCOLORCHANGE (int wParam, int lParam) {
return result;
}
-LRESULT WM_SYSCOMMAND (int wParam, int lParam) {
+LRESULT WM_SYSCOMMAND (int /*long*/ wParam, int /*long*/ lParam) {
LRESULT result = super.WM_SYSCOMMAND (wParam, lParam);
if (result != null) return result;
@@ -1426,13 +1426,13 @@ LRESULT WM_SYSCOMMAND (int wParam, int lParam) {
* redraw the non-client area.
*/
if (!OS.IsWinCE) {
- int cmd = wParam & 0xFFF0;
+ int cmd = (int)/*64*/wParam & 0xFFF0;
switch (cmd) {
case OS.SC_HSCROLL:
case OS.SC_VSCROLL:
boolean showHBar = horizontalBar != null && horizontalBar.getVisible ();
boolean showVBar = verticalBar != null && verticalBar.getVisible ();
- int code = callWindowProc (handle, OS.WM_SYSCOMMAND, wParam, lParam);
+ int /*long*/ 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;
@@ -1446,23 +1446,23 @@ LRESULT WM_SYSCOMMAND (int wParam, int lParam) {
return result;
}
-LRESULT WM_UPDATEUISTATE (int wParam, int lParam) {
+LRESULT WM_UPDATEUISTATE (int /*long*/ wParam, int /*long*/ lParam) {
LRESULT result = super.WM_UPDATEUISTATE (wParam, lParam);
if (result != null) return result;
if ((state & CANVAS) != 0) OS.InvalidateRect (handle, null, false);
return result;
}
-LRESULT wmNCPaint (int hwnd, int wParam, int lParam) {
+LRESULT wmNCPaint (int /*long*/ hwnd, int /*long*/ wParam, int /*long*/ lParam) {
if (OS.COMCTL32_MAJOR >= 6 && OS.IsAppThemed ()) {
int bits1 = OS.GetWindowLong (hwnd, OS.GWL_EXSTYLE);
if ((bits1 & OS.WS_EX_CLIENTEDGE) != 0) {
- int code = 0;
+ int /*long*/ 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 hDC = OS.GetWindowDC (hwnd);
+ int /*long*/ hDC = OS.GetWindowDC (hwnd);
RECT rect = new RECT ();
OS.GetWindowRect (hwnd, rect);
rect.right -= rect.left;
@@ -1478,7 +1478,7 @@ LRESULT wmNCPaint (int hwnd, int wParam, int lParam) {
return null;
}
-LRESULT wmNotify (NMHDR hdr, int wParam, int lParam) {
+LRESULT wmNotify (NMHDR hdr, int /*long*/ wParam, int /*long*/ lParam) {
if (!OS.IsWinCE) {
switch (hdr.code) {
/*
@@ -1504,7 +1504,7 @@ LRESULT wmNotify (NMHDR hdr, int wParam, int lParam) {
* check if the parent is already on top and neither set or clear
* the topmost status of the tool tip.
*/
- int hwndParent = hdr.hwndFrom;
+ int /*long*/ hwndParent = hdr.hwndFrom;
do {
hwndParent = OS.GetParent (hwndParent);
if (hwndParent == 0) break;
@@ -1514,7 +1514,7 @@ LRESULT wmNotify (NMHDR hdr, int wParam, int lParam) {
if (hwndParent != 0) break;
display.lockActiveWindow = true;
int flags = OS.SWP_NOACTIVATE | OS.SWP_NOMOVE | OS.SWP_NOSIZE;
- int hwndInsertAfter = hdr.code == OS.TTN_SHOW ? OS.HWND_TOPMOST : OS.HWND_NOTOPMOST;
+ int /*long*/ 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;
@@ -1553,7 +1553,7 @@ LRESULT wmNotify (NMHDR hdr, int wParam, int lParam) {
* Ensure that the orientation of the tool tip matches
* the orientation of the control.
*/
- int hwnd = hdr.idFrom;
+ int /*long*/ hwnd = hdr.idFrom;
if (hwnd != 0 && ((lpnmtdi.uFlags & OS.TTF_IDISHWND) != 0)) {
Control control = display.getControl (hwnd);
if (control != null) {
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 d5e0a742cc..f65da4bd58 100755
--- 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
@@ -47,7 +47,7 @@ public abstract class Control extends Widget implements Drawable {
* platforms and should never be accessed from application code.
* </p>
*/
- public int handle;
+ public int /*long*/ handle;
Composite parent;
Cursor cursor;
Menu menu;
@@ -433,7 +433,7 @@ public void addTraverseListener (TraverseListener listener) {
addListener (SWT.Traverse,typedListener);
}
-int borderHandle () {
+int /*long*/ borderHandle () {
return handle;
}
@@ -470,7 +470,7 @@ void checkBuffered () {
style &= ~SWT.DOUBLE_BUFFERED;
}
-boolean checkHandle (int hwnd) {
+boolean checkHandle (int /*long*/ hwnd) {
return hwnd == handle;
}
@@ -588,7 +588,7 @@ Control [] computeTabList () {
}
void createHandle () {
- int hwndParent = widgetParent ();
+ int /*long*/ hwndParent = widgetParent ();
handle = OS.CreateWindowEx (
widgetExtStyle (),
windowClass (),
@@ -602,10 +602,10 @@ void createHandle () {
if (handle == 0) error (SWT.ERROR_NO_HANDLES);
int bits = OS.GetWindowLong (handle, OS.GWL_STYLE);
if ((bits & OS.WS_CHILD) != 0) {
- OS.SetWindowLong (handle, OS.GWL_ID, handle);
+ OS.SetWindowLongPtr (handle, OS.GWLP_ID, handle);
}
if (OS.IsDBLocale && hwndParent != 0) {
- int hIMC = OS.ImmGetContext (hwndParent);
+ int /*long*/ hIMC = OS.ImmGetContext (hwndParent);
OS.ImmAssociateContext (handle, hIMC);
OS.ImmReleaseContext (hwndParent, hIMC);
}
@@ -633,7 +633,7 @@ int defaultBackground () {
return OS.GetSysColor (OS.COLOR_BTNFACE);
}
-int defaultFont () {
+int /*long*/ defaultFont () {
return display.getSystemFont ().handle;
}
@@ -646,7 +646,7 @@ void deregister () {
}
void destroyWidget () {
- int hwnd = topHandle ();
+ int /*long*/ hwnd = topHandle ();
releaseHandle ();
if (hwnd != 0) {
OS.DestroyWindow (hwnd);
@@ -774,7 +774,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 lParam = OS.MAKELPARAM (x, y);
+ int /*long*/ lParam = OS.MAKELPARAM (x, y);
OS.SendMessage (handle, OS.WM_LBUTTONUP, wParam, lParam);
}
return false;
@@ -782,17 +782,17 @@ boolean dragDetect (int button, int count, int stateMask, int x, int y) {
return sendDragEvent (button, stateMask, x, y);
}
-void drawBackground (int hDC) {
+void drawBackground (int /*long*/ hDC) {
RECT rect = new RECT ();
OS.GetClientRect (handle, rect);
drawBackground (hDC, rect);
}
-void drawBackground (int hDC, RECT rect) {
+void drawBackground (int /*long*/ hDC, RECT rect) {
drawBackground (hDC, rect, -1);
}
-void drawBackground (int hDC, RECT rect, int pixel) {
+void drawBackground (int /*long*/ hDC, RECT rect, int pixel) {
Control control = findBackgroundControl ();
if (control != null) {
if (control.backgroundImage != null) {
@@ -816,21 +816,21 @@ void drawBackground (int hDC, RECT rect, int pixel) {
fillBackground (hDC, pixel, rect);
}
-void drawImageBackground (int hDC, int hwnd, int hBitmap, RECT rect) {
+void drawImageBackground (int /*long*/ hDC, int /*long*/ hwnd, int /*long*/ hBitmap, RECT rect) {
RECT rect2 = new RECT ();
OS.GetClientRect (hwnd, rect2);
OS.MapWindowPoints (hwnd, handle, rect2, 2);
- int hBrush = findBrush (hBitmap, OS.BS_PATTERN);
+ int /*long*/ hBrush = findBrush (hBitmap, OS.BS_PATTERN);
POINT lpPoint = new POINT ();
OS.GetWindowOrgEx (hDC, lpPoint);
OS.SetBrushOrgEx (hDC, -rect2.left - lpPoint.x, -rect2.top - lpPoint.y, lpPoint);
- int hOldBrush = OS.SelectObject (hDC, hBrush);
+ int /*long*/ 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 hDC, int hwnd, RECT rect) {
+void drawThemeBackground (int /*long*/ hDC, int /*long*/ hwnd, RECT rect) {
/* Do nothing */
}
@@ -842,9 +842,9 @@ void enableWidget (boolean enabled) {
OS.EnableWindow (handle, enabled);
}
-void fillBackground (int hDC, int pixel, RECT rect) {
+void fillBackground (int /*long*/ hDC, int pixel, RECT rect) {
if (rect.left > rect.right || rect.top > rect.bottom) return;
- int hPalette = display.hPalette;
+ int /*long*/ hPalette = display.hPalette;
if (hPalette != 0) {
OS.SelectPalette (hDC, hPalette, false);
OS.RealizePalette (hDC);
@@ -852,7 +852,7 @@ void fillBackground (int hDC, int pixel, RECT rect) {
OS.FillRect (hDC, rect, findBrush (pixel, OS.BS_SOLID));
}
-void fillImageBackground (int hDC, Control control, RECT rect) {
+void fillImageBackground (int /*long*/ hDC, Control control, RECT rect) {
if (rect.left > rect.right || rect.top > rect.bottom) return;
if (control != null) {
Image image = control.backgroundImage;
@@ -862,7 +862,7 @@ void fillImageBackground (int hDC, Control control, RECT rect) {
}
}
-void fillThemeBackground (int hDC, Control control, RECT rect) {
+void fillThemeBackground (int /*long*/ hDC, Control control, RECT rect) {
if (rect.left > rect.right || rect.top > rect.bottom) return;
if (control != null) {
control.drawThemeBackground (hDC, handle, rect);
@@ -874,7 +874,7 @@ Control findBackgroundControl () {
return (state & PARENT_BACKGROUND) != 0 ? parent.findBackgroundControl () : null;
}
-int findBrush (int value, int lbStyle) {
+int /*long*/ findBrush (int /*long*/ value, int lbStyle) {
return parent.findBrush (value, lbStyle);
}
@@ -1065,7 +1065,7 @@ int getBackgroundPixel () {
*/
public int getBorderWidth () {
checkWidget ();
- int borderHandle = borderHandle ();
+ int /*long*/ 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);
@@ -1092,7 +1092,7 @@ public Rectangle getBounds () {
forceResize ();
RECT rect = new RECT ();
OS.GetWindowRect (topHandle (), rect);
- int hwndParent = parent == null ? 0 : parent.handle;
+ int /*long*/ hwndParent = parent == null ? 0 : parent.handle;
OS.MapWindowPoints (0, hwndParent, rect, 2);
int width = rect.right - rect.left;
int height = rect.bottom - rect.top;
@@ -1101,7 +1101,7 @@ public Rectangle getBounds () {
int getCodePage () {
if (OS.IsUnicode) return OS.CP_ACP;
- int hFont = OS.SendMessage (handle, OS.WM_GETFONT, 0, 0);
+ int /*long*/ 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;
@@ -1115,11 +1115,11 @@ int getCodePage () {
String getClipboardText () {
String string = "";
if (OS.OpenClipboard (0)) {
- int hMem = OS.GetClipboardData (OS.IsUnicode ? OS.CF_UNICODETEXT : OS.CF_TEXT);
+ int /*long*/ 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 ptr = OS.GlobalLock (hMem);
+ int /*long*/ ptr = OS.GlobalLock (hMem);
if (ptr != 0) {
/* Use the character encoding for the default locale */
TCHAR buffer = new TCHAR (0, byteCount / TCHAR.sizeof);
@@ -1202,7 +1202,7 @@ public boolean getEnabled () {
*/
public Font getFont () {
checkWidget ();
- int hFont = OS.SendMessage (handle, OS.WM_GETFONT, 0, 0);
+ int /*long*/ hFont = OS.SendMessage (handle, OS.WM_GETFONT, 0, 0);
if (hFont == 0) hFont = defaultFont ();
return Font.win32_new (display, hFont);
}
@@ -1259,7 +1259,7 @@ public Point getLocation () {
forceResize ();
RECT rect = new RECT ();
OS.GetWindowRect (topHandle (), rect);
- int hwndParent = parent == null ? 0 : parent.handle;
+ int /*long*/ hwndParent = parent == null ? 0 : parent.handle;
OS.MapWindowPoints (0, hwndParent, rect, 2);
return new Point (rect.left, rect.top);
}
@@ -1296,7 +1296,7 @@ public Monitor getMonitor () {
if (OS.IsWinCE || OS.WIN32_VERSION < OS.VERSION (4, 10)) {
return display.getPrimaryMonitor ();
}
- int hmonitor = OS.MonitorFromWindow (handle, OS.MONITOR_DEFAULTTONEAREST);
+ int /*long*/ hmonitor = OS.MonitorFromWindow (handle, OS.MONITOR_DEFAULTTONEAREST);
MONITORINFO lpmi = new MONITORINFO ();
lpmi.cbSize = MONITORINFO.sizeof;
OS.GetMonitorInfo (hmonitor, lpmi);
@@ -1444,7 +1444,7 @@ boolean hasFocus () {
* then this control is considered to have focus
* even though it does not have focus in Windows.
*/
- int hwndFocus = OS.GetFocus ();
+ int /*long*/ hwndFocus = OS.GetFocus ();
while (hwndFocus != 0) {
if (hwndFocus == handle) return true;
if (display.getControl (hwndFocus) != null) {
@@ -1468,12 +1468,12 @@ boolean hasFocus () {
* @param data the platform specific GC data
* @return the platform specific GC handle
*/
-public int internal_new_GC (GCData data) {
+public int /*long*/ internal_new_GC (GCData data) {
checkWidget();
- int hwnd = handle;
+ int /*long*/ hwnd = handle;
if (data != null && data.hwnd != 0) hwnd = data.hwnd;
if (data != null) data.hwnd = hwnd;
- int hDC = 0;
+ int /*long*/ hDC = 0;
if (data == null || data.ps == null) {
hDC = OS.GetDC (hwnd);
} else {
@@ -1504,7 +1504,7 @@ public int internal_new_GC (GCData data) {
int background = control.getBackgroundPixel ();
if (background != OS.GetBkColor (hDC)) data.background = background;
data.hFont = OS.SendMessage (hwnd, OS.WM_GETFONT, 0, 0);
- data.uiState = OS.SendMessage (hwnd, OS.WM_QUERYUISTATE, 0, 0);
+ data.uiState = (int)/*64*/OS.SendMessage (hwnd, OS.WM_QUERYUISTATE, 0, 0);
}
return hDC;
}
@@ -1522,9 +1522,9 @@ public int internal_new_GC (GCData data) {
* @param hDC the platform specific GC handle
* @param data the platform specific GC data
*/
-public void internal_dispose_GC (int hDC, GCData data) {
+public void internal_dispose_GC (int /*long*/ hDC, GCData data) {
checkWidget ();
- int hwnd = handle;
+ int /*long*/ hwnd = handle;
if (data != null && data.hwnd != 0) {
hwnd = data.hwnd;
}
@@ -1652,7 +1652,7 @@ boolean isShowing () {
*/
// if (!OS.IsWindowVisible (handle)) return false;
// int flags = OS.DCX_CACHE | OS.DCX_CLIPCHILDREN | OS.DCX_CLIPSIBLINGS;
-// int hDC = OS.GetDCEx (handle, 0, flags);
+// int /*long*/ hDC = OS.GetDCEx (handle, 0, flags);
// int result = OS.GetClipBox (hDC, new RECT ());
// OS.ReleaseDC (handle, hDC);
// return result != OS.NULLREGION;
@@ -1678,7 +1678,7 @@ boolean isTabItem () {
}
int bits = OS.GetWindowLong (handle, OS.GWL_STYLE);
if ((bits & OS.WS_TABSTOP) != 0) return false;
- int code = OS.SendMessage (handle, OS.WM_GETDLGCODE, 0, 0);
+ int /*long*/ 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;
@@ -1706,7 +1706,7 @@ public boolean isVisible () {
return getVisible () && parent.isVisible ();
}
-void mapEvent (int hwnd, Event event) {
+void mapEvent (int /*long*/ hwnd, Event event) {
if (hwnd != handle) {
POINT point = new POINT ();
point.x = event.x;
@@ -1755,11 +1755,11 @@ boolean mnemonicMatch (char key) {
*/
public void moveAbove (Control control) {
checkWidget ();
- int topHandle = topHandle (), hwndAbove = OS.HWND_TOP;
+ int /*long*/ topHandle = topHandle (), hwndAbove = OS.HWND_TOP;
if (control != null) {
if (control.isDisposed ()) error(SWT.ERROR_INVALID_ARGUMENT);
if (parent != control.parent) return;
- int hwnd = control.topHandle ();
+ int /*long*/ hwnd = control.topHandle ();
if (hwnd == 0 || hwnd == topHandle) return;
hwndAbove = OS.GetWindow (hwnd, OS.GW_HWNDPREV);
/*
@@ -1799,7 +1799,7 @@ public void moveAbove (Control control) {
*/
public void moveBelow (Control control) {
checkWidget ();
- int topHandle = topHandle (), hwndAbove = OS.HWND_BOTTOM;
+ int /*long*/ topHandle = topHandle (), hwndAbove = OS.HWND_BOTTOM;
if (control != null) {
if (control.isDisposed ()) error(SWT.ERROR_INVALID_ARGUMENT);
if (parent != control.parent) return;
@@ -1823,7 +1823,7 @@ public void moveBelow (Control control) {
* this case and do nothing because the control is already
* at the bottom.
*/
- int hwndParent = parent.handle, hwnd = hwndParent;
+ int /*long*/ 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;
@@ -2328,7 +2328,7 @@ public void removeTraverseListener(TraverseListener listener) {
}
void showWidget (boolean visible) {
- int topHandle = topHandle ();
+ int /*long*/ 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);
}
@@ -2452,7 +2452,7 @@ public void setBackgroundImage (Image image) {
updateBackgroundImage ();
}
-void setBackgroundImage (int hBitmap) {
+void setBackgroundImage (int /*long*/ hBitmap) {
if (OS.IsWinCE) {
OS.InvalidateRect (handle, null, true);
} else {
@@ -2504,7 +2504,7 @@ void setBounds (int x, int y, int width, int height, int flags) {
}
void setBounds (int x, int y, int width, int height, int flags, boolean defer) {
- int topHandle = topHandle ();
+ int /*long*/ topHandle = topHandle ();
if (defer && parent != null) {
forceResize ();
if (OS.GetWindow (handle, OS.GW_CHILD) == 0) {
@@ -2592,7 +2592,7 @@ public void setCapture (boolean capture) {
}
void setCursor () {
- int lParam = OS.MAKELPARAM (OS.HTCLIENT, OS.WM_MOUSEMOVE);
+ int /*long*/ lParam = OS.MAKELPARAM (OS.HTCLIENT, OS.WM_MOUSEMOVE);
OS.SendMessage (handle, OS.WM_SETCURSOR, handle, lParam);
}
@@ -2620,15 +2620,15 @@ public void setCursor (Cursor cursor) {
if (cursor != null && cursor.isDisposed()) SWT.error(SWT.ERROR_INVALID_ARGUMENT);
this.cursor = cursor;
if (OS.IsWinCE) {
- int hCursor = cursor != null ? cursor.handle : 0;
+ int /*long*/ hCursor = cursor != null ? cursor.handle : 0;
OS.SetCursor (hCursor);
return;
}
- int hwndCursor = OS.GetCapture ();
+ int /*long*/ hwndCursor = OS.GetCapture ();
if (hwndCursor == 0) {
POINT pt = new POINT ();
if (!OS.GetCursorPos (pt)) return;
- int hwnd = hwndCursor = OS.WindowFromPoint (pt);
+ int /*long*/ hwnd = hwndCursor = OS.WindowFromPoint (pt);
while (hwnd != 0 && hwnd != handle) {
hwnd = OS.GetParent (hwnd);
}
@@ -2640,7 +2640,7 @@ public void setCursor (Cursor cursor) {
}
void setDefaultFont () {
- int hFont = display.getSystemFont ().handle;
+ int /*long*/ hFont = display.getSystemFont ().handle;
OS.SendMessage (handle, OS.WM_SETFONT, hFont, 0);
}
@@ -2744,7 +2744,7 @@ public boolean setFocus () {
*/
public void setFont (Font font) {
checkWidget ();
- int hFont = 0;
+ int /*long*/ hFont = 0;
if (font != null) {
if (font.isDisposed()) SWT.error(SWT.ERROR_INVALID_ARGUMENT);
hFont = font.handle;
@@ -2936,7 +2936,7 @@ public void setRedraw (boolean redraw) {
}
if (redraw) {
if (--drawCount == 0) {
- int topHandle = topHandle ();
+ int /*long*/ 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) {
@@ -2955,7 +2955,7 @@ public void setRedraw (boolean redraw) {
}
} else {
if (drawCount++ == 0) {
- int topHandle = topHandle ();
+ int /*long*/ topHandle = topHandle ();
OS.SendMessage (topHandle, OS.WM_SETREDRAW, 0, 0);
if (handle != topHandle) OS.SendMessage (handle, OS.WM_SETREDRAW, 0, 0);
}
@@ -3116,10 +3116,10 @@ void sort (int [] items) {
}
void subclass () {
- int oldProc = windowProc ();
- int newProc = display.windowProc;
+ int /*long*/ oldProc = windowProc ();
+ int /*long*/ newProc = display.windowProc;
if (oldProc == newProc) return;
- OS.SetWindowLong (handle, OS.GWL_WNDPROC, newProc);
+ OS.SetWindowLongPtr (handle, OS.GWLP_WNDPROC, newProc);
}
/**
@@ -3214,7 +3214,7 @@ public Point toDisplay (Point point) {
return toDisplay (point.x, point.y);
}
-int topHandle () {
+int /*long*/ topHandle () {
return handle;
}
@@ -3231,15 +3231,15 @@ boolean translateMnemonic (Event event, Control control) {
boolean translateMnemonic (MSG msg) {
if (msg.wParam < 0x20) return false;
- int hwnd = msg.hwnd;
+ int /*long*/ hwnd = msg.hwnd;
if (OS.GetKeyState (OS.VK_MENU) >= 0) {
- int code = OS.SendMessage (hwnd, OS.WM_GETDLGCODE, 0, 0);
+ int /*long*/ 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;
}
Decorations shell = menuShell ();
if (shell.isVisible () && shell.isEnabled ()) {
- display.lastAscii = msg.wParam;
+ display.lastAscii = (int)/*64*/msg.wParam;
display.lastNull = display.lastDead = false;
Event event = new Event ();
event.detail = SWT.TRAVERSE_MNEMONIC;
@@ -3251,8 +3251,8 @@ boolean translateMnemonic (MSG msg) {
}
boolean translateTraversal (MSG msg) {
- int hwnd = msg.hwnd;
- int key = msg.wParam;
+ int /*long*/ hwnd = msg.hwnd;
+ int key = (int)/*64*/msg.wParam;
if (key == OS.VK_MENU) {
OS.SendMessage (hwnd, OS.WM_CHANGEUISTATE, OS.UIS_INITIALIZE, 0);
return false;
@@ -3265,7 +3265,7 @@ boolean translateTraversal (MSG msg) {
case OS.VK_ESCAPE: {
all = true;
lastAscii = 27;
- int code = OS.SendMessage (hwnd, OS.WM_GETDLGCODE, 0, 0);
+ int /*long*/ code = OS.SendMessage (hwnd, OS.WM_GETDLGCODE, 0, 0);
if ((code & OS.DLGC_WANTALLKEYS) != 0) {
/*
* Use DLGC_HASSETSEL to determine that the control
@@ -3282,7 +3282,7 @@ boolean translateTraversal (MSG msg) {
case OS.VK_RETURN: {
all = true;
lastAscii = '\r';
- int code = OS.SendMessage (hwnd, OS.WM_GETDLGCODE, 0, 0);
+ int /*long*/ code = OS.SendMessage (hwnd, OS.WM_GETDLGCODE, 0, 0);
if ((code & OS.DLGC_WANTALLKEYS) != 0) doit = false;
detail = SWT.TRAVERSE_RETURN;
break;
@@ -3290,7 +3290,7 @@ boolean translateTraversal (MSG msg) {
case OS.VK_TAB: {
lastAscii = '\t';
boolean next = OS.GetKeyState (OS.VK_SHIFT) >= 0;
- int code = OS.SendMessage (hwnd, OS.WM_GETDLGCODE, 0, 0);
+ int /*long*/ 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
@@ -3327,7 +3327,7 @@ boolean translateTraversal (MSG msg) {
if (key == OS.VK_LEFT || key == OS.VK_RIGHT) return false;
}
lastVirtual = true;
- int code = OS.SendMessage (hwnd, OS.WM_GETDLGCODE, 0, 0);
+ int /*long*/ 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;
detail = next ? SWT.TRAVERSE_ARROW_NEXT : SWT.TRAVERSE_ARROW_PREVIOUS;
@@ -3338,7 +3338,7 @@ boolean translateTraversal (MSG msg) {
all = true;
lastVirtual = true;
if (OS.GetKeyState (OS.VK_CONTROL) >= 0) return false;
- int code = OS.SendMessage (hwnd, OS.WM_GETDLGCODE, 0, 0);
+ int /*long*/ 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
@@ -3497,10 +3497,10 @@ boolean traverseReturn () {
}
void unsubclass () {
- int newProc = windowProc ();
- int oldProc = display.windowProc;
+ int /*long*/ newProc = windowProc ();
+ int /*long*/ oldProc = display.windowProc;
if (oldProc == newProc) return;
- OS.SetWindowLong (handle, OS.GWL_WNDPROC, newProc);
+ OS.SetWindowLongPtr (handle, OS.GWLP_WNDPROC, newProc);
}
/**
@@ -3595,7 +3595,7 @@ int widgetExtStyle () {
return bits;
}
-int widgetParent () {
+int /*long*/ widgetParent () {
return parent.handle;
}
@@ -3652,7 +3652,7 @@ public boolean setParent (Composite parent) {
Menu [] menus = oldShell.findMenus (this);
fixChildren (newShell, oldShell, newDecorations, oldDecorations, menus);
}
- int topHandle = topHandle ();
+ int /*long*/ 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;
@@ -3662,9 +3662,9 @@ public boolean setParent (Composite parent) {
abstract TCHAR windowClass ();
-abstract int windowProc ();
+abstract int /*long*/ windowProc ();
-int windowProc (int hwnd, int msg, int wParam, int lParam) {
+int /*long*/ windowProc (int /*long*/ hwnd, int msg, int /*long*/ wParam, int /*long*/ lParam) {
LRESULT result = null;
switch (msg) {
case OS.WM_ACTIVATE: result = WM_ACTIVATE (wParam, lParam); break;
@@ -3760,27 +3760,27 @@ int windowProc (int hwnd, int msg, int wParam, int lParam) {
return callWindowProc (hwnd, msg, wParam, lParam);
}
-LRESULT WM_ACTIVATE (int wParam, int lParam) {
+LRESULT WM_ACTIVATE (int /*long*/ wParam, int /*long*/ lParam) {
return null;
}
-LRESULT WM_CAPTURECHANGED (int wParam, int lParam) {
+LRESULT WM_CAPTURECHANGED (int /*long*/ wParam, int /*long*/ lParam) {
return wmCaptureChanged (handle, wParam, lParam);
}
-LRESULT WM_CHAR (int wParam, int lParam) {
+LRESULT WM_CHAR (int /*long*/ wParam, int /*long*/ lParam) {
return wmChar (handle, wParam, lParam);
}
-LRESULT WM_CLEAR (int wParam, int lParam) {
+LRESULT WM_CLEAR (int /*long*/ wParam, int /*long*/ lParam) {
return null;
}
-LRESULT WM_CLOSE (int wParam, int lParam) {
+LRESULT WM_CLOSE (int /*long*/ wParam, int /*long*/ lParam) {
return null;
}
-LRESULT WM_COMMAND (int wParam, int lParam) {
+LRESULT WM_COMMAND (int /*long*/ wParam, int /*long*/ lParam) {
/*
* When the WM_COMMAND message is sent from a
* menu, the HWND parameter in LPARAM is zero.
@@ -3801,12 +3801,12 @@ LRESULT WM_COMMAND (int wParam, int lParam) {
return control.wmCommandChild (wParam, lParam);
}
-LRESULT WM_CONTEXTMENU (int wParam, int lParam) {
+LRESULT WM_CONTEXTMENU (int /*long*/ wParam, int /*long*/ lParam) {
return wmContextMenu (handle, wParam, lParam);
}
-LRESULT WM_CTLCOLOR (int wParam, int lParam) {
- int hPalette = display.hPalette;
+LRESULT WM_CTLCOLOR (int /*long*/ wParam, int /*long*/ lParam) {
+ int /*long*/ hPalette = display.hPalette;
if (hPalette != 0) {
OS.SelectPalette (wParam, hPalette, false);
OS.RealizePalette (wParam);
@@ -3816,15 +3816,15 @@ LRESULT WM_CTLCOLOR (int wParam, int lParam) {
return control.wmColorChild (wParam, lParam);
}
-LRESULT WM_CUT (int wParam, int lParam) {
+LRESULT WM_CUT (int /*long*/ wParam, int /*long*/ lParam) {
return null;
}
-LRESULT WM_DESTROY (int wParam, int lParam) {
+LRESULT WM_DESTROY (int /*long*/ wParam, int /*long*/ lParam) {
return null;
}
-LRESULT WM_DRAWITEM (int wParam, int lParam) {
+LRESULT WM_DRAWITEM (int /*long*/ wParam, int /*long*/ lParam) {
DRAWITEMSTRUCT struct = new DRAWITEMSTRUCT ();
OS.MoveMemory (struct, lParam, DRAWITEMSTRUCT.sizeof);
if (struct.CtlType == OS.ODT_MENU) {
@@ -3837,15 +3837,15 @@ LRESULT WM_DRAWITEM (int wParam, int lParam) {
return control.wmDrawChild (wParam, lParam);
}
-LRESULT WM_ENDSESSION (int wParam, int lParam) {
+LRESULT WM_ENDSESSION (int /*long*/ wParam, int /*long*/ lParam) {
return null;
}
-LRESULT WM_ENTERIDLE (int wParam, int lParam) {
+LRESULT WM_ENTERIDLE (int /*long*/ wParam, int /*long*/ lParam) {
return null;
}
-LRESULT WM_ERASEBKGND (int wParam, int lParam) {
+LRESULT WM_ERASEBKGND (int /*long*/ wParam, int /*long*/ lParam) {
if ((state & DRAW_BACKGROUND) != 0) {
if (findImageControl () != null) return LRESULT.ONE;
}
@@ -3857,31 +3857,31 @@ LRESULT WM_ERASEBKGND (int wParam, int lParam) {
return null;
}
-LRESULT WM_GETDLGCODE (int wParam, int lParam) {
+LRESULT WM_GETDLGCODE (int /*long*/ wParam, int /*long*/ lParam) {
return null;
}
-LRESULT WM_GETFONT (int wParam, int lParam) {
+LRESULT WM_GETFONT (int /*long*/ wParam, int /*long*/ lParam) {
return null;
}
-LRESULT WM_GETOBJECT (int wParam, int lParam) {
+LRESULT WM_GETOBJECT (int /*long*/ wParam, int /*long*/ lParam) {
if (accessible != null) {
- int result = accessible.internal_WM_GETOBJECT (wParam, lParam);
+ int /*long*/ result = accessible.internal_WM_GETOBJECT (wParam, lParam);
if (result != 0) return new LRESULT (result);
}
return null;
}
-LRESULT WM_GETMINMAXINFO (int wParam, int lParam) {
+LRESULT WM_GETMINMAXINFO (int /*long*/ wParam, int /*long*/ lParam) {
return null;
}
-LRESULT WM_HOTKEY (int wParam, int lParam) {
+LRESULT WM_HOTKEY (int /*long*/ wParam, int /*long*/ lParam) {
return null;
}
-LRESULT WM_HELP (int wParam, int lParam) {
+LRESULT WM_HELP (int /*long*/ wParam, int /*long*/ lParam) {
if (OS.IsWinCE) return null;
HELPINFO lphi = new HELPINFO ();
OS.MoveMemory (lphi, lParam, HELPINFO.sizeof);
@@ -3898,7 +3898,7 @@ LRESULT WM_HELP (int wParam, int lParam) {
if (menu.hooks (SWT.Help)) widget = menu;
}
if (widget != null) {
- int hwndShell = shell.handle;
+ int /*long*/ hwndShell = shell.handle;
OS.SendMessage (hwndShell, OS.WM_CANCELMODE, 0, 0);
widget.postEvent (SWT.Help);
return LRESULT.ONE;
@@ -3913,21 +3913,21 @@ LRESULT WM_HELP (int wParam, int lParam) {
return null;
}
-LRESULT WM_HSCROLL (int wParam, int lParam) {
+LRESULT WM_HSCROLL (int /*long*/ wParam, int /*long*/ lParam) {
Control control = display.getControl (lParam);
if (control == null) return null;
return control.wmScrollChild (wParam, lParam);
}
-LRESULT WM_IME_CHAR (int wParam, int lParam) {
+LRESULT WM_IME_CHAR (int /*long*/ wParam, int /*long*/ lParam) {
return wmIMEChar (handle, wParam, lParam);
}
-LRESULT WM_IME_COMPOSITION (int wParam, int lParam) {
+LRESULT WM_IME_COMPOSITION (int /*long*/ wParam, int /*long*/ lParam) {
return null;
}
-LRESULT WM_INITMENUPOPUP (int wParam, int lParam) {
+LRESULT WM_INITMENUPOPUP (int /*long*/ wParam, int /*long*/ lParam) {
/* Ignore WM_INITMENUPOPUP for an accelerator */
if (display.accelKeyHit) return null;
@@ -3984,47 +3984,47 @@ LRESULT WM_INITMENUPOPUP (int wParam, int lParam) {
return null;
}
-LRESULT WM_INPUTLANGCHANGE (int wParam, int lParam) {
+LRESULT WM_INPUTLANGCHANGE (int /*long*/ wParam, int /*long*/ lParam) {
return null;
}
-LRESULT WM_KEYDOWN (int wParam, int lParam) {
+LRESULT WM_KEYDOWN (int /*long*/ wParam, int /*long*/ lParam) {
return wmKeyDown (handle, wParam, lParam);
}
-LRESULT WM_KEYUP (int wParam, int lParam) {
+LRESULT WM_KEYUP (int /*long*/ wParam, int /*long*/ lParam) {
return wmKeyUp (handle, wParam, lParam);
}
-LRESULT WM_KILLFOCUS (int wParam, int lParam) {
+LRESULT WM_KILLFOCUS (int /*long*/ wParam, int /*long*/ lParam) {
return wmKillFocus (handle, wParam, lParam);
}
-LRESULT WM_LBUTTONDBLCLK (int wParam, int lParam) {
+LRESULT WM_LBUTTONDBLCLK (int /*long*/ wParam, int /*long*/ lParam) {
return wmLButtonDblClk (handle, wParam, lParam);
}
-LRESULT WM_LBUTTONDOWN (int wParam, int lParam) {
+LRESULT WM_LBUTTONDOWN (int /*long*/ wParam, int /*long*/ lParam) {
return wmLButtonDown (handle, wParam, lParam);
}
-LRESULT WM_LBUTTONUP (int wParam, int lParam) {
+LRESULT WM_LBUTTONUP (int /*long*/ wParam, int /*long*/ lParam) {
return wmLButtonUp (handle, wParam, lParam);
}
-LRESULT WM_MBUTTONDBLCLK (int wParam, int lParam) {
+LRESULT WM_MBUTTONDBLCLK (int /*long*/ wParam, int /*long*/ lParam) {
return wmMButtonDblClk (handle, wParam, lParam);
}
-LRESULT WM_MBUTTONDOWN (int wParam, int lParam) {
+LRESULT WM_MBUTTONDOWN (int /*long*/ wParam, int /*long*/ lParam) {
return wmMButtonDown (handle, wParam, lParam);
}
-LRESULT WM_MBUTTONUP (int wParam, int lParam) {
+LRESULT WM_MBUTTONUP (int /*long*/ wParam, int /*long*/ lParam) {
return wmMButtonUp (handle, wParam, lParam);
}
-LRESULT WM_MEASUREITEM (int wParam, int lParam) {
+LRESULT WM_MEASUREITEM (int /*long*/ wParam, int /*long*/ lParam) {
MEASUREITEMSTRUCT struct = new MEASUREITEMSTRUCT ();
OS.MoveMemory (struct, lParam, MEASUREITEMSTRUCT.sizeof);
if (struct.CtlType == OS.ODT_MENU) {
@@ -4032,13 +4032,13 @@ LRESULT WM_MEASUREITEM (int wParam, int lParam) {
if (item == null) return null;
return item.wmMeasureChild (wParam, lParam);
}
- int hwnd = OS.GetDlgItem (handle, struct.CtlID);
+ int /*long*/ 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 wParam, int lParam) {
+LRESULT WM_MENUCHAR (int /*long*/ wParam, int /*long*/ lParam) {
/*
* Feature in Windows. When the user types Alt+<key>
* and <key> does not match a mnemonic in the System
@@ -4055,7 +4055,7 @@ LRESULT WM_MENUCHAR (int wParam, int lParam) {
return null;
}
-LRESULT WM_MENUSELECT (int wParam, int lParam) {
+LRESULT WM_MENUSELECT (int /*long*/ wParam, int /*long*/ lParam) {
int code = OS.HIWORD (wParam);
Shell shell = getShell ();
if (code == 0xFFFF && lParam == 0) {
@@ -4150,28 +4150,28 @@ LRESULT WM_MENUSELECT (int wParam, int lParam) {
return null;
}
-LRESULT WM_MOUSEACTIVATE (int wParam, int lParam) {
+LRESULT WM_MOUSEACTIVATE (int /*long*/ wParam, int /*long*/ lParam) {
return null;
}
-LRESULT WM_MOUSEHOVER (int wParam, int lParam) {
+LRESULT WM_MOUSEHOVER (int /*long*/ wParam, int /*long*/ lParam) {
return wmMouseHover (handle, wParam, lParam);
}
-LRESULT WM_MOUSELEAVE (int wParam, int lParam) {
+LRESULT WM_MOUSELEAVE (int /*long*/ wParam, int /*long*/ lParam) {
if (OS.COMCTL32_MAJOR >= 6) getShell ().fixToolTip ();
return wmMouseLeave (handle, wParam, lParam);
}
-LRESULT WM_MOUSEMOVE (int wParam, int lParam) {
+LRESULT WM_MOUSEMOVE (int /*long*/ wParam, int /*long*/ lParam) {
return wmMouseMove (handle, wParam, lParam);
}
-LRESULT WM_MOUSEWHEEL (int wParam, int lParam) {
+LRESULT WM_MOUSEWHEEL (int /*long*/ wParam, int /*long*/ lParam) {
return wmMouseWheel (handle, wParam, lParam);
}
-LRESULT WM_MOVE (int wParam, int lParam) {
+LRESULT WM_MOVE (int /*long*/ wParam, int /*long*/ lParam) {
if (findImageControl () != null) {
if (this != getShell ()) redrawChildren ();
} else {
@@ -4188,83 +4188,83 @@ LRESULT WM_MOVE (int wParam, int lParam) {
return null;
}
-LRESULT WM_NCACTIVATE (int wParam, int lParam) {
+LRESULT WM_NCACTIVATE (int /*long*/ wParam, int /*long*/ lParam) {
return null;
}
-LRESULT WM_NCCALCSIZE (int wParam, int lParam) {
+LRESULT WM_NCCALCSIZE (int /*long*/ wParam, int /*long*/ lParam) {
return null;
}
-LRESULT WM_NCHITTEST (int wParam, int lParam) {
+LRESULT WM_NCHITTEST (int /*long*/ wParam, int /*long*/ lParam) {
if (!OS.IsWindowEnabled (handle)) return null;
if (!isActive ()) return new LRESULT (OS.HTTRANSPARENT);
return null;
}
-LRESULT WM_NCLBUTTONDOWN (int wParam, int lParam) {
+LRESULT WM_NCLBUTTONDOWN (int /*long*/ wParam, int /*long*/ lParam) {
return null;
}
-LRESULT WM_NCPAINT (int wParam, int lParam) {
+LRESULT WM_NCPAINT (int /*long*/ wParam, int /*long*/ lParam) {
return null;
}
-LRESULT WM_NOTIFY (int wParam, int lParam) {
+LRESULT WM_NOTIFY (int /*long*/ wParam, int /*long*/ lParam) {
NMHDR hdr = new NMHDR ();
OS.MoveMemory (hdr, lParam, NMHDR.sizeof);
return wmNotify (hdr, wParam, lParam);
}
-LRESULT WM_PAINT (int wParam, int lParam) {
+LRESULT WM_PAINT (int /*long*/ wParam, int /*long*/ lParam) {
return super.wmPaint (handle, wParam, lParam);
}
-LRESULT WM_PALETTECHANGED (int wParam, int lParam) {
+LRESULT WM_PALETTECHANGED (int /*long*/ wParam, int /*long*/ lParam) {
return null;
}
-LRESULT WM_PARENTNOTIFY (int wParam, int lParam) {
+LRESULT WM_PARENTNOTIFY (int /*long*/ wParam, int /*long*/ lParam) {
return null;
}
-LRESULT WM_PASTE (int wParam, int lParam) {
+LRESULT WM_PASTE (int /*long*/ wParam, int /*long*/ lParam) {
return null;
}
-LRESULT WM_PRINT (int wParam, int lParam) {
+LRESULT WM_PRINT (int /*long*/ wParam, int /*long*/ lParam) {
return wmPrint (handle, wParam, lParam);
}
-LRESULT WM_PRINTCLIENT (int wParam, int lParam) {
+LRESULT WM_PRINTCLIENT (int /*long*/ wParam, int /*long*/ lParam) {
return null;
}
-LRESULT WM_QUERYENDSESSION (int wParam, int lParam) {
+LRESULT WM_QUERYENDSESSION (int /*long*/ wParam, int /*long*/ lParam) {
return null;
}
-LRESULT WM_QUERYNEWPALETTE (int wParam, int lParam) {
+LRESULT WM_QUERYNEWPALETTE (int /*long*/ wParam, int /*long*/ lParam) {
return null;
}
-LRESULT WM_QUERYOPEN (int wParam, int lParam) {
+LRESULT WM_QUERYOPEN (int /*long*/ wParam, int /*long*/ lParam) {
return null;
}
-LRESULT WM_RBUTTONDBLCLK (int wParam, int lParam) {
+LRESULT WM_RBUTTONDBLCLK (int /*long*/ wParam, int /*long*/ lParam) {
return wmRButtonDblClk (handle, wParam, lParam);
}
-LRESULT WM_RBUTTONDOWN (int wParam, int lParam) {
+LRESULT WM_RBUTTONDOWN (int /*long*/ wParam, int /*long*/ lParam) {
return wmRButtonDown (handle, wParam, lParam);
}
-LRESULT WM_RBUTTONUP (int wParam, int lParam) {
+LRESULT WM_RBUTTONUP (int /*long*/ wParam, int /*long*/ lParam) {
return wmRButtonUp (handle, wParam, lParam);
}
-LRESULT WM_SETCURSOR (int wParam, int lParam) {
+LRESULT WM_SETCURSOR (int /*long*/ wParam, int /*long*/ lParam) {
int hitTest = (short) OS.LOWORD (lParam);
if (hitTest == OS.HTCLIENT) {
Control control = display.getControl (wParam);
@@ -4278,41 +4278,41 @@ LRESULT WM_SETCURSOR (int wParam, int lParam) {
return null;
}
-LRESULT WM_SETFOCUS (int wParam, int lParam) {
+LRESULT WM_SETFOCUS (int /*long*/ wParam, int /*long*/ lParam) {
return wmSetFocus (handle, wParam, lParam);
}
-LRESULT WM_SETTINGCHANGE (int wParam, int lParam) {
+LRESULT WM_SETTINGCHANGE (int /*long*/ wParam, int /*long*/ lParam) {
return null;
}
-LRESULT WM_SETFONT (int wParam, int lParam) {
+LRESULT WM_SETFONT (int /*long*/ wParam, int /*long*/ lParam) {
return null;
}
-LRESULT WM_SETREDRAW (int wParam, int lParam) {
+LRESULT WM_SETREDRAW (int /*long*/ wParam, int /*long*/ lParam) {
return null;
}
-LRESULT WM_SHOWWINDOW (int wParam, int lParam) {
+LRESULT WM_SHOWWINDOW (int /*long*/ wParam, int /*long*/ lParam) {
return null;
}
-LRESULT WM_SIZE (int wParam, int lParam) {
+LRESULT WM_SIZE (int /*long*/ wParam, int /*long*/ lParam) {
sendEvent (SWT.Resize);
// widget could be disposed at this point
return null;
}
-LRESULT WM_SYSCHAR (int wParam, int lParam) {
+LRESULT WM_SYSCHAR (int /*long*/ wParam, int /*long*/ lParam) {
return wmSysChar (handle, wParam, lParam);
}
-LRESULT WM_SYSCOLORCHANGE (int wParam, int lParam) {
+LRESULT WM_SYSCOLORCHANGE (int /*long*/ wParam, int /*long*/ lParam) {
return null;
}
-LRESULT WM_SYSCOMMAND (int wParam, int lParam) {
+LRESULT WM_SYSCOMMAND (int /*long*/ wParam, int /*long*/ lParam) {
/*
* Check to see if the command is a system command or
* a user menu item that was added to the System menu.
@@ -4331,10 +4331,10 @@ LRESULT WM_SYSCOMMAND (int wParam, int lParam) {
}
/* Process the System Command */
- int cmd = wParam & 0xFFF0;
+ int cmd = (int)/*64*/wParam & 0xFFF0;
switch (cmd) {
case OS.SC_CLOSE:
- int hwndShell = menuShell ().handle;
+ int /*long*/ hwndShell = menuShell ().handle;
int bits = OS.GetWindowLong (hwndShell, OS.GWL_STYLE);
if ((bits & OS.WS_SYSMENU) == 0) return LRESULT.ZERO;
break;
@@ -4384,7 +4384,7 @@ LRESULT WM_SYSCOMMAND (int wParam, int lParam) {
Decorations shell = menuShell ();
Menu menu = shell.getMenuBar ();
if (menu != null) {
- char key = Display.mbcsToWcs (lParam);
+ char key = Display.mbcsToWcs ((int)/*64*/lParam);
if (key != 0) {
key = Character.toUpperCase (key);
MenuItem [] items = menu.getItems ();
@@ -4427,37 +4427,37 @@ LRESULT WM_SYSCOMMAND (int wParam, int lParam) {
return null;
}
-LRESULT WM_SYSKEYDOWN (int wParam, int lParam) {
+LRESULT WM_SYSKEYDOWN (int /*long*/ wParam, int /*long*/ lParam) {
return wmSysKeyDown (handle, wParam, lParam);
}
-LRESULT WM_SYSKEYUP (int wParam, int lParam) {
+LRESULT WM_SYSKEYUP (int /*long*/ wParam, int /*long*/ lParam) {
return wmSysKeyUp (handle, wParam, lParam);
}
-LRESULT WM_TIMER (int wParam, int lParam) {
+LRESULT WM_TIMER (int /*long*/ wParam, int /*long*/ lParam) {
return null;
}
-LRESULT WM_UNDO (int wParam, int lParam) {
+LRESULT WM_UNDO (int /*long*/ wParam, int /*long*/ lParam) {
return null;
}
-LRESULT WM_UPDATEUISTATE (int wParam, int lParam) {
+LRESULT WM_UPDATEUISTATE (int /*long*/ wParam, int /*long*/ lParam) {
return null;
}
-LRESULT WM_VSCROLL (int wParam, int lParam) {
+LRESULT WM_VSCROLL (int /*long*/ wParam, int /*long*/ lParam) {
Control control = display.getControl (lParam);
if (control == null) return null;
return control.wmScrollChild (wParam, lParam);
}
-LRESULT WM_WINDOWPOSCHANGED (int wParam, int lParam) {
+LRESULT WM_WINDOWPOSCHANGED (int /*long*/ wParam, int /*long*/ lParam) {
return null;
}
-LRESULT WM_WINDOWPOSCHANGING (int wParam, int lParam) {
+LRESULT WM_WINDOWPOSCHANGING (int /*long*/ wParam, int /*long*/ 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
@@ -4472,7 +4472,7 @@ LRESULT WM_WINDOWPOSCHANGING (int wParam, int lParam) {
if ((lpwp.flags & OS.SWP_NOMOVE) == 0 || (lpwp.flags & OS.SWP_NOSIZE) == 0) {
RECT rect = new RECT ();
OS.GetWindowRect (topHandle (), rect);
- int hwndParent = parent == null ? 0 : parent.handle;
+ int /*long*/ hwndParent = parent == null ? 0 : parent.handle;
OS.MapWindowPoints (0, hwndParent, rect, 2);
OS.InvalidateRect (hwndParent, rect, true);
}
@@ -4481,19 +4481,19 @@ LRESULT WM_WINDOWPOSCHANGING (int wParam, int lParam) {
return null;
}
-LRESULT WM_XBUTTONDBLCLK (int wParam, int lParam) {
+LRESULT WM_XBUTTONDBLCLK (int /*long*/ wParam, int /*long*/ lParam) {
return wmXButtonDblClk (handle, wParam, lParam);
}
-LRESULT WM_XBUTTONDOWN (int wParam, int lParam) {
+LRESULT WM_XBUTTONDOWN (int /*long*/ wParam, int /*long*/ lParam) {
return wmXButtonDown (handle, wParam, lParam);
}
-LRESULT WM_XBUTTONUP (int wParam, int lParam) {
+LRESULT WM_XBUTTONUP (int /*long*/ wParam, int /*long*/ lParam) {
return wmXButtonUp (handle, wParam, lParam);
}
-LRESULT wmColorChild (int wParam, int lParam) {
+LRESULT wmColorChild (int /*long*/ wParam, int /*long*/ lParam) {
Control control = findBackgroundControl ();
if (control == null) {
if ((state & THEME_BACKGROUND) != 0) {
@@ -4520,15 +4520,15 @@ LRESULT wmColorChild (int wParam, int lParam) {
if (control.backgroundImage != null) {
RECT rect = new RECT ();
OS.GetClientRect (handle, rect);
- int hwnd = control.handle;
- int hBitmap = control.backgroundImage.handle;
+ int /*long*/ hwnd = control.handle;
+ int /*long*/ 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 hBrush = findBrush (hBitmap, OS.BS_PATTERN);
+ int /*long*/ hBrush = findBrush (hBitmap, OS.BS_PATTERN);
if ((state & DRAW_BACKGROUND) != 0) {
- int hOldBrush = OS.SelectObject (wParam, hBrush);
+ int /*long*/ 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);
@@ -4536,40 +4536,40 @@ LRESULT wmColorChild (int wParam, int lParam) {
OS.SetBkMode (wParam, OS.TRANSPARENT);
return new LRESULT (hBrush);
}
- int hBrush = findBrush (backPixel, OS.BS_SOLID);
+ int /*long*/ hBrush = findBrush (backPixel, OS.BS_SOLID);
if ((state & DRAW_BACKGROUND) != 0) {
RECT rect = new RECT ();
OS.GetClientRect (handle, rect);
- int hOldBrush = OS.SelectObject (wParam, hBrush);
+ int /*long*/ 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 wParam, int lParam) {
+LRESULT wmCommandChild (int /*long*/ wParam, int /*long*/ lParam) {
return null;
}
-LRESULT wmDrawChild (int wParam, int lParam) {
+LRESULT wmDrawChild (int /*long*/ wParam, int /*long*/ lParam) {
return null;
}
-LRESULT wmMeasureChild (int wParam, int lParam) {
+LRESULT wmMeasureChild (int /*long*/ wParam, int /*long*/ lParam) {
return null;
}
-LRESULT wmNotify (NMHDR hdr, int wParam, int lParam) {
+LRESULT wmNotify (NMHDR hdr, int /*long*/ wParam, int /*long*/ lParam) {
Control control = display.getControl (hdr.hwndFrom);
if (control == null) return null;
return control.wmNotifyChild (hdr, wParam, lParam);
}
-LRESULT wmNotifyChild (NMHDR hdr, int wParam, int lParam) {
+LRESULT wmNotifyChild (NMHDR hdr, int /*long*/ wParam, int /*long*/ lParam) {
return null;
}
-LRESULT wmScrollChild (int wParam, int lParam) {
+LRESULT wmScrollChild (int /*long*/ wParam, int /*long*/ 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 39efb3bf39..adefc96176 100755
--- 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
@@ -44,7 +44,7 @@ public class CoolBar extends Composite {
CoolItem [] originalItems;
boolean locked;
boolean ignoreResize;
- static final int ReBarProc;
+ static final int /*long*/ ReBarProc;
static final TCHAR ReBarClass = new TCHAR (0, OS.REBARCLASSNAME, true);
static {
INITCOMMONCONTROLSEX icex = new INITCOMMONCONTROLSEX ();
@@ -110,7 +110,7 @@ public CoolBar (Composite parent, int style) {
}
}
-int callWindowProc (int hwnd, int msg, int wParam, int lParam) {
+int /*long*/ callWindowProc (int /*long*/ hwnd, int msg, int /*long*/ wParam, int /*long*/ lParam) {
if (handle == 0) return 0;
return OS.CallWindowProc (ReBarProc, hwnd, msg, wParam, lParam);
}
@@ -137,7 +137,7 @@ public Point computeSize (int wHint, int hHint, boolean changed) {
int border = getBorderWidth ();
int newWidth = wHint == SWT.DEFAULT ? 0x3FFF : wHint + (border * 2);
int newHeight = hHint == SWT.DEFAULT ? 0x3FFF : hHint + (border * 2);
- int count = OS.SendMessage (handle, OS.RB_GETBANDCOUNT, 0, 0);
+ int count = (int)/*64*/OS.SendMessage (handle, OS.RB_GETBANDCOUNT, 0, 0);
if (count != 0) {
ignoreResize = true;
boolean redraw = false;
@@ -216,12 +216,12 @@ void createHandle () {
* The control will not destroy a font that it did not
* create.
*/
- int hFont = OS.GetStockObject (OS.SYSTEM_FONT);
+ int /*long*/ hFont = OS.GetStockObject (OS.SYSTEM_FONT);
OS.SendMessage (handle, OS.WM_SETFONT, hFont, 0);
}
void createItem (CoolItem item, int index) {
- int count = OS.SendMessage (handle, OS.RB_GETBANDCOUNT, 0, 0);
+ int count = (int)/*64*/OS.SendMessage (handle, OS.RB_GETBANDCOUNT, 0, 0);
if (!(0 <= index && index <= count)) error (SWT.ERROR_INVALID_RANGE);
int id = 0;
while (id < items.length && items [id] != null) id++;
@@ -230,8 +230,8 @@ void createItem (CoolItem item, int index) {
System.arraycopy (items, 0, newItems, 0, items.length);
items = newItems;
}
- int hHeap = OS.GetProcessHeap ();
- int lpText = OS.HeapAlloc (hHeap, OS.HEAP_ZERO_MEMORY, TCHAR.sizeof);
+ int /*long*/ hHeap = OS.GetProcessHeap ();
+ int /*long*/ 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;
@@ -295,8 +295,8 @@ void createWidget () {
}
void destroyItem (CoolItem item) {
- int index = OS.SendMessage (handle, OS.RB_IDTOINDEX, item.id, 0);
- int count = OS.SendMessage (handle, OS.RB_GETBANDCOUNT, 0, 0);
+ int index = (int)/*64*/OS.SendMessage (handle, OS.RB_IDTOINDEX, item.id, 0);
+ int count = (int)/*64*/OS.SendMessage (handle, OS.RB_GETBANDCOUNT, 0, 0);
if (count != 0) {
int lastIndex = getLastIndexOfRow (index);
if (index == lastIndex) {
@@ -360,7 +360,7 @@ void destroyItem (CoolItem item) {
originalItems = newOriginals;
}
-void drawThemeBackground (int hDC, int hwnd, RECT rect) {
+void drawThemeBackground (int /*long*/ hDC, int /*long*/ hwnd, RECT rect) {
if (OS.COMCTL32_MAJOR >= 6 && OS.IsAppThemed ()) {
if (background == -1 && (style & SWT.FLAT) != 0) {
Control control = findBackgroundControl ();
@@ -437,7 +437,7 @@ int getMargin (int index) {
*/
public CoolItem getItem (int index) {
checkWidget ();
- int count = OS.SendMessage (handle, OS.RB_GETBANDCOUNT, 0, 0);
+ int count = (int)/*64*/OS.SendMessage (handle, OS.RB_GETBANDCOUNT, 0, 0);
if (!(0 <= index && index < count)) error (SWT.ERROR_INVALID_RANGE);
REBARBANDINFO rbBand = new REBARBANDINFO ();
rbBand.cbSize = REBARBANDINFO.sizeof;
@@ -458,7 +458,7 @@ public CoolItem getItem (int index) {
*/
public int getItemCount () {
checkWidget ();
- return OS.SendMessage (handle, OS.RB_GETBANDCOUNT, 0, 0);
+ return (int)/*64*/OS.SendMessage (handle, OS.RB_GETBANDCOUNT, 0, 0);
}
/**
@@ -484,7 +484,7 @@ public int getItemCount () {
*/
public int [] getItemOrder () {
checkWidget ();
- int count = OS.SendMessage (handle, OS.RB_GETBANDCOUNT, 0, 0);
+ int count = (int)/*64*/OS.SendMessage (handle, OS.RB_GETBANDCOUNT, 0, 0);
int [] indices = new int [count];
REBARBANDINFO rbBand = new REBARBANDINFO ();
rbBand.cbSize = REBARBANDINFO.sizeof;
@@ -521,7 +521,7 @@ public int [] getItemOrder () {
*/
public CoolItem [] getItems () {
checkWidget ();
- int count = OS.SendMessage (handle, OS.RB_GETBANDCOUNT, 0, 0);
+ int count = (int)/*64*/OS.SendMessage (handle, OS.RB_GETBANDCOUNT, 0, 0);
CoolItem [] result = new CoolItem [count];
REBARBANDINFO rbBand = new REBARBANDINFO ();
rbBand.cbSize = REBARBANDINFO.sizeof;
@@ -547,7 +547,7 @@ public CoolItem [] getItems () {
*/
public Point [] getItemSizes () {
checkWidget ();
- int count = OS.SendMessage (handle, OS.RB_GETBANDCOUNT, 0, 0);
+ int count = (int)/*64*/OS.SendMessage (handle, OS.RB_GETBANDCOUNT, 0, 0);
Point [] sizes = new Point [count];
REBARBANDINFO rbBand = new REBARBANDINFO ();
rbBand.cbSize = REBARBANDINFO.sizeof;
@@ -574,7 +574,7 @@ public Point [] getItemSizes () {
}
int getLastIndexOfRow (int index) {
- int count = OS.SendMessage (handle, OS.RB_GETBANDCOUNT, 0, 0);
+ int count = (int)/*64*/OS.SendMessage (handle, OS.RB_GETBANDCOUNT, 0, 0);
if (count == 0) return -1;
REBARBANDINFO rbBand = new REBARBANDINFO ();
rbBand.cbSize = REBARBANDINFO.sizeof;
@@ -589,7 +589,7 @@ int getLastIndexOfRow (int index) {
}
boolean isLastItemOfRow (int index) {
- int count = OS.SendMessage (handle, OS.RB_GETBANDCOUNT, 0, 0);
+ int count = (int)/*64*/OS.SendMessage (handle, OS.RB_GETBANDCOUNT, 0, 0);
if (index + 1 == count) return true;
REBARBANDINFO rbBand = new REBARBANDINFO ();
rbBand.cbSize = REBARBANDINFO.sizeof;
@@ -664,7 +664,7 @@ public int indexOf (CoolItem item) {
checkWidget ();
if (item == null) error (SWT.ERROR_NULL_ARGUMENT);
if (item.isDisposed()) error (SWT.ERROR_INVALID_ARGUMENT);
- return OS.SendMessage (handle, OS.RB_IDTOINDEX, item.id, 0);
+ return (int)/*64*/OS.SendMessage (handle, OS.RB_IDTOINDEX, item.id, 0);
}
void resizeToPreferredWidth (int index) {
@@ -673,7 +673,7 @@ void resizeToPreferredWidth (int index) {
* with an index out of range, Windows GP's. The
* fix is to ensure the index is in range.
*/
- int count = OS.SendMessage(handle, OS.RB_GETBANDCOUNT, 0, 0);
+ int count = (int)/*64*/OS.SendMessage(handle, OS.RB_GETBANDCOUNT, 0, 0);
if (0 <= index && index < count) {
REBARBANDINFO rbBand = new REBARBANDINFO();
rbBand.cbSize = REBARBANDINFO.sizeof;
@@ -722,7 +722,7 @@ void removeControl (Control control) {
void setBackgroundPixel (int pixel) {
if (pixel == -1) pixel = defaultBackground ();
OS.SendMessage (handle, OS.RB_SETBKCOLOR, 0, pixel);
- setItemColors (OS.SendMessage (handle, OS.RB_GETTEXTCOLOR, 0, 0), pixel);
+ setItemColors ((int)/*64*/OS.SendMessage (handle, OS.RB_GETTEXTCOLOR, 0, 0), pixel);
/*
* Feature in Windows. For some reason, Windows
* does not fully erase the coolbar area and coolbar
@@ -741,11 +741,11 @@ void setBackgroundPixel (int pixel) {
void setForegroundPixel (int pixel) {
if (pixel == -1) pixel = defaultForeground ();
OS.SendMessage (handle, OS.RB_SETTEXTCOLOR, 0, pixel);
- setItemColors (pixel, OS.SendMessage (handle, OS.RB_GETBKCOLOR, 0, 0));
+ setItemColors (pixel, (int)/*64*/OS.SendMessage (handle, OS.RB_GETBKCOLOR, 0, 0));
}
void setItemColors (int foreColor, int backColor) {
- int count = OS.SendMessage (handle, OS.RB_GETBANDCOUNT, 0, 0);
+ int count = (int)/*64*/OS.SendMessage (handle, OS.RB_GETBANDCOUNT, 0, 0);
REBARBANDINFO rbBand = new REBARBANDINFO ();
rbBand.cbSize = REBARBANDINFO.sizeof;
rbBand.fMask = OS.RBBIM_COLORS;
@@ -817,7 +817,7 @@ public void setItemLayout (int [] itemOrder, int [] wrapIndices, Point [] sizes)
*/
void setItemOrder (int [] itemOrder) {
if (itemOrder == null) error (SWT.ERROR_NULL_ARGUMENT);
- int itemCount = OS.SendMessage (handle, OS.RB_GETBANDCOUNT, 0, 0);
+ int itemCount = (int)/*64*/OS.SendMessage (handle, OS.RB_GETBANDCOUNT, 0, 0);
if (itemOrder.length != itemCount) error (SWT.ERROR_INVALID_ARGUMENT);
/* Ensure that itemOrder does not contain any duplicates. */
@@ -833,7 +833,7 @@ void setItemOrder (int [] itemOrder) {
rbBand.cbSize = REBARBANDINFO.sizeof;
for (int i=0; i<itemOrder.length; i++) {
int id = originalItems [itemOrder [i]].id;
- int index = OS.SendMessage (handle, OS.RB_IDTOINDEX, id, 0);
+ int index = (int)/*64*/OS.SendMessage (handle, OS.RB_IDTOINDEX, id, 0);
if (index != i) {
int lastItemSrcRow = getLastIndexOfRow (index);
int lastItemDstRow = getLastIndexOfRow (i);
@@ -876,7 +876,7 @@ void setItemOrder (int [] itemOrder) {
*/
void setItemSizes (Point [] sizes) {
if (sizes == null) error (SWT.ERROR_NULL_ARGUMENT);
- int count = OS.SendMessage (handle, OS.RB_GETBANDCOUNT, 0, 0);
+ int count = (int)/*64*/OS.SendMessage (handle, OS.RB_GETBANDCOUNT, 0, 0);
if (sizes.length != count) error (SWT.ERROR_INVALID_ARGUMENT);
REBARBANDINFO rbBand = new REBARBANDINFO ();
rbBand.cbSize = REBARBANDINFO.sizeof;
@@ -903,7 +903,7 @@ void setItemSizes (Point [] sizes) {
public void setLocked (boolean locked) {
checkWidget ();
this.locked = locked;
- int count = OS.SendMessage (handle, OS.RB_GETBANDCOUNT, 0, 0);
+ int count = (int)/*64*/OS.SendMessage (handle, OS.RB_GETBANDCOUNT, 0, 0);
REBARBANDINFO rbBand = new REBARBANDINFO ();
rbBand.cbSize = REBARBANDINFO.sizeof;
rbBand.fMask = OS.RBBIM_STYLE;
@@ -974,11 +974,11 @@ TCHAR windowClass () {
return ReBarClass;
}
-int windowProc () {
+int /*long*/ windowProc () {
return ReBarProc;
}
-LRESULT WM_COMMAND (int wParam, int lParam) {
+LRESULT WM_COMMAND (int /*long*/ wParam, int /*long*/ lParam) {
/*
* Feature in Windows. When the coolbar window
* proc processes WM_COMMAND, it forwards this
@@ -1002,7 +1002,7 @@ LRESULT WM_COMMAND (int wParam, int lParam) {
return LRESULT.ZERO;
}
-LRESULT WM_ERASEBKGND (int wParam, int lParam) {
+LRESULT WM_ERASEBKGND (int /*long*/ wParam, int /*long*/ lParam) {
LRESULT result = super.WM_ERASEBKGND (wParam, lParam);
/*
* Feature in Windows. For some reason, Windows
@@ -1024,7 +1024,7 @@ LRESULT WM_ERASEBKGND (int wParam, int lParam) {
return result;
}
-LRESULT WM_NOTIFY (int wParam, int lParam) {
+LRESULT WM_NOTIFY (int /*long*/ wParam, int /*long*/ lParam) {
/*
* Feature in Windows. When the cool bar window
* proc processes WM_NOTIFY, it forwards this
@@ -1048,7 +1048,7 @@ LRESULT WM_NOTIFY (int wParam, int lParam) {
return LRESULT.ZERO;
}
-LRESULT WM_SETREDRAW (int wParam, int lParam) {
+LRESULT WM_SETREDRAW (int /*long*/ wParam, int /*long*/ lParam) {
LRESULT result = super.WM_SETREDRAW (wParam, lParam);
if (result != null) return result;
/*
@@ -1072,7 +1072,7 @@ LRESULT WM_SETREDRAW (int wParam, int lParam) {
*/
if (OS.COMCTL32_MAJOR >= 6) return LRESULT.ZERO;
Rectangle rect = getBounds ();
- int code = callWindowProc (handle, OS.WM_SETREDRAW, wParam, lParam);
+ int /*long*/ 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);
@@ -1080,9 +1080,9 @@ LRESULT WM_SETREDRAW (int wParam, int lParam) {
return new LRESULT (code);
}
-LRESULT WM_SIZE (int wParam, int lParam) {
+LRESULT WM_SIZE (int /*long*/ wParam, int /*long*/ lParam) {
if (ignoreResize) {
- int code = callWindowProc (handle, OS.WM_SIZE, wParam, lParam);
+ int /*long*/ code = callWindowProc (handle, OS.WM_SIZE, wParam, lParam);
if (code == 0) return LRESULT.ZERO;
return new LRESULT (code);
}
@@ -1095,7 +1095,7 @@ LRESULT WM_SIZE (int wParam, int lParam) {
return super.WM_SIZE (wParam, lParam);
}
-LRESULT wmNotifyChild (NMHDR hdr, int wParam, int lParam) {
+LRESULT wmNotifyChild (NMHDR hdr, int /*long*/ wParam, int /*long*/ lParam) {
switch (hdr.code) {
case OS.RBN_BEGINDRAG: {
int pos = OS.GetMessagePos ();
@@ -1133,7 +1133,7 @@ LRESULT wmNotifyChild (NMHDR hdr, int wParam, int lParam) {
if (!ignoreResize) {
Point size = getSize ();
int border = getBorderWidth ();
- int barHeight = OS.SendMessage (handle, OS.RB_GETBARHEIGHT, 0, 0);
+ int barHeight = (int)/*64*/OS.SendMessage (handle, OS.RB_GETBARHEIGHT, 0, 0);
if ((style & SWT.VERTICAL) != 0) {
setSize (barHeight + 2 * border, size.y);
} else {
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 7b550f8776..b9df5bc2d6 100755
--- 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
@@ -215,7 +215,7 @@ public Rectangle getBounds () {
checkWidget ();
int index = parent.indexOf (this);
if (index == -1) return new Rectangle (0, 0, 0, 0);
- int hwnd = parent.handle;
+ int /*long*/ hwnd = parent.handle;
RECT rect = new RECT ();
OS.SendMessage (hwnd, OS.RB_GETRECT, index, rect);
if (OS.COMCTL32_MAJOR >= 6) {
@@ -239,7 +239,7 @@ Rectangle getClientArea () {
checkWidget ();
int index = parent.indexOf (this);
if (index == -1) return new Rectangle (0, 0, 0, 0);
- int hwnd = parent.handle;
+ int /*long*/ hwnd = parent.handle;
RECT insetRect = new RECT ();
OS.SendMessage (hwnd, OS.RB_GETBANDBORDERS, index, insetRect);
RECT rect = new RECT ();
@@ -327,8 +327,8 @@ public void setControl (Control control) {
this.control = null;
}
Control oldControl = this.control, newControl = control;
- int hwnd = parent.handle;
- int hwndChild = newControl != null ? control.topHandle () : 0;
+ int /*long*/ hwnd = parent.handle;
+ int /*long*/ hwndChild = newControl != null ? control.topHandle () : 0;
REBARBANDINFO rbBand = new REBARBANDINFO ();
rbBand.cbSize = REBARBANDINFO.sizeof;
rbBand.fMask = OS.RBBIM_CHILD;
@@ -341,7 +341,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 hwndAbove = 0;
+ int /*long*/ hwndAbove = 0;
if (newControl != null) {
hwndAbove = OS.GetWindow (hwndChild, OS.GW_HWNDPREV);
}
@@ -372,7 +372,7 @@ public Point getPreferredSize () {
checkWidget ();
int index = parent.indexOf (this);
if (index == -1) return new Point (0, 0);
- int hwnd = parent.handle;
+ int /*long*/ hwnd = parent.handle;
REBARBANDINFO rbBand = new REBARBANDINFO ();
rbBand.cbSize = REBARBANDINFO.sizeof;
rbBand.fMask = OS.RBBIM_CHILDSIZE | OS.RBBIM_IDEALSIZE;
@@ -402,7 +402,7 @@ public void setPreferredSize (int width, int height) {
width = Math.max (0, width);
height = Math.max (0, height);
ideal = true;
- int hwnd = parent.handle;
+ int /*long*/ hwnd = parent.handle;
int cxIdeal, cyMaxChild;
if ((parent.style & SWT.VERTICAL) != 0) {
cxIdeal = Math.max (0, height - parent.getMargin (index));
@@ -462,7 +462,7 @@ public Point getSize() {
checkWidget ();
int index = parent.indexOf (this);
if (index == -1) new Point (0, 0);
- int hwnd = parent.handle;
+ int /*long*/ hwnd = parent.handle;
RECT rect = new RECT ();
OS.SendMessage (hwnd, OS.RB_GETRECT, index, rect);
if (OS.COMCTL32_MAJOR >= 6) {
@@ -504,7 +504,7 @@ public void setSize (int width, int height) {
if (index == -1) return;
width = Math.max (0, width);
height = Math.max (0, height);
- int hwnd = parent.handle;
+ int /*long*/ hwnd = parent.handle;
int cx, cyChild, cxIdeal;
if ((parent.style & SWT.VERTICAL) != 0) {
cx = height;
@@ -583,7 +583,7 @@ public Point getMinimumSize () {
checkWidget ();
int index = parent.indexOf (this);
if (index == -1) return new Point (0, 0);
- int hwnd = parent.handle;
+ int /*long*/ hwnd = parent.handle;
REBARBANDINFO rbBand = new REBARBANDINFO ();
rbBand.cbSize = REBARBANDINFO.sizeof;
rbBand.fMask = OS.RBBIM_CHILDSIZE;
@@ -615,7 +615,7 @@ public void setMinimumSize (int width, int height) {
width = Math.max (0, width);
height = Math.max (0, height);
minimum = true;
- int hwnd = parent.handle;
+ int /*long*/ hwnd = parent.handle;
int cxMinChild, cyMinChild;
if ((parent.style & SWT.VERTICAL) != 0) {
cxMinChild = height;
@@ -661,7 +661,7 @@ public void setMinimumSize (Point size) {
boolean getWrap() {
int index = parent.indexOf (this);
- int hwnd = parent.handle;
+ int /*long*/ hwnd = parent.handle;
REBARBANDINFO rbBand = new REBARBANDINFO ();
rbBand.cbSize = REBARBANDINFO.sizeof;
rbBand.fMask = OS.RBBIM_STYLE;
@@ -671,7 +671,7 @@ boolean getWrap() {
void setWrap(boolean wrap) {
int index = parent.indexOf (this);
- int hwnd = parent.handle;
+ int /*long*/ 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 2306e331c0..e5885c761f 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
@@ -44,9 +44,9 @@ import org.eclipse.swt.graphics.*;
*/
public class DateTime extends Composite {
- static final int DateTimeProc;
+ static final int /*long*/ DateTimeProc;
static final TCHAR DateTimeClass = new TCHAR (0, OS.DATETIMEPICK_CLASS, true);
- static final int CalendarProc;
+ static final int /*long*/ CalendarProc;
static final TCHAR CalendarClass = new TCHAR (0, OS.MONTHCAL_CLASS, true);
static {
INITCOMMONCONTROLSEX icex = new INITCOMMONCONTROLSEX ();
@@ -150,7 +150,7 @@ public void addSelectionListener (SelectionListener listener) {
addListener (SWT.DefaultSelection, typedListener);
}
-int callWindowProc (int hwnd, int msg, int wParam, int lParam) {
+int /*long*/ callWindowProc (int /*long*/ hwnd, int msg, int /*long*/ wParam, int /*long*/ lParam) {
if (handle == 0) return 0;
return OS.CallWindowProc (windowProc (), hwnd, msg, wParam, lParam);
}
@@ -183,8 +183,8 @@ public Point computeSize (int wHint, int hHint, boolean changed) {
height = rect.bottom;
} else {
TCHAR buffer = new TCHAR (getCodePage (), 128);
- int newFont, oldFont = 0;
- int hDC = OS.GetDC (handle);
+ int /*long*/ newFont, oldFont = 0;
+ int /*long*/ 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 ();
@@ -764,11 +764,11 @@ TCHAR windowClass () {
return (style & SWT.CALENDAR) != 0 ? CalendarClass : DateTimeClass;
}
-int windowProc () {
+int /*long*/ windowProc () {
return (style & SWT.CALENDAR) != 0 ? CalendarProc : DateTimeProc;
}
-LRESULT wmNotifyChild (NMHDR hdr, int wParam, int lParam) {
+LRESULT wmNotifyChild (NMHDR hdr, int /*long*/ wParam, int /*long*/ lParam) {
switch (hdr.code) {
case OS.MCN_SELCHANGE: //SENT WHEN YOU SET IT?
case OS.DTN_DATETIMECHANGE:
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 7f3a62a544..9d0852af35 100755
--- 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
@@ -100,7 +100,8 @@ public class Decorations extends Canvas {
Menu [] menus;
Control savedFocus;
Button defaultButton, saveDefault;
- int swFlags, hAccel, nAccel;
+ int swFlags, nAccel;
+ int /*long*/ hAccel;
boolean moved, resized, opened;
int oldX = OS.CW_USEDEFAULT, oldY = OS.CW_USEDEFAULT;
int oldWidth = OS.CW_USEDEFAULT, oldHeight = OS.CW_USEDEFAULT;
@@ -167,7 +168,7 @@ void _setMaximized (boolean maximized) {
if (OS.IsPPC) {
/* Leave space for the menu bar */
if (menuBar != null) {
- int hwndCB = menuBar.hwndCB;
+ int /*long*/ hwndCB = menuBar.hwndCB;
RECT rectCB = new RECT ();
OS.GetWindowRect (hwndCB, rectCB);
height -= rectCB.bottom - rectCB.top;
@@ -291,7 +292,7 @@ protected void checkSubclass () {
if (!isValidSubclass ()) error (SWT.ERROR_INVALID_SUBCLASS);
}
-int callWindowProc (int hwnd, int msg, int wParam, int lParam) {
+int /*long*/ callWindowProc (int /*long*/ hwnd, int msg, int /*long*/ wParam, int /*long*/ lParam) {
if (handle == 0) return 0;
return OS.DefMDIChildProc (hwnd, msg, wParam, lParam);
}
@@ -427,7 +428,7 @@ void createHandle () {
*/
if ((state & FOREIGN_HANDLE) == 0) {
if (!OS.IsWinCE) {
- int hIcon = OS.LoadIcon (0, OS.IDI_APPLICATION);
+ int /*long*/ hIcon = OS.LoadIcon (0, OS.IDI_APPLICATION);
OS.SendMessage (handle, OS.WM_SETICON, OS.ICON_SMALL, hIcon);
}
}
@@ -457,7 +458,7 @@ public void dispose () {
super.dispose ();
}
-Menu findMenu (int hMenu) {
+Menu findMenu (int /*long*/ hMenu) {
if (menus == null) return null;
for (int i=0; i<menus.length; i++) {
Menu menu = menus [i];
@@ -513,7 +514,7 @@ public Rectangle getClientArea () {
if (OS.IsHPC) {
Rectangle rect = super.getClientArea ();
if (menuBar != null) {
- int hwndCB = menuBar.hwndCB;
+ int /*long*/ hwndCB = menuBar.hwndCB;
int height = OS.CommandBar_Height (hwndCB);
rect.y += height;
rect.height = Math.max (0, rect.height - height);
@@ -961,7 +962,7 @@ void setImages (Image image, Image [] images) {
if (smallImage != null) smallImage.dispose ();
if (largeImage != null) largeImage.dispose ();
smallImage = largeImage = null;
- int hSmallIcon = 0, hLargeIcon = 0;
+ int /*long*/ hSmallIcon = 0, hLargeIcon = 0;
Image smallIcon = null, largeIcon = null;
if (image != null) {
smallIcon = largeIcon = image;
@@ -1162,7 +1163,7 @@ public void setMenuBar (Menu menu) {
} else {
if (menu != null) display.removeBar (menu);
menuBar = menu;
- int hMenu = menuBar != null ? menuBar.handle: 0;
+ int /*long*/ hMenu = menuBar != null ? menuBar.handle: 0;
OS.SetMenu (handle, hMenu);
}
destroyAccelerators ();
@@ -1206,7 +1207,7 @@ void setParent () {
* undocumented and possibly dangerous Windows
* feature.
*/
- int hwndParent = parent.handle;
+ int /*long*/ hwndParent = parent.handle;
display.lockActiveWindow = true;
OS.SetParent (handle, hwndParent);
if (!OS.IsWindowVisible (hwndParent)) {
@@ -1215,7 +1216,7 @@ void setParent () {
int bits = OS.GetWindowLong (handle, OS.GWL_STYLE);
bits &= ~OS.WS_CHILD;
OS.SetWindowLong (handle, OS.GWL_STYLE, bits | OS.WS_POPUP);
- OS.SetWindowLong (handle, OS.GWL_ID, 0);
+ OS.SetWindowLongPtr (handle, OS.GWLP_ID, 0);
int flags = OS.SWP_NOSIZE | OS.SWP_NOMOVE | OS.SWP_NOACTIVATE;
SetWindowPos (handle, OS.HWND_BOTTOM, 0, 0, 0, 0, flags);
display.lockActiveWindow = false;
@@ -1278,7 +1279,7 @@ void setSavedFocus (Control control) {
void setSystemMenu () {
if (OS.IsWinCE) return;
- int hMenu = OS.GetSystemMenu (handle, false);
+ int /*long*/ hMenu = OS.GetSystemMenu (handle, false);
if (hMenu == 0) return;
int oldCount = OS.GetMenuItemCount (hMenu);
if ((style & SWT.RESIZE) == 0) {
@@ -1355,7 +1356,7 @@ public void setVisible (boolean visible) {
if (isDisposed ()) return;
if (OS.IsHPC) {
if (menuBar != null) {
- int hwndCB = menuBar.hwndCB;
+ int /*long*/ hwndCB = menuBar.hwndCB;
OS.CommandBar_DrawMenuBar (hwndCB, 0);
}
}
@@ -1454,13 +1455,13 @@ boolean translateMenuAccelerator (MSG msg) {
boolean translateMDIAccelerator (MSG msg) {
if (!(this instanceof Shell)) {
Shell shell = getShell ();
- int hwndMDIClient = shell.hwndMDIClient;
+ int /*long*/ hwndMDIClient = shell.hwndMDIClient;
if (hwndMDIClient != 0 && OS.TranslateMDISysAccel (hwndMDIClient, msg)) {
return true;
}
if (msg.message == OS.WM_KEYDOWN) {
if (OS.GetKeyState (OS.VK_CONTROL) >= 0) return false;
- switch (msg.wParam) {
+ switch ((int)/*64*/(msg.wParam)) {
case OS.VK_F4:
OS.PostMessage (handle, OS.WM_CLOSE, 0, 0);
return true;
@@ -1470,7 +1471,7 @@ boolean translateMDIAccelerator (MSG msg) {
return false;
}
if (msg.message == OS.WM_SYSKEYDOWN) {
- switch (msg.wParam) {
+ switch ((int)/*64*/(msg.wParam)) {
case OS.VK_F4:
OS.PostMessage (shell.handle, OS.WM_CLOSE, 0, 0);
return true;
@@ -1532,7 +1533,7 @@ int widgetExtStyle () {
return bits;
}
-int widgetParent () {
+int /*long*/ widgetParent () {
Shell shell = getShell ();
return shell.hwndMDIClient ();
}
@@ -1574,7 +1575,7 @@ int widgetStyle () {
return bits;
}
-int windowProc (int hwnd, int msg, int wParam, int lParam) {
+int /*long*/ windowProc (int /*long*/ hwnd, int msg, int /*long*/ wParam, int /*long*/ lParam) {
switch (msg) {
case Display.SWT_GETACCEL:
case Display.SWT_GETACCELCOUNT:
@@ -1584,7 +1585,7 @@ int windowProc (int hwnd, int msg, int wParam, int lParam) {
return super.windowProc (hwnd, msg, wParam, lParam);
}
-LRESULT WM_ACTIVATE (int wParam, int lParam) {
+LRESULT WM_ACTIVATE (int /*long*/ wParam, int /*long*/ lParam) {
LRESULT result = super.WM_ACTIVATE (wParam, lParam);
if (result != null) return result;
/*
@@ -1645,14 +1646,14 @@ LRESULT WM_ACTIVATE (int wParam, int lParam) {
return result;
}
-LRESULT WM_CLOSE (int wParam, int lParam) {
+LRESULT WM_CLOSE (int /*long*/ wParam, int /*long*/ lParam) {
LRESULT result = super.WM_CLOSE (wParam, lParam);
if (result != null) return result;
if (isEnabled () && isActive ()) closeWidget ();
return LRESULT.ZERO;
}
-LRESULT WM_HOTKEY (int wParam, int lParam) {
+LRESULT WM_HOTKEY (int /*long*/ wParam, int /*long*/ lParam) {
LRESULT result = super.WM_HOTKEY (wParam, lParam);
if (result != null) return result;
if (OS.IsSP) {
@@ -1678,13 +1679,13 @@ LRESULT WM_HOTKEY (int wParam, int lParam) {
return result;
}
-LRESULT WM_KILLFOCUS (int wParam, int lParam) {
+LRESULT WM_KILLFOCUS (int /*long*/ wParam, int /*long*/ lParam) {
LRESULT result = super.WM_KILLFOCUS (wParam, lParam);
saveFocus ();
return result;
}
-LRESULT WM_MOVE (int wParam, int lParam) {
+LRESULT WM_MOVE (int /*long*/ wParam, int /*long*/ lParam) {
if (moved) {
Point location = getLocation ();
if (location.x == oldX && location.y == oldY) {
@@ -1696,7 +1697,7 @@ LRESULT WM_MOVE (int wParam, int lParam) {
return super.WM_MOVE (wParam, lParam);
}
-LRESULT WM_NCACTIVATE (int wParam, int lParam) {
+LRESULT WM_NCACTIVATE (int /*long*/ wParam, int /*long*/ lParam) {
LRESULT result = super.WM_NCACTIVATE (wParam, lParam);
if (result != null) return result;
if (wParam == 0) {
@@ -1716,13 +1717,13 @@ LRESULT WM_NCACTIVATE (int wParam, int lParam) {
}
}
if (!(this instanceof Shell)) {
- int hwndShell = getShell().handle;
+ int /*long*/ hwndShell = getShell().handle;
OS.SendMessage (hwndShell, OS.WM_NCACTIVATE, wParam, lParam);
}
return result;
}
-LRESULT WM_QUERYOPEN (int wParam, int lParam) {
+LRESULT WM_QUERYOPEN (int /*long*/ wParam, int /*long*/ lParam) {
LRESULT result = super.WM_QUERYOPEN (wParam, lParam);
if (result != null) return result;
sendEvent (SWT.Deiconify);
@@ -1730,18 +1731,18 @@ LRESULT WM_QUERYOPEN (int wParam, int lParam) {
return result;
}
-LRESULT WM_SETFOCUS (int wParam, int lParam) {
+LRESULT WM_SETFOCUS (int /*long*/ wParam, int /*long*/ lParam) {
LRESULT result = super.WM_SETFOCUS (wParam, lParam);
if (savedFocus != this) restoreFocus ();
return result;
}
-LRESULT WM_SIZE (int wParam, int lParam) {
+LRESULT WM_SIZE (int /*long*/ wParam, int /*long*/ lParam) {
LRESULT result = null;
boolean changed = true;
if (resized) {
int newWidth = 0, newHeight = 0;
- switch (wParam) {
+ switch ((int)/*64*/wParam) {
case OS.SIZE_RESTORED:
case OS.SIZE_MAXIMIZED:
newWidth = OS.LOWORD (lParam);
@@ -1770,11 +1771,11 @@ LRESULT WM_SIZE (int wParam, int lParam) {
return result;
}
-LRESULT WM_SYSCOMMAND (int wParam, int lParam) {
+LRESULT WM_SYSCOMMAND (int /*long*/ wParam, int /*long*/ lParam) {
LRESULT result = super.WM_SYSCOMMAND (wParam, lParam);
if (result != null) return result;
if (!(this instanceof Shell)) {
- int cmd = wParam & 0xFFF0;
+ int cmd = (int)/*64*/wParam & 0xFFF0;
switch (cmd) {
case OS.SC_CLOSE: {
OS.PostMessage (handle, OS.WM_CLOSE, 0, 0);
@@ -1789,7 +1790,7 @@ LRESULT WM_SYSCOMMAND (int wParam, int lParam) {
return result;
}
-LRESULT WM_WINDOWPOSCHANGING (int wParam, int lParam) {
+LRESULT WM_WINDOWPOSCHANGING (int /*long*/ wParam, int /*long*/ 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 f5c9239a84..81aae1e3e7 100755
--- 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
@@ -80,8 +80,8 @@ public DirectoryDialog (Shell parent, int style) {
checkSubclass ();
}
-int BrowseCallbackProc (int hwnd, int uMsg, int lParam, int lpData) {
- switch (uMsg) {
+int /*long*/ BrowseCallbackProc (int /*long*/ hwnd, int /*long*/ uMsg, int /*long*/ lParam, int /*long*/ lpData) {
+ switch ((int)/*64*/uMsg) {
case OS.BFFM_INITIALIZED:
if (filterPath != null && filterPath.length () != 0) {
/* Use the character encoding for the default locale */
@@ -145,14 +145,14 @@ public String getMessage () {
public String open () {
if (OS.IsWinCE) SWT.error (SWT.ERROR_NOT_IMPLEMENTED);
- int hHeap = OS.GetProcessHeap ();
+ int /*long*/ hHeap = OS.GetProcessHeap ();
/* Get the owner HWND for the dialog */
- int hwndOwner = 0;
+ int /*long*/ hwndOwner = 0;
if (parent != null) hwndOwner = parent.handle;
/* Copy the message to OS memory */
- int lpszTitle = 0;
+ int /*long*/ lpszTitle = 0;
if (message.length () != 0) {
String string = message;
if (string.indexOf ('&') != -1) {
@@ -175,7 +175,7 @@ public String open () {
/* Create the BrowseCallbackProc */
Callback callback = new Callback (this, "BrowseCallbackProc", 4); //$NON-NLS-1$
- int lpfn = callback.getAddress ();
+ int /*long*/ lpfn = callback.getAddress ();
if (lpfn == 0) SWT.error (SWT.ERROR_NO_MORE_CALLBACKS);
/* Make the parent shell be temporary modal */
@@ -224,7 +224,7 @@ public String open () {
*/
boolean oldRunMessages = display.runMessages;
if (OS.COMCTL32_MAJOR < 6) display.runMessages = false;
- int lpItemIdList = OS.SHBrowseForFolder (lpbi);
+ int /*long*/ lpItemIdList = OS.SHBrowseForFolder (lpbi);
if (OS.COMCTL32_MAJOR < 6) display.runMessages = oldRunMessages;
OS.SetErrorMode (oldErrorMode);
@@ -250,7 +250,7 @@ public String open () {
if (lpszTitle != 0) OS.HeapFree (hHeap, 0, lpszTitle);
/* Free the pointer to the ITEMIDLIST */
- int [] ppMalloc = new int [1];
+ int /*long*/ [] ppMalloc = new int /*long*/ [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 88ee10dc6c..0d79b3c95f 100755
--- 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
@@ -109,7 +109,8 @@ public class Display extends Device {
/* Windows and Events */
Event [] eventQueue;
Callback windowCallback;
- int windowProc, threadId;
+ int /*long*/ windowProc;
+ int threadId;
TCHAR windowClass, windowShadowClass;
static int WindowClassCount;
static final String WindowName = "SWT_Window"; //$NON-NLS-1$
@@ -117,9 +118,10 @@ public class Display extends Device {
EventTable eventTable, filterTable;
/* Widget Table */
+ int freeSlot;
int [] indexTable;
Control lastControl, lastGetControl;
- int freeSlot, lastHwnd, lastGetHwnd;
+ int /*long*/ lastHwnd, lastGetHwnd;
Control [] controlTable;
static final int GROW_SIZE = 1024;
static final int SWT_OBJECT_INDEX;
@@ -143,7 +145,7 @@ public class Display extends Device {
}
/* XP Themes */
- int hButtonTheme, hEditTheme, hExplorerBarTheme, hScrollBarTheme, hTabTheme;
+ int /*long*/ 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};
@@ -172,18 +174,18 @@ public class Display extends Device {
/* Filter Hook */
Callback msgFilterCallback;
- int msgFilterProc, filterHook;
+ int /*long*/ msgFilterProc, filterHook;
MSG hookMsg = new MSG ();
boolean runDragDrop = true;
/* Idle Hook */
Callback foregroundIdleCallback;
- int foregroundIdleProc, idleHook;
+ int /*long*/ foregroundIdleProc, idleHook;
/* Message Hook and Embedding */
boolean ignoreNextKey;
Callback getMsgCallback, embeddedCallback;
- int getMsgProc, msgHook, embeddedHwnd, embeddedProc;
+ int /*long*/ getMsgProc, msgHook, embeddedHwnd, embeddedProc;
static final String AWT_WINDOW_CLASS = "SunAwtWindow";
static final short [] ACCENTS = new short [] {'~', '`', '\'', '^', '"'};
@@ -201,15 +203,16 @@ public class Display extends Device {
int nextTrayId;
/* Timers */
- int [] timerIds;
+ int /*long*/ [] timerIds;
Runnable [] timerList;
- int nextTimerId = SETTINGS_ID + 1;
- static final int SETTINGS_ID = 100;
+ int /*long*/ nextTimerId = SETTINGS_ID + 1;
+ static final int /*long*/ SETTINGS_ID = 100;
static final int SETTINGS_DELAY = 2000;
/* Keyboard and Mouse */
RECT clickRect;
- int clickCount, lastTime, lastButton, lastClickHwnd;
+ int clickCount, lastTime, lastButton;
+ int /*long*/ lastClickHwnd;
int lastKey, lastAscii, lastMouse;
boolean lastVirtual, lastNull, lastDead;
byte [] keyboard = new byte [256];
@@ -226,7 +229,7 @@ public class Display extends Device {
/* Message Only Window */
Callback messageCallback;
- int hwndMessage, messageProc;
+ int /*long*/ hwndMessage, messageProc;
/* System Resources */
LOGFONT lfSystemFont;
@@ -240,7 +243,7 @@ public class Display extends Device {
ImageList[] imageList, toolImageList, toolHotImageList, toolDisabledImageList;
/* Custom Colors for ChooseColor */
- int lpCustColors;
+ int /*long*/ lpCustColors;
/* Sort Indicators */
Image upArrow, downArrow;
@@ -453,7 +456,7 @@ void addBar (Menu menu) {
bars [index] = menu;
}
-void addControl (int handle, Control control) {
+void addControl (int /*long*/ handle, Control control) {
if (handle == 0) return;
if (freeSlot == -1) {
int length = (freeSlot = indexTable.length) + GROW_SIZE;
@@ -469,7 +472,7 @@ void addControl (int handle, Control control) {
if (USE_PROPERTY) {
OS.SetProp (handle, SWT_OBJECT_INDEX, freeSlot + 1);
} else {
- OS.SetWindowLong (handle, OS.GWL_USERDATA, freeSlot + 1);
+ OS.SetWindowLongPtr (handle, OS.GWLP_USERDATA, freeSlot + 1);
}
int oldSlot = freeSlot;
freeSlot = indexTable [oldSlot];
@@ -741,8 +744,9 @@ protected void create (DeviceData data) {
void createDisplay (DeviceData data) {
}
-static int create32bitDIB (Image image) {
- int transparentPixel = -1, alpha = -1, hMask = 0, hBitmap = 0;
+static int /*long*/ create32bitDIB (Image image) {
+ int transparentPixel = -1, alpha = -1;
+ int /*long*/ hMask = 0, hBitmap = 0;
byte[] alphaData = null;
switch (image.type) {
case SWT.ICON:
@@ -763,10 +767,10 @@ static int create32bitDIB (Image image) {
OS.GetObject (hBitmap, BITMAP.sizeof, bm);
int imgWidth = bm.bmWidth;
int imgHeight = bm.bmHeight;
- int hDC = OS.GetDC (0);
- int srcHdc = OS.CreateCompatibleDC (hDC);
- int oldSrcBitmap = OS.SelectObject (srcHdc, hBitmap);
- int memHdc = OS.CreateCompatibleDC (hDC);
+ 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);
BITMAPINFOHEADER bmiHeader = new BITMAPINFOHEADER ();
bmiHeader.biSize = BITMAPINFOHEADER.sizeof;
bmiHeader.biWidth = imgWidth;
@@ -776,10 +780,10 @@ static int create32bitDIB (Image image) {
bmiHeader.biCompression = OS.BI_RGB;
byte [] bmi = new byte [BITMAPINFOHEADER.sizeof];
OS.MoveMemory (bmi, bmiHeader, BITMAPINFOHEADER.sizeof);
- int [] pBits = new int [1];
- int memDib = OS.CreateDIBSection (0, bmi, OS.DIB_RGB_COLORS, pBits, 0, 0);
+ int /*long*/ [] pBits = new int /*long*/ [1];
+ int /*long*/ memDib = OS.CreateDIBSection (0, bmi, OS.DIB_RGB_COLORS, pBits, 0, 0);
if (memDib == 0) SWT.error (SWT.ERROR_NO_HANDLES);
- int oldMemBitmap = OS.SelectObject (memHdc, memDib);
+ int /*long*/ oldMemBitmap = OS.SelectObject (memHdc, memDib);
BITMAP dibBM = new BITMAP ();
OS.GetObject (memDib, BITMAP.sizeof, dibBM);
int sizeInBytes = dibBM.bmWidthBytes * dibBM.bmHeight;
@@ -871,16 +875,15 @@ static int create32bitDIB (Image image) {
if (hMask != 0) OS.DeleteObject (hMask);
return memDib;
}
-
-static int create32bitDIB (int hBitmap, int alpha, byte [] alphaData, int transparentPixel) {
+static int /*long*/ create32bitDIB (int /*long*/ 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 hDC = OS.GetDC (0);
- int srcHdc = OS.CreateCompatibleDC (hDC);
- int oldSrcBitmap = OS.SelectObject (srcHdc, hBitmap);
- int memHdc = OS.CreateCompatibleDC (hDC);
+ 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);
BITMAPINFOHEADER bmiHeader = new BITMAPINFOHEADER ();
bmiHeader.biSize = BITMAPINFOHEADER.sizeof;
bmiHeader.biWidth = imgWidth;
@@ -890,10 +893,10 @@ static int create32bitDIB (int hBitmap, int alpha, byte [] alphaData, int transp
bmiHeader.biCompression = OS.BI_RGB;
byte [] bmi = new byte [BITMAPINFOHEADER.sizeof];
OS.MoveMemory (bmi, bmiHeader, BITMAPINFOHEADER.sizeof);
- int [] pBits = new int [1];
- int memDib = OS.CreateDIBSection (0, bmi, OS.DIB_RGB_COLORS, pBits, 0, 0);
+ int /*long*/ [] pBits = new int /*long*/ [1];
+ int /*long*/ memDib = OS.CreateDIBSection (0, bmi, OS.DIB_RGB_COLORS, pBits, 0, 0);
if (memDib == 0) SWT.error (SWT.ERROR_NO_HANDLES);
- int oldMemBitmap = OS.SelectObject (memHdc, memDib);
+ int /*long*/ oldMemBitmap = OS.SelectObject (memHdc, memDib);
BITMAP dibBM = new BITMAP ();
OS.GetObject (memDib, BITMAP.sizeof, dibBM);
int sizeInBytes = dibBM.bmWidthBytes * dibBM.bmHeight;
@@ -971,9 +974,9 @@ static Image createIcon (Image image) {
return new Image (device, data, mask);
}
int width = data.width, height = data.height;
- int hMask, hBitmap;
- int hDC = device.internal_new_GC (null);
- int dstHdc = OS.CreateCompatibleDC (hDC), oldDstBitmap;
+ int /*long*/ hMask, hBitmap;
+ int /*long*/ hDC = device.internal_new_GC (null);
+ int /*long*/ 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);
@@ -984,8 +987,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 srcHdc = OS.CreateCompatibleDC (hDC);
- int oldSrcBitmap = OS.SelectObject (srcHdc, image.handle);
+ int /*long*/ srcHdc = OS.CreateCompatibleDC (hDC);
+ int /*long*/ 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);
@@ -1002,14 +1005,14 @@ static Image createIcon (Image image) {
info.fIcon = true;
info.hbmColor = hBitmap;
info.hbmMask = hMask;
- int hIcon = OS.CreateIconIndirect (info);
+ int /*long*/ 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 createMaskFromAlpha (ImageData data, int destWidth, int destHeight) {
+static int /*long*/ createMaskFromAlpha (ImageData data, int destWidth, int destHeight) {
int srcWidth = data.width;
int srcHeight = data.height;
ImageData mask = ImageData.internal_new (srcWidth, srcHeight, 1,
@@ -1021,13 +1024,13 @@ static int createMaskFromAlpha (ImageData data, int destWidth, int destHeight) {
mask.setPixel (x, y, (data.alphaData [ap++] & 0xff) <= 127 ? 1 : 0);
}
}
- int hMask = OS.CreateBitmap (srcWidth, srcHeight, 1, 1, mask.data);
+ int /*long*/ hMask = OS.CreateBitmap (srcWidth, srcHeight, 1, 1, mask.data);
if (srcWidth != destWidth || srcHeight != destHeight) {
- int hdc = OS.GetDC (0);
- int hdc1 = OS.CreateCompatibleDC (hdc);
+ int /*long*/ hdc = OS.GetDC (0);
+ int /*long*/ hdc1 = OS.CreateCompatibleDC (hdc);
OS.SelectObject (hdc1, hMask);
- int hdc2 = OS.CreateCompatibleDC (hdc);
- int hMask2 = OS.CreateBitmap (destWidth, destHeight, 1, 1, null);
+ int /*long*/ hdc2 = OS.CreateCompatibleDC (hdc);
+ int /*long*/ 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);
@@ -1102,14 +1105,14 @@ void drawMenuBars () {
bars = null;
}
-int embeddedProc (int hwnd, int msg, int wParam, int lParam) {
- switch (msg) {
+int /*long*/ embeddedProc (int /*long*/ hwnd, int /*long*/ msg, int /*long*/ wParam, int /*long*/ 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 hHeap = OS.GetProcessHeap ();
+ int /*long*/ hHeap = OS.GetProcessHeap ();
OS.HeapFree (hHeap, 0, lParam);
break;
}
@@ -1122,7 +1125,7 @@ int embeddedProc (int hwnd, int msg, int wParam, int lParam) {
break;
}
}
- return OS.DefWindowProc (hwnd, msg, wParam, lParam);
+ return OS.DefWindowProc (hwnd, (int)/*64*/msg, wParam, lParam);
}
/**
@@ -1162,9 +1165,9 @@ boolean filterMessage (MSG msg) {
return false;
}
-Control findControl (int handle) {
+Control findControl (int /*long*/ handle) {
if (handle == 0) return null;
- int hwndOwner = 0;
+ int /*long*/ hwndOwner = 0;
do {
Control control = getControl (handle);
if (control != null) return control;
@@ -1192,7 +1195,7 @@ Control findControl (int handle) {
* <li>ERROR_DEVICE_DISPOSED - if the receiver has been disposed</li>
* </ul>
*/
-public Widget findWidget (int handle) {
+public Widget findWidget (int /*long*/ handle) {
checkDevice ();
return getControl (handle);
}
@@ -1219,8 +1222,9 @@ public Widget findWidget (int handle) {
*
* @since 3.1
*/
-public Widget findWidget (int handle, int id) {
+public Widget findWidget (int /*long*/ handle, int /*long*/ id) {
checkDevice ();
+ //TODO - should ids be long
Control control = getControl (handle);
return control != null ? control.findItem (id) : null;
}
@@ -1242,15 +1246,16 @@ public Widget findWidget (int handle, int id) {
*
* @since 3.3
*/
-public Widget findWidget (Widget widget, int id) {
+public Widget findWidget (Widget widget, int /*long*/ id) {
checkDevice ();
+ //TODO - should ids be long
if (widget instanceof Control) {
return findWidget (((Control) widget).handle, id);
}
return null;
}
-int foregroundIdleProc (int code, int wParam, int lParam) {
+int /*long*/ foregroundIdleProc (int /*long*/ code, int /*long*/ wParam, int /*long*/ lParam) {
if (runMessages) {
if (code >= 0) {
if (getMessageCount () != 0) {
@@ -1261,7 +1266,7 @@ int foregroundIdleProc (int code, int wParam, int lParam) {
}
}
}
- return OS.CallNextHookEx (idleHook, code, wParam, lParam);
+ return OS.CallNextHookEx (idleHook, (int)/*64*/code, wParam, lParam);
}
/**
@@ -1337,7 +1342,7 @@ public static synchronized Display getCurrent () {
return findDisplay (Thread.currentThread ());
}
-int getClickCount (int type, int button, int hwnd, int lParam) {
+int getClickCount (int type, int button, int /*long*/ hwnd, int /*long*/ lParam) {
switch (type) {
case SWT.MouseDown:
int doubleClick = OS.GetDoubleClickTime ();
@@ -1395,7 +1400,7 @@ public Rectangle getClientArea () {
return new Rectangle (x, y, width, height);
}
-Control getControl (int handle) {
+Control getControl (int /*long*/ handle) {
if (handle == 0) return null;
if (lastControl != null && lastHwnd == handle) {
return lastControl;
@@ -1405,9 +1410,9 @@ Control getControl (int handle) {
}
int index;
if (USE_PROPERTY) {
- index = OS.GetProp (handle, SWT_OBJECT_INDEX) - 1;
+ index = (int)/*64*/OS.GetProp (handle, SWT_OBJECT_INDEX) - 1;
} else {
- index = OS.GetWindowLong (handle, OS.GWL_USERDATA) - 1;
+ index = (int)/*64*/OS.GetWindowLongPtr (handle, OS.GWLP_USERDATA) - 1;
}
if (0 <= index && index < controlTable.length) {
Control control = controlTable [index];
@@ -1693,7 +1698,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 [] phkResult = new int [1];
+ int /*long*/ [] phkResult = new int /*long*/ [1];
int result = OS.RegOpenKeyEx (OS.HKEY_CURRENT_USER, buffer1, 0, OS.KEY_READ, phkResult);
if (result != 0) return 4;
int depth = 4;
@@ -1861,9 +1866,10 @@ int getLastEventTime () {
return OS.IsWinCE ? OS.GetTickCount () : OS.GetMessageTime ();
}
-MenuItem getMenuItem (int id) {
+//TODO - should ids be long
+MenuItem getMenuItem (int /*long*/ _id) {
if (items == null) return null;
- id = id - ID_START;
+ int id = (int)/*64*/_id - ID_START;
if (0 <= id && id < items.length) return items [id];
return null;
}
@@ -1902,7 +1908,7 @@ public Monitor [] getMonitors () {
}
monitors = new Monitor [4];
Callback callback = new Callback (this, "monitorEnumProc", 4); //$NON-NLS-1$
- int lpfnEnum = callback.getAddress ();
+ int /*long*/ lpfnEnum = callback.getAddress ();
if (lpfnEnum == 0) SWT.error (SWT.ERROR_NO_MORE_CALLBACKS);
OS.EnumDisplayMonitors (0, null, lpfnEnum, 0);
callback.dispose ();
@@ -1913,9 +1919,9 @@ public Monitor [] getMonitors () {
return result;
}
-int getMsgProc (int code, int wParam, int lParam) {
+int /*long*/ getMsgProc (int /*long*/ code, int /*long*/ wParam, int /*long*/ lParam) {
if (embeddedHwnd == 0) {
- int hInstance = OS.GetModuleHandle (null);
+ int /*long*/ hInstance = OS.GetModuleHandle (null);
embeddedHwnd = OS.CreateWindowEx (0,
windowClass,
null,
@@ -1928,7 +1934,7 @@ int getMsgProc (int code, int wParam, int lParam) {
embeddedCallback = new Callback (this, "embeddedProc", 4); //$NON-NLS-1$
embeddedProc = embeddedCallback.getAddress ();
if (embeddedProc == 0) error (SWT.ERROR_NO_MORE_CALLBACKS);
- OS.SetWindowLong (embeddedHwnd, OS.GWL_WNDPROC, embeddedProc);
+ OS.SetWindowLongPtr (embeddedHwnd, OS.GWLP_WNDPROC, embeddedProc);
}
if (code >= 0 && wParam != OS.PM_NOREMOVE) {
MSG msg = new MSG ();
@@ -1940,8 +1946,8 @@ int getMsgProc (int code, int wParam, int lParam) {
case OS.WM_SYSKEYUP: {
Control control = findControl (msg.hwnd);
if (control != null) {
- int hHeap = OS.GetProcessHeap ();
- int keyMsg = OS.HeapAlloc (hHeap, OS.HEAP_ZERO_MEMORY, MSG.sizeof);
+ int /*long*/ hHeap = OS.GetProcessHeap ();
+ int /*long*/ keyMsg = OS.HeapAlloc (hHeap, OS.HEAP_ZERO_MEMORY, MSG.sizeof);
OS.MoveMemory (keyMsg, msg, MSG.sizeof);
OS.PostMessage (hwndMessage, SWT_KEYMSG, wParam, keyMsg);
msg.message = OS.WM_NULL;
@@ -1950,7 +1956,7 @@ int getMsgProc (int code, int wParam, int lParam) {
}
}
}
- return OS.CallNextHookEx (msgHook, code, wParam, lParam);
+ return OS.CallNextHookEx (msgHook, (int)/*64*/code, wParam, lParam);
}
/**
@@ -1978,7 +1984,7 @@ public Monitor getPrimaryMonitor () {
}
monitors = new Monitor [4];
Callback callback = new Callback (this, "monitorEnumProc", 4); //$NON-NLS-1$
- int lpfnEnum = callback.getAddress ();
+ int /*long*/ lpfnEnum = callback.getAddress ();
if (lpfnEnum == 0) SWT.error (SWT.ERROR_NO_MORE_CALLBACKS);
OS.EnumDisplayMonitors (0, null, lpfnEnum, 0);
callback.dispose ();
@@ -2234,7 +2240,7 @@ public Cursor getSystemCursor (int id) {
public Font getSystemFont () {
checkDevice ();
if (systemFont != null) return systemFont;
- int hFont = 0;
+ int /*long*/ hFont = 0;
if (!OS.IsWinCE) {
NONCLIENTMETRICS info = OS.IsUnicode ? (NONCLIENTMETRICS) new NONCLIENTMETRICSW () : new NONCLIENTMETRICSA ();
info.cbSize = NONCLIENTMETRICS.sizeof;
@@ -2280,23 +2286,23 @@ public Image getSystemImage (int id) {
switch (id) {
case SWT.ICON_ERROR: {
if (errorImage != null) return errorImage;
- int hIcon = OS.LoadImage (0, OS.OIC_HAND, OS.IMAGE_ICON, 0, 0, OS.LR_SHARED);
+ int /*long*/ 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 hIcon = OS.LoadImage (0, OS.OIC_INFORMATION, OS.IMAGE_ICON, 0, 0, OS.LR_SHARED);
+ int /*long*/ 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 hIcon = OS.LoadImage (0, OS.OIC_QUES, OS.IMAGE_ICON, 0, 0, OS.LR_SHARED);
+ int /*long*/ 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 hIcon = OS.LoadImage (0, OS.OIC_BANG, OS.IMAGE_ICON, 0, 0, OS.LR_SHARED);
+ int /*long*/ hIcon = OS.LoadImage (0, OS.OIC_BANG, OS.IMAGE_ICON, 0, 0, OS.LR_SHARED);
return warningIcon = Image.win32_new (this, SWT.ICON, hIcon);
}
}
@@ -2336,27 +2342,27 @@ public Thread getThread () {
return thread;
}
-int hButtonTheme () {
+int /*long*/ hButtonTheme () {
if (hButtonTheme != 0) return hButtonTheme;
return hButtonTheme = OS.OpenThemeData (hwndMessage, BUTTON);
}
-int hEditTheme () {
+int /*long*/ hEditTheme () {
if (hEditTheme != 0) return hEditTheme;
return hEditTheme = OS.OpenThemeData (hwndMessage, EDIT);
}
-int hExplorerBarTheme () {
+int /*long*/ hExplorerBarTheme () {
if (hExplorerBarTheme != 0) return hExplorerBarTheme;
return hExplorerBarTheme = OS.OpenThemeData (hwndMessage, EXPLORERBAR);
}
-int hScrollBarTheme () {
+int /*long*/ hScrollBarTheme () {
if (hScrollBarTheme != 0) return hScrollBarTheme;
return hScrollBarTheme = OS.OpenThemeData (hwndMessage, SCROLLBAR);
}
-int hTabTheme () {
+int /*long*/ hTabTheme () {
if (hTabTheme != 0) return hTabTheme;
return hTabTheme = OS.OpenThemeData (hwndMessage, TAB);
}
@@ -2381,9 +2387,9 @@ int hTabTheme () {
* <li>ERROR_NO_HANDLES if a handle could not be obtained for gc creation</li>
* </ul>
*/
-public int internal_new_GC (GCData data) {
+public int /*long*/ internal_new_GC (GCData data) {
if (isDisposed()) SWT.error(SWT.ERROR_DEVICE_DISPOSED);
- int hDC = OS.GetDC (0);
+ int /*long*/ hDC = OS.GetDC (0);
if (hDC == 0) SWT.error (SWT.ERROR_NO_HANDLES);
if (data != null) {
int mask = SWT.LEFT_TO_RIGHT | SWT.RIGHT_TO_LEFT;
@@ -2424,8 +2430,8 @@ protected void init () {
WindowClassCount++;
/* Register the SWT window class */
- int hHeap = OS.GetProcessHeap ();
- int hInstance = OS.GetModuleHandle (null);
+ int /*long*/ hHeap = OS.GetProcessHeap ();
+ int /*long*/ hInstance = OS.GetModuleHandle (null);
WNDCLASS lpWndClass = new WNDCLASS ();
lpWndClass.hInstance = hInstance;
lpWndClass.lpfnWndProc = windowProc;
@@ -2458,7 +2464,7 @@ protected void init () {
messageCallback = new Callback (this, "messageProc", 4); //$NON-NLS-1$
messageProc = messageCallback.getAddress ();
if (messageProc == 0) error (SWT.ERROR_NO_MORE_CALLBACKS);
- OS.SetWindowLong (hwndMessage, OS.GWL_WNDPROC, messageProc);
+ OS.SetWindowLongPtr (hwndMessage, OS.GWLP_WNDPROC, messageProc);
/* Create the filter hook */
if (!OS.IsWinCE) {
@@ -2508,7 +2514,7 @@ protected void init () {
* @param hDC the platform specific GC handle
* @param data the platform specific GC data
*/
-public void internal_dispose_GC (int hDC, GCData data) {
+public void internal_dispose_GC (int /*long*/ hDC, GCData data) {
OS.ReleaseDC (0, hDC);
}
@@ -2518,7 +2524,7 @@ boolean isXMouseActive () {
*/
boolean xMouseActive = false;
TCHAR key = new TCHAR (0, "Control Panel\\Desktop", true); //$NON-NLS-1$
- int [] phKey = new int [1];
+ int /*long*/ [] phKey = new int /*long*/ [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$
@@ -2617,8 +2623,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 hwndFrom = from != null ? from.handle : 0;
- int hwndTo = to != null ? to.handle : 0;
+ int /*long*/ hwndFrom = from != null ? from.handle : 0;
+ int /*long*/ hwndTo = to != null ? to.handle : 0;
POINT point = new POINT ();
point.x = x;
point.y = y;
@@ -2711,8 +2717,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 hwndFrom = from != null ? from.handle : 0;
- int hwndTo = to != null ? to.handle : 0;
+ int /*long*/ hwndFrom = from != null ? from.handle : 0;
+ int /*long*/ hwndTo = to != null ? to.handle : 0;
RECT rect = new RECT ();
rect.left = x;
rect.top = y;
@@ -2763,8 +2769,8 @@ static char mbcsToWcs (int ch, int codePage) {
return unicode [0];
}
-int messageProc (int hwnd, int msg, int wParam, int lParam) {
- switch (msg) {
+int /*long*/ messageProc (int /*long*/ hwnd, int /*long*/ msg, int /*long*/ wParam, int /*long*/ lParam) {
+ switch ((int)/*64*/msg) {
case SWT_RUNASYNC: {
if (runMessagesInIdle) runAsyncMessages (false);
break;
@@ -2789,7 +2795,7 @@ int messageProc (int hwnd, int msg, int wParam, int lParam) {
case OS.WM_KEYDOWN:
case OS.WM_SYSKEYDOWN: {
if (!OS.IsWinCE) {
- switch (keyMsg.wParam) {
+ switch ((int)/*64*/keyMsg.wParam) {
case OS.VK_SHIFT:
case OS.VK_MENU:
case OS.VK_CONTROL:
@@ -2803,7 +2809,7 @@ int messageProc (int hwnd, int msg, int wParam, int lParam) {
* Windows NT is bit 32 while the high bit on Windows 95 is bit 16.
* They should both be bit 32. The fix is to test the right bit.
*/
- int mapKey = OS.MapVirtualKey (keyMsg.wParam, 2);
+ int mapKey = OS.MapVirtualKey ((int)/*64*/keyMsg.wParam, 2);
if (mapKey != 0) {
accentKey = (mapKey & (OS.IsWinNT ? 0x80000000 : 0x8000)) != 0;
if (!accentKey) {
@@ -2841,7 +2847,7 @@ int messageProc (int hwnd, int msg, int wParam, int lParam) {
switch (keyMsg.message) {
case OS.WM_KEYDOWN:
case OS.WM_SYSKEYDOWN: {
- switch (keyMsg.wParam) {
+ switch ((int)/*64*/keyMsg.wParam) {
case OS.VK_SHIFT:
case OS.VK_MENU:
case OS.VK_CONTROL:
@@ -2858,7 +2864,7 @@ int messageProc (int hwnd, int msg, int wParam, int lParam) {
}
}
if (consumed) {
- int hHeap = OS.GetProcessHeap ();
+ int /*long*/ hHeap = OS.GetProcessHeap ();
OS.HeapFree (hHeap, 0, lParam);
} else {
OS.PostMessage (embeddedHwnd, SWT_KEYMSG, wParam, lParam);
@@ -2871,7 +2877,7 @@ int messageProc (int hwnd, int msg, int wParam, int lParam) {
for (int i=0; i<items.length; i++) {
TrayItem item = items [i];
if (item != null && item.id == wParam) {
- return item.messageProc (hwnd, msg, wParam, lParam);
+ return item.messageProc (hwnd, (int)/*64*/msg, wParam, lParam);
}
}
}
@@ -2902,12 +2908,12 @@ int messageProc (int hwnd, int msg, int wParam, int lParam) {
if (modalDialogShell != null && modalDialogShell.isDisposed ()) modalDialogShell = null;
Shell modal = modalDialogShell != null ? modalDialogShell : getModalShell ();
if (modal != null) {
- int hwndModal = modal.handle;
+ int /*long*/ hwndModal = modal.handle;
if (OS.IsWindowEnabled (hwndModal)) {
modal.bringToTop ();
if (modal.isDisposed ()) break;
}
- int hwndPopup = OS.GetLastActivePopup (hwndModal);
+ int /*long*/ hwndPopup = OS.GetLastActivePopup (hwndModal);
if (hwndPopup != 0 && hwndPopup != modal.handle) {
if (getControl (hwndPopup) == null) {
if (OS.IsWindowEnabled (hwndPopup)) {
@@ -2939,7 +2945,7 @@ int messageProc (int hwnd, int msg, int wParam, int lParam) {
break;
}
case OS.WM_SETTINGCHANGE: {
- switch (wParam) {
+ switch ((int)/*64*/wParam) {
case 0:
case 1:
case OS.SPI_SETHIGHCONTRAST:
@@ -2968,7 +2974,7 @@ int messageProc (int hwnd, int msg, int wParam, int lParam) {
break;
}
default: {
- if (msg == SWT_TASKBARCREATED) {
+ if ((int)/*64*/msg == SWT_TASKBARCREATED) {
if (tray != null) {
TrayItem [] items = tray.items;
for (int i=0; i<items.length; i++) {
@@ -2979,10 +2985,10 @@ int messageProc (int hwnd, int msg, int wParam, int lParam) {
}
}
}
- return OS.DefWindowProc (hwnd, msg, wParam, lParam);
+ return OS.DefWindowProc (hwnd, (int)/*64*/msg, wParam, lParam);
}
-int monitorEnumProc (int hmonitor, int hdc, int lprcMonitor, int dwData) {
+int /*long*/ monitorEnumProc (int /*long*/ hmonitor, int /*long*/ hdc, int /*long*/ lprcMonitor, int /*long*/ dwData) {
if (monitorCount >= monitors.length) {
Monitor[] newMonitors = new Monitor [monitors.length + 4];
System.arraycopy (monitors, 0, newMonitors, 0, monitors.length);
@@ -3005,8 +3011,8 @@ int monitorEnumProc (int hmonitor, int hdc, int lprcMonitor, int dwData) {
return 1;
}
-int msgFilterProc (int code, int wParam, int lParam) {
- switch (code) {
+int /*long*/ msgFilterProc (int /*long*/ code, int /*long*/ wParam, int /*long*/ lParam) {
+ switch ((int)/*64*/code) {
case OS.MSGF_COMMCTRL_BEGINDRAG: {
if (!runDragDrop) {
OS.MoveMemory (hookMsg, lParam, MSG.sizeof);
@@ -3044,7 +3050,7 @@ int msgFilterProc (int code, int wParam, int lParam) {
break;
}
}
- return OS.CallNextHookEx (filterHook, code, wParam, lParam);
+ return OS.CallNextHookEx (filterHook, (int)/*64*/code, wParam, lParam);
}
int numpadKey (int key) {
@@ -3157,10 +3163,11 @@ public boolean post (Event event) {
}
}
inputs.dwFlags = type == SWT.KeyUp ? OS.KEYEVENTF_KEYUP : 0;
- int hHeap = OS.GetProcessHeap ();
- int pInputs = OS.HeapAlloc (hHeap, OS.HEAP_ZERO_MEMORY, INPUT.sizeof);
+ int /*long*/ hHeap = OS.GetProcessHeap ();
+ int /*long*/ pInputs = OS.HeapAlloc (hHeap, OS.HEAP_ZERO_MEMORY, INPUT.sizeof);
OS.MoveMemory(pInputs, new int[] {OS.INPUT_KEYBOARD}, 4);
- OS.MoveMemory (pInputs + 4, inputs, KEYBDINPUT.sizeof);
+ //TODO - DWORD type of INPUT structure aligned to 8 bytes on 64 bit
+ OS.MoveMemory (pInputs + OS.PTR_SIZEOF, inputs, KEYBDINPUT.sizeof);
boolean result = OS.SendInput (1, pInputs, INPUT.sizeof) != 0;
OS.HeapFree (hHeap, 0, pInputs);
return result;
@@ -3221,10 +3228,11 @@ public boolean post (Event event) {
}
}
}
- int hHeap = OS.GetProcessHeap ();
- int pInputs = OS.HeapAlloc (hHeap, OS.HEAP_ZERO_MEMORY, INPUT.sizeof);
+ int /*long*/ hHeap = OS.GetProcessHeap ();
+ int /*long*/ pInputs = OS.HeapAlloc (hHeap, OS.HEAP_ZERO_MEMORY, INPUT.sizeof);
OS.MoveMemory(pInputs, new int[] {OS.INPUT_MOUSE}, 4);
- OS.MoveMemory (pInputs + 4, inputs, MOUSEINPUT.sizeof);
+ //TODO - DWORD type of INPUT structure aligned to 8 bytes on 64 bit
+ OS.MoveMemory (pInputs + OS.PTR_SIZEOF, inputs, MOUSEINPUT.sizeof);
boolean result = OS.SendInput (1, pInputs, INPUT.sizeof) != 0;
OS.HeapFree (hHeap, 0, pInputs);
return result;
@@ -3401,8 +3409,8 @@ void releaseDisplay () {
messageProc = 0;
/* Unregister the SWT window class */
- int hHeap = OS.GetProcessHeap ();
- int hInstance = OS.GetModuleHandle (null);
+ int /*long*/ hHeap = OS.GetProcessHeap ();
+ int /*long*/ hInstance = OS.GetModuleHandle (null);
OS.UnregisterClass (windowClass, hInstance);
/* Unregister the SWT drop shadow window class */
@@ -3617,15 +3625,15 @@ void removeBar (Menu menu) {
}
}
-Control removeControl (int handle) {
+Control removeControl (int /*long*/ handle) {
if (handle == 0) return null;
lastControl = lastGetControl = null;
Control control = null;
int index;
if (USE_PROPERTY) {
- index = OS.RemoveProp (handle, SWT_OBJECT_INDEX) - 1;
+ index = (int)/*64*/OS.RemoveProp (handle, SWT_OBJECT_INDEX) - 1;
} else {
- index = OS.GetWindowLong (handle, OS.GWL_USERDATA) - 1;
+ index = (int)/*64*/OS.GetWindowLongPtr (handle, OS.GWLP_USERDATA) - 1;
}
if (0 <= index && index < controlTable.length) {
control = controlTable [index];
@@ -3633,7 +3641,7 @@ Control removeControl (int handle) {
indexTable [index] = freeSlot;
freeSlot = index;
if (!USE_PROPERTY) {
- OS.SetWindowLong (handle, OS.GWL_USERDATA, 0);
+ OS.SetWindowLongPtr (handle, OS.GWLP_USERDATA, 0);
}
}
return control;
@@ -3732,7 +3740,7 @@ void runSettings () {
}
}
-boolean runTimer (int id) {
+boolean runTimer (int /*long*/ id) {
if (timerList != null && timerIds != null) {
int index = 0;
while (index <timerIds.length) {
@@ -4125,13 +4133,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 [4];
+ if (timerIds == null) timerIds = new int /*long*/ [4];
int index = 0;
while (index < timerList.length) {
if (timerList [index] == runnable) break;
index++;
}
- int timerId = 0;
+ int /*long*/ timerId = 0;
if (index != timerList.length) {
timerId = timerIds [index];
if (milliseconds < 0) {
@@ -4152,12 +4160,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 [] newTimerIds = new int [timerIds.length + 4];
+ int /*long*/ [] newTimerIds = new int /*long*/ [timerIds.length + 4];
System.arraycopy (timerIds, 0, newTimerIds, 0, timerIds.length);
timerIds = newTimerIds;
}
}
- int newTimerID = OS.SetTimer (hwndMessage, timerId, milliseconds, 0);
+ int /*long*/ newTimerID = OS.SetTimer (hwndMessage, timerId, milliseconds, 0);
if (newTimerID != 0) {
timerList [index] = runnable;
timerIds [index] = newTimerID;
@@ -4190,7 +4198,7 @@ boolean translateMnemonic (MSG msg, Control control) {
boolean translateTraversal (MSG msg, Control control) {
switch (msg.message) {
case OS.WM_KEYDOWN:
- switch (msg.wParam) {
+ switch ((int)/*64*/msg.wParam) {
case OS.VK_RETURN:
case OS.VK_ESCAPE:
case OS.VK_TAB:
@@ -4204,7 +4212,7 @@ boolean translateTraversal (MSG msg, Control control) {
}
break;
case OS.WM_SYSKEYDOWN:
- switch (msg.wParam) {
+ switch ((int)/*64*/msg.wParam) {
case OS.VK_MENU:
return control.translateTraversal (msg);
}
@@ -4325,7 +4333,7 @@ static int wcsToMbcs (char ch) {
return wcsToMbcs (ch, 0);
}
-int windowProc (int hwnd, int msg, int wParam, int lParam) {
+int /*long*/ windowProc (int /*long*/ hwnd, int /*long*/ msg, int /*long*/ wParam, int /*long*/ lParam) {
/*
* Bug in Adobe Reader 7.0. For some reason, when Adobe
* Reader 7.0 is deactivated from within Internet Explorer,
@@ -4339,7 +4347,7 @@ int windowProc (int hwnd, int msg, int wParam, int lParam) {
* consecutive WM_NCHITTEST messages to the same control without
* another message (normally WM_SETCURSOR) in between.
*/
- if (msg == OS.WM_NCHITTEST) {
+ if ((int)/*64*/msg == OS.WM_NCHITTEST) {
if (hitCount++ >= 1024) {
try {Thread.sleep (1);} catch (Throwable t) {}
}
@@ -4347,23 +4355,23 @@ int windowProc (int hwnd, int msg, int wParam, int lParam) {
hitCount = 0;
}
if (lastControl != null && lastHwnd == hwnd) {
- return lastControl.windowProc (hwnd, msg, wParam, lParam);
+ return lastControl.windowProc (hwnd, (int)/*64*/msg, wParam, lParam);
}
int index;
if (USE_PROPERTY) {
- index = OS.GetProp (hwnd, SWT_OBJECT_INDEX) - 1;
+ index = (int)/*64*/OS.GetProp (hwnd, SWT_OBJECT_INDEX) - 1;
} else {
- index = OS.GetWindowLong (hwnd, OS.GWL_USERDATA) - 1;
+ index = (int)/*64*/OS.GetWindowLongPtr (hwnd, OS.GWLP_USERDATA) - 1;
}
if (0 <= index && index < controlTable.length) {
Control control = controlTable [index];
if (control != null) {
lastHwnd = hwnd;
lastControl = control;
- return control.windowProc (hwnd, msg, wParam, lParam);
+ return control.windowProc (hwnd, (int)/*64*/msg, wParam, lParam);
}
}
- return OS.DefWindowProc (hwnd, msg, wParam, lParam);
+ return OS.DefWindowProc (hwnd, (int)/*64*/msg, wParam, lParam);
}
static String withCrLf (String string) {
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 f0daea556f..e871c6bd45 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
@@ -45,7 +45,7 @@ public class ExpandBar extends Composite {
ExpandItem focusItem;
int spacing = 4;
int yCurrentScroll;
- int hFont;
+ int /*long*/ hFont;
/**
@@ -106,7 +106,7 @@ public void addExpandListener (ExpandListener listener) {
addListener (SWT.Collapse, typedListener);
}
-int callWindowProc (int hwnd, int msg, int wParam, int lParam) {
+int /*long*/ callWindowProc (int /*long*/ hwnd, int msg, int /*long*/ wParam, int /*long*/ lParam) {
if (handle == 0) return 0;
return OS.DefWindowProc (hwnd, msg, wParam, lParam);
}
@@ -125,12 +125,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 hDC = OS.GetDC (handle);
- int hTheme = 0;
+ int /*long*/ hDC = OS.GetDC (handle);
+ int /*long*/ hTheme = 0;
if (isAppThemed ()) {
hTheme = display.hExplorerBarTheme ();
}
- int hCurrentFont = 0, oldFont = 0;
+ int /*long*/ hCurrentFont = 0, oldFont = 0;
if (hTheme == 0) {
if (hFont != 0) {
hCurrentFont = hFont;
@@ -232,7 +232,7 @@ void destroyItem (ExpandItem item) {
layoutItems (index, true);
}
-void drawThemeBackground (int hDC, int hwnd, RECT rect) {
+void drawThemeBackground (int /*long*/ hDC, int /*long*/ hwnd, RECT rect) {
RECT rect2 = new RECT ();
OS.GetClientRect (handle, rect2);
OS.MapWindowPoints (handle, hwnd, rect2, 2);
@@ -240,7 +240,7 @@ void drawThemeBackground (int hDC, int hwnd, RECT rect) {
}
void drawWidget (GC gc, RECT clipRect) {
- int hTheme = 0;
+ int /*long*/ hTheme = 0;
if (isAppThemed ()) {
hTheme = display.hExplorerBarTheme ();
}
@@ -253,10 +253,10 @@ void drawWidget (GC gc, RECT clipRect) {
}
boolean drawFocus = false;
if (handle == OS.GetFocus ()) {
- int uiState = OS.SendMessage (handle, OS.WM_QUERYUISTATE, 0, 0);
+ int uiState = (int)/*64*/OS.SendMessage (handle, OS.WM_QUERYUISTATE, 0, 0);
drawFocus = (uiState & OS.UISF_HIDEFOCUS) == 0;
}
- int hCaptionFont = 0, oldFont = 0;
+ int /*long*/ hCaptionFont = 0, oldFont = 0;
if (hTheme == 0) {
if (!OS.IsWinCE && hFont == 0) {
NONCLIENTMETRICS info = OS.IsUnicode ? (NONCLIENTMETRICS) new NONCLIENTMETRICSW () : new NONCLIENTMETRICSA ();
@@ -292,8 +292,8 @@ Control findThemeControl () {
int getBandHeight () {
if (hFont == 0) return ExpandItem.CHEVRON_SIZE;
- int hDC = OS.GetDC (handle);
- int oldHFont = OS.SelectObject (hDC, hFont);
+ int /*long*/ hDC = OS.GetDC (handle);
+ int /*long*/ oldHFont = OS.SelectObject (hDC, hFont);
TEXTMETRIC lptm = OS.IsUnicode ? (TEXTMETRIC)new TEXTMETRICW() : new TEXTMETRICA();
OS.GetTextMetrics (hDC, lptm);
OS.SelectObject (hDC, oldHFont);
@@ -555,15 +555,15 @@ TCHAR windowClass () {
return display.windowClass;
}
-int windowProc () {
+int /*long*/ windowProc () {
return display.windowProc;
}
-LRESULT WM_KEYDOWN (int wParam, int lParam) {
+LRESULT WM_KEYDOWN (int /*long*/ wParam, int /*long*/ lParam) {
LRESULT result = super.WM_KEYDOWN (wParam, lParam);
if (result != null) return result;
if (focusItem == null) return result;
- switch (wParam) {
+ switch ((int)/*64*/wParam) {
case OS.VK_SPACE:
case OS.VK_RETURN:
Event event = new Event ();
@@ -596,13 +596,13 @@ LRESULT WM_KEYDOWN (int wParam, int lParam) {
return result;
}
-LRESULT WM_KILLFOCUS (int wParam, int lParam) {
+LRESULT WM_KILLFOCUS (int /*long*/ wParam, int /*long*/ lParam) {
LRESULT result = super.WM_KILLFOCUS (wParam, lParam);
if (focusItem != null) focusItem.redraw (true);
return result;
}
-LRESULT WM_LBUTTONDOWN (int wParam, int lParam) {
+LRESULT WM_LBUTTONDOWN (int /*long*/ wParam, int /*long*/ lParam) {
LRESULT result = super.WM_LBUTTONDOWN (wParam, lParam);
if (result == LRESULT.ZERO) return result;
int x = OS.GET_X_LPARAM (lParam);
@@ -621,7 +621,7 @@ LRESULT WM_LBUTTONDOWN (int wParam, int lParam) {
return result;
}
-LRESULT WM_LBUTTONUP (int wParam, int lParam) {
+LRESULT WM_LBUTTONUP (int /*long*/ wParam, int /*long*/ lParam) {
LRESULT result = super.WM_LBUTTONUP (wParam, lParam);
if (result == LRESULT.ZERO) return result;
if (focusItem == null) return result;
@@ -652,7 +652,7 @@ LRESULT WM_MOUSELEAVE (int wParam, int lParam) {
return result;
}
-LRESULT WM_MOUSEMOVE (int wParam, int lParam) {
+LRESULT WM_MOUSEMOVE (int /*long*/ wParam, int /*long*/ lParam) {
LRESULT result = super.WM_MOUSEMOVE (wParam, lParam);
if (result == LRESULT.ZERO) return result;
int x = OS.GET_X_LPARAM (lParam);
@@ -668,7 +668,7 @@ LRESULT WM_MOUSEMOVE (int wParam, int lParam) {
return result;
}
-LRESULT WM_PAINT (int wParam, int lParam) {
+LRESULT WM_PAINT (int /*long*/ wParam, int /*long*/ lParam) {
PAINTSTRUCT ps = new PAINTSTRUCT ();
GCData data = new GCData ();
data.ps = ps;
@@ -697,7 +697,7 @@ LRESULT WM_PAINT (int wParam, int lParam) {
return LRESULT.ZERO;
}
-LRESULT WM_PRINTCLIENT (int wParam, int lParam) {
+LRESULT WM_PRINTCLIENT (int /*long*/ wParam, int /*long*/ lParam) {
LRESULT result = super.WM_PRINTCLIENT (wParam, lParam);
RECT rect = new RECT ();
OS.GetClientRect (handle, rect);
@@ -710,7 +710,7 @@ LRESULT WM_PRINTCLIENT (int wParam, int lParam) {
return result;
}
-LRESULT WM_SETCURSOR (int wParam, int lParam) {
+LRESULT WM_SETCURSOR (int /*long*/ wParam, int /*long*/ lParam) {
LRESULT result = super.WM_SETCURSOR (wParam, lParam);
if (result != null) return result;
int hitTest = (short) OS.LOWORD (lParam);
@@ -718,7 +718,7 @@ LRESULT WM_SETCURSOR (int wParam, int lParam) {
for (int i = 0; i < itemCount; i++) {
ExpandItem item = items [i];
if (item.hover) {
- int hCursor = OS.LoadCursor (0, OS.IDC_HAND);
+ int /*long*/ hCursor = OS.LoadCursor (0, OS.IDC_HAND);
OS.SetCursor (hCursor);
return LRESULT.ONE;
}
@@ -727,13 +727,13 @@ LRESULT WM_SETCURSOR (int wParam, int lParam) {
return result;
}
-LRESULT WM_SETFOCUS (int wParam, int lParam) {
+LRESULT WM_SETFOCUS (int /*long*/ wParam, int /*long*/ lParam) {
LRESULT result = super.WM_SETFOCUS (wParam, lParam);
if (focusItem != null) focusItem.redraw (true);
return result;
}
-LRESULT WM_SIZE (int wParam, int lParam) {
+LRESULT WM_SIZE (int /*long*/ wParam, int /*long*/ lParam) {
LRESULT result = super.WM_SIZE (wParam, lParam);
RECT rect = new RECT ();
OS.GetClientRect (handle, rect);
@@ -747,7 +747,7 @@ LRESULT WM_SIZE (int wParam, int lParam) {
return result;
}
-LRESULT wmScroll (ScrollBar bar, boolean update, int hwnd, int msg, int wParam, int lParam) {
+LRESULT wmScroll (ScrollBar bar, boolean update, int /*long*/ hwnd, int msg, int /*long*/ wParam, int /*long*/ 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 75fcf1d5d4..bf156e1862 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
@@ -114,16 +114,16 @@ static ExpandBar checkNull (ExpandBar control) {
return control;
}
-private void drawChevron (int hDC, RECT rect) {
- int oldBrush = OS.SelectObject (hDC, OS.GetSysColorBrush (OS.COLOR_BTNFACE));
+private void drawChevron (int /*long*/ hDC, RECT rect) {
+ int /*long*/ 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 hPen = OS.CreatePen (OS.PS_SOLID, 1, parent.foreground);
- int oldPen = OS.SelectObject (hDC, hPen);
+ int /*long*/ hPen = OS.CreatePen (OS.PS_SOLID, 1, parent.foreground);
+ int /*long*/ oldPen = OS.SelectObject (hDC, hPen);
int [] polyline1, polyline2;
if (expanded) {
int px = rect.left + 5;
@@ -149,8 +149,8 @@ private void drawChevron (int hDC, RECT rect) {
OS.Polyline (hDC, polyline1, polyline1.length / 2);
OS.Polyline (hDC, polyline2, polyline2.length / 2);
if (hover) {
- int whitePen = OS.CreatePen (OS.PS_SOLID, 1, OS.GetSysColor (OS.COLOR_3DHILIGHT));
- int darkGrayPen = OS.CreatePen (OS.PS_SOLID, 1, OS.GetSysColor (OS.COLOR_3DSHADOW));
+ 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));
OS.SelectObject (hDC, whitePen);
int [] points1 = {
rect.left, rect.bottom,
@@ -172,15 +172,15 @@ private void drawChevron (int hDC, RECT rect) {
OS.DeleteObject (hPen);
}
-void drawItem (GC gc, int hTheme, RECT clipRect, boolean drawFocus) {
- int hDC = gc.handle;
+void drawItem (GC gc, int /*long*/ hTheme, RECT clipRect, boolean drawFocus) {
+ int /*long*/ 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 oldBrush = OS.SelectObject (hDC, OS.GetSysColorBrush (OS.COLOR_BTNFACE));
+ int /*long*/ 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);
}
@@ -221,8 +221,8 @@ void drawItem (GC gc, int hTheme, RECT clipRect, boolean drawFocus) {
}
if (expanded) {
if (!parent.isAppThemed ()) {
- int pen = OS.CreatePen (OS.PS_SOLID, 1, OS.GetSysColor (OS.COLOR_BTNFACE));
- int oldPen = OS.SelectObject (hDC, pen);
+ int /*long*/ pen = OS.CreatePen (OS.PS_SOLID, 1, OS.GetSysColor (OS.COLOR_BTNFACE));
+ int /*long*/ oldPen = OS.SelectObject (hDC, pen);
int [] points = {
x, y + headerHeight,
x, y + headerHeight + height,
@@ -317,7 +317,7 @@ public ExpandBar getParent () {
return parent;
}
-int getPreferredWidth (int hTheme, int hDC) {
+int getPreferredWidth (int /*long*/ hTheme, int /*long*/ hDC) {
int width = ExpandItem.TEXT_INSET * 2 + ExpandItem.CHEVRON_SIZE;
if (image != null) {
width += ExpandItem.TEXT_INSET + imageWidth;
@@ -341,7 +341,7 @@ boolean isHover (int x, int y) {
}
void redraw (boolean all) {
- int parentHandle = parent.handle;
+ int /*long*/ 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 2a265e7673..46560474f9 100755
--- 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
@@ -140,20 +140,20 @@ public String getFilterPath () {
return filterPath;
}
-int OFNHookProc (int hdlg, int uiMsg, int wParam, int lParam) {
- switch (uiMsg) {
+int OFNHookProc (int /*long*/ hdlg, int /*long*/ uiMsg, int /*long*/ wParam, int /*long*/ lParam) {
+ switch ((int)/*64*/uiMsg) {
case OS.WM_NOTIFY:
OFNOTIFY ofn = new OFNOTIFY ();
OS.MoveMemory (ofn, lParam, OFNOTIFY.sizeof);
if (ofn.code == OS.CDN_SELCHANGE) {
- int lResult = OS.SendMessage (ofn.hwndFrom, OS.CDM_GETSPEC, 0, 0);
+ int lResult = (int)/*64*/OS.SendMessage (ofn.hwndFrom, OS.CDM_GETSPEC, 0, 0);
if (lResult > 0) {
lResult += OS.MAX_PATH;
OPENFILENAME lpofn = new OPENFILENAME ();
OS.MoveMemory (lpofn, ofn.lpOFN, OPENFILENAME.sizeof);
if (lpofn.nMaxFile < lResult) {
- int hHeap = OS.GetProcessHeap ();
- int lpstrFile = OS.HeapAlloc (hHeap, OS.HEAP_ZERO_MEMORY, lResult * TCHAR.sizeof);
+ int /*long*/ hHeap = OS.GetProcessHeap ();
+ int /*long*/ 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;
@@ -181,10 +181,10 @@ int OFNHookProc (int hdlg, int uiMsg, int wParam, int lParam) {
* </ul>
*/
public String open () {
- int hHeap = OS.GetProcessHeap ();
+ int /*long*/ hHeap = OS.GetProcessHeap ();
/* Get the owner HWND for the dialog */
- int hwndOwner = 0;
+ int /*long*/ hwndOwner = 0;
if (parent != null) hwndOwner = parent.handle;
/* Convert the title and copy it into lpstrTitle */
@@ -192,7 +192,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 lpstrTitle = OS.HeapAlloc (hHeap, OS.HEAP_ZERO_MEMORY, byteCount3);
+ int /*long*/ lpstrTitle = OS.HeapAlloc (hHeap, OS.HEAP_ZERO_MEMORY, byteCount3);
OS.MoveMemory (lpstrTitle, buffer3, byteCount3);
/* Compute filters and copy into lpstrFilter */
@@ -210,7 +210,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 lpstrFilter = OS.HeapAlloc (hHeap, OS.HEAP_ZERO_MEMORY, byteCount4);
+ int /*long*/ lpstrFilter = OS.HeapAlloc (hHeap, OS.HEAP_ZERO_MEMORY, byteCount4);
OS.MoveMemory (lpstrFilter, buffer4, byteCount4);
/* Convert the fileName and filterName to C strings */
@@ -225,7 +225,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 lpstrFile = OS.HeapAlloc (hHeap, OS.HEAP_ZERO_MEMORY, byteCount);
+ int /*long*/ 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);
@@ -237,7 +237,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 lpstrInitialDir = OS.HeapAlloc (hHeap, OS.HEAP_ZERO_MEMORY, byteCount5);
+ int /*long*/ 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);
@@ -250,7 +250,7 @@ public String open () {
struct.Flags |= OS.OFN_ALLOWMULTISELECT | OS.OFN_EXPLORER;
if (!OS.IsWinCE && USE_HOOK) {
callback = new Callback (this, "OFNHookProc", 4); //$NON-NLS-1$
- int lpfnHook = callback.getAddress ();
+ int /*long*/ lpfnHook = callback.getAddress ();
if (lpfnHook == 0) SWT.error (SWT.ERROR_NO_MORE_CALLBACKS);
struct.lpfnHook = lpfnHook;
struct.Flags |= OS.OFN_ENABLEHOOK;
@@ -270,7 +270,7 @@ public String open () {
* empty, Windows uses the current value of the filter
* extension at the time that the dialog is closed.
*/
- int lpstrDefExt = 0;
+ int /*long*/ lpstrDefExt = 0;
boolean save = (style & SWT.SAVE) != 0;
if (save) {
lpstrDefExt = OS.HeapAlloc (hHeap, OS.HEAP_ZERO_MEMORY, TCHAR.sizeof);
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 50b5cdd8cc..982375c920 100755
--- 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
@@ -134,20 +134,20 @@ public FontData open () {
if (OS.IsWinCE) SWT.error (SWT.ERROR_NOT_IMPLEMENTED);
/* Get the owner HWND for the dialog */
- int hwndOwner = 0;
+ int /*long*/ hwndOwner = 0;
if (parent != null) hwndOwner = parent.handle;
/* Open the dialog */
- int hHeap = OS.GetProcessHeap ();
+ int /*long*/ hHeap = OS.GetProcessHeap ();
CHOOSEFONT lpcf = new CHOOSEFONT ();
lpcf.lStructSize = CHOOSEFONT.sizeof;
lpcf.hwndOwner = hwndOwner;
lpcf.Flags = OS.CF_SCREENFONTS | OS.CF_EFFECTS;
- int lpLogFont = OS.HeapAlloc (hHeap, OS.HEAP_ZERO_MEMORY, LOGFONT.sizeof);
+ int /*long*/ 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 hDC = OS.GetDC (0);
+ int /*long*/ hDC = OS.GetDC (0);
int pixels = -(int)(0.5f + (fontData.height * OS.GetDeviceCaps(hDC, OS.LOGPIXELSY) / 72));
OS.ReleaseDC (0, hDC);
logFont.lfHeight = pixels;
@@ -189,7 +189,7 @@ public FontData open () {
* This will not work on multiple screens or
* for printing. Should use DC for the proper device.
*/
- int hDC = OS.GetDC(0);
+ int /*long*/ hDC = OS.GetDC(0);
int logPixelsY = OS.GetDeviceCaps(hDC, OS.LOGPIXELSY);
int pixels = 0;
if (logFont.lfHeight > 0) {
@@ -201,8 +201,8 @@ public FontData open () {
* we must subtract the internal leading, which requires a TEXTMETRIC,
* which in turn requires font creation.
*/
- int hFont = OS.CreateFontIndirect(logFont);
- int oldFont = OS.SelectObject(hDC, hFont);
+ int /*long*/ hFont = OS.CreateFontIndirect(logFont);
+ int /*long*/ 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 e8f7d673c2..db98fd9ebb 100755
--- 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
@@ -39,7 +39,7 @@ import org.eclipse.swt.graphics.*;
public class Group extends Composite {
String text = "";
static final int CLIENT_INSET = 3;
- static final int GroupProc;
+ static final int /*long*/ GroupProc;
static final TCHAR GroupClass = new TCHAR (0, OS.IsWinCE ? "BUTTON" : "SWT_GROUP", true);
static {
/*
@@ -63,13 +63,13 @@ public class Group extends Composite {
TCHAR WC_BUTTON = new TCHAR (0, "BUTTON", true);
OS.GetClassInfo (0, WC_BUTTON, lpWndClass);
GroupProc = lpWndClass.lpfnWndProc;
- int hInstance = OS.GetModuleHandle (null);
+ int /*long*/ hInstance = OS.GetModuleHandle (null);
if (!OS.GetClassInfo (hInstance, GroupClass, lpWndClass)) {
- int hHeap = OS.GetProcessHeap ();
+ int /*long*/ hHeap = OS.GetProcessHeap ();
lpWndClass.hInstance = hInstance;
lpWndClass.style &= ~(OS.CS_HREDRAW | OS.CS_VREDRAW);
int byteCount = GroupClass.length () * TCHAR.sizeof;
- int lpszClassName = OS.HeapAlloc (hHeap, OS.HEAP_ZERO_MEMORY, byteCount);
+ int /*long*/ lpszClassName = OS.HeapAlloc (hHeap, OS.HEAP_ZERO_MEMORY, byteCount);
OS.MoveMemory (lpszClassName, GroupClass, byteCount);
lpWndClass.lpszClassName = lpszClassName;
OS.RegisterClass (lpWndClass);
@@ -114,7 +114,7 @@ public Group (Composite parent, int style) {
super (parent, checkStyle (style));
}
-int callWindowProc (int hwnd, int msg, int wParam, int lParam) {
+int /*long*/ callWindowProc (int /*long*/ hwnd, int msg, int /*long*/ wParam, int /*long*/ lParam) {
if (handle == 0) return 0;
/*
* Feature in Windows. When the user clicks on the group
@@ -168,8 +168,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 newFont, oldFont = 0;
- int hDC = OS.GetDC (handle);
+ int /*long*/ newFont, oldFont = 0;
+ int /*long*/ 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 ();
@@ -185,8 +185,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 newFont, oldFont = 0;
- int hDC = OS.GetDC (handle);
+ int /*long*/ newFont, oldFont = 0;
+ int /*long*/ 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 ();
@@ -227,8 +227,8 @@ public Rectangle getClientArea () {
forceResize ();
RECT rect = new RECT ();
OS.GetClientRect (handle, rect);
- int newFont, oldFont = 0;
- int hDC = OS.GetDC (handle);
+ int /*long*/ newFont, oldFont = 0;
+ int /*long*/ 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 ();
@@ -348,11 +348,11 @@ TCHAR windowClass () {
return GroupClass;
}
-int windowProc () {
+int /*long*/ windowProc () {
return GroupProc;
}
-LRESULT WM_ERASEBKGND (int wParam, int lParam) {
+LRESULT WM_ERASEBKGND (int /*long*/ wParam, int /*long*/ lParam) {
LRESULT result = super.WM_ERASEBKGND (wParam, lParam);
if (result != null) return result;
/*
@@ -364,7 +364,7 @@ LRESULT WM_ERASEBKGND (int wParam, int lParam) {
return LRESULT.ONE;
}
-LRESULT WM_NCHITTEST (int wParam, int lParam) {
+LRESULT WM_NCHITTEST (int /*long*/ wParam, int /*long*/ lParam) {
LRESULT result = super.WM_NCHITTEST (wParam, lParam);
if (result != null) return result;
/*
@@ -376,12 +376,12 @@ LRESULT WM_NCHITTEST (int wParam, int lParam) {
* allow children, answer HTCLIENT to allow mouse messages
* to be delivered to the children.
*/
- int code = callWindowProc (handle, OS.WM_NCHITTEST, wParam, lParam);
+ int /*long*/ code = callWindowProc (handle, OS.WM_NCHITTEST, wParam, lParam);
if (code == OS.HTTRANSPARENT) code = OS.HTCLIENT;
return new LRESULT (code);
}
-LRESULT WM_MOUSEMOVE (int wParam, int lParam) {
+LRESULT WM_MOUSEMOVE (int /*long*/ wParam, int /*long*/ lParam) {
LRESULT result = super.WM_MOUSEMOVE (wParam, lParam);
if (result != null) return result;
/*
@@ -393,7 +393,7 @@ LRESULT WM_MOUSEMOVE (int wParam, int lParam) {
return LRESULT.ZERO;
}
-LRESULT WM_PRINTCLIENT (int wParam, int lParam) {
+LRESULT WM_PRINTCLIENT (int /*long*/ wParam, int /*long*/ lParam) {
LRESULT result = super.WM_PRINTCLIENT (wParam, lParam);
if (result != null) return result;
/*
@@ -408,14 +408,14 @@ LRESULT WM_PRINTCLIENT (int wParam, int lParam) {
*/
if (OS.COMCTL32_MAJOR >= 6 && OS.IsAppThemed ()) {
int nSavedDC = OS.SaveDC (wParam);
- int code = callWindowProc (handle, OS.WM_PRINTCLIENT, wParam, lParam);
+ int /*long*/ code = callWindowProc (handle, OS.WM_PRINTCLIENT, wParam, lParam);
OS.RestoreDC (wParam, nSavedDC);
return new LRESULT (code);
}
return result;
}
-LRESULT WM_UPDATEUISTATE (int wParam, int lParam) {
+LRESULT WM_UPDATEUISTATE (int /*long*/ wParam, int /*long*/ lParam) {
LRESULT result = super.WM_UPDATEUISTATE (wParam, lParam);
if (result != null) return result;
/*
@@ -437,13 +437,13 @@ LRESULT WM_UPDATEUISTATE (int wParam, int lParam) {
}
if (redraw) {
OS.InvalidateRect (handle, null, false);
- int code = OS.DefWindowProc (handle, OS.WM_UPDATEUISTATE, wParam, lParam);
+ int /*long*/ code = OS.DefWindowProc (handle, OS.WM_UPDATEUISTATE, wParam, lParam);
return new LRESULT (code);
}
return result;
}
-LRESULT WM_WINDOWPOSCHANGING (int wParam, int lParam) {
+LRESULT WM_WINDOWPOSCHANGING (int /*long*/ wParam, int /*long*/ 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/Label.java b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Label.java
index 78a654c6d8..769727fbe2 100755
--- 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
@@ -42,7 +42,7 @@ public class Label extends Control {
Image image;
static final int MARGIN = 4;
static final boolean IMAGE_AND_TEXT = false;
- static final int LabelProc;
+ static final int /*long*/ LabelProc;
static final TCHAR LabelClass = new TCHAR (0, "STATIC", true);
static {
WNDCLASS lpWndClass = new WNDCLASS ();
@@ -91,7 +91,7 @@ public Label (Composite parent, int style) {
super (parent, checkStyle (style));
}
-int callWindowProc (int hwnd, int msg, int wParam, int lParam) {
+int /*long*/ callWindowProc (int /*long*/ hwnd, int msg, int /*long*/ wParam, int /*long*/ lParam) {
if (handle == 0) return 0;
return OS.CallWindowProc (LabelProc, hwnd, msg, wParam, lParam);
}
@@ -136,9 +136,9 @@ public Point computeSize (int wHint, int hHint, boolean changed) {
}
}
if (drawText) {
- int hDC = OS.GetDC (handle);
- int newFont = OS.SendMessage (handle, OS.WM_GETFONT, 0, 0);
- int oldFont = OS.SelectObject (hDC, newFont);
+ int /*long*/ hDC = OS.GetDC (handle);
+ int /*long*/ newFont = OS.SendMessage (handle, OS.WM_GETFONT, 0, 0);
+ int /*long*/ oldFont = OS.SelectObject (hDC, newFont);
int length = OS.GetWindowTextLength (handle);
if (length == 0) {
TEXTMETRIC tm = OS.IsUnicode ? (TEXTMETRIC) new TEXTMETRICW () : new TEXTMETRICA ();
@@ -425,11 +425,11 @@ TCHAR windowClass () {
return LabelClass;
}
-int windowProc () {
+int /*long*/ windowProc () {
return LabelProc;
}
-LRESULT WM_ERASEBKGND (int wParam, int lParam) {
+LRESULT WM_ERASEBKGND (int /*long*/ wParam, int /*long*/ lParam) {
LRESULT result = super.WM_ERASEBKGND (wParam, lParam);
if (result != null) return result;
int bits = OS.GetWindowLong (handle, OS.GWL_STYLE);
@@ -453,7 +453,7 @@ LRESULT WM_ERASEBKGND (int wParam, int lParam) {
return result;
}
-LRESULT WM_SIZE (int wParam, int lParam) {
+LRESULT WM_SIZE (int /*long*/ wParam, int /*long*/ lParam) {
LRESULT result = super.WM_SIZE (wParam, lParam);
if (isDisposed ()) return result;
if ((style & SWT.SEPARATOR) != 0) {
@@ -479,7 +479,7 @@ LRESULT WM_SIZE (int wParam, int lParam) {
return result;
}
-LRESULT WM_UPDATEUISTATE (int wParam, int lParam) {
+LRESULT WM_UPDATEUISTATE (int /*long*/ wParam, int /*long*/ lParam) {
LRESULT result = super.WM_UPDATEUISTATE (wParam, lParam);
/*
* Feature in Windows. When WM_UPDATEUISTATE is sent to
@@ -499,13 +499,13 @@ LRESULT WM_UPDATEUISTATE (int wParam, int lParam) {
}
if (redraw) {
OS.InvalidateRect (handle, null, false);
- int code = OS.DefWindowProc (handle, OS.WM_UPDATEUISTATE, wParam, lParam);
+ int /*long*/ code = OS.DefWindowProc (handle, OS.WM_UPDATEUISTATE, wParam, lParam);
return new LRESULT (code);
}
return result;
}
-LRESULT wmColorChild (int wParam, int lParam) {
+LRESULT wmColorChild (int /*long*/ wParam, int /*long*/ lParam) {
/*
* Bug in Windows. For some reason, the HBRUSH that
* is returned from WM_CTRLCOLOR is misaligned when
@@ -527,7 +527,7 @@ LRESULT wmColorChild (int wParam, int lParam) {
return result;
}
-LRESULT WM_PAINT (int wParam, int lParam) {
+LRESULT WM_PAINT (int /*long*/ wParam, int /*long*/ lParam) {
if (OS.IsWinCE) {
boolean drawImage = image != null;
boolean drawSeparator = (style & SWT.SEPARATOR) != 0 && (style & SWT.SHADOW_NONE) == 0;
@@ -591,7 +591,7 @@ LRESULT WM_PAINT (int wParam, int lParam) {
return super.WM_PAINT(wParam, lParam);
}
-LRESULT wmDrawChild (int wParam, int lParam) {
+LRESULT wmDrawChild (int /*long*/ wParam, int /*long*/ 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 9ed931e8cc..431c44d5ca 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
@@ -42,9 +42,9 @@ public class Link extends Control {
String [] ids;
int [] mnemonics;
int focusIndex, mouseDownIndex;
- int font;
+ int /*long*/ font;
static final RGB LINK_FOREGROUND = new RGB (0, 51, 153);
- static final int LinkProc;
+ static final int /*long*/ LinkProc;
static final TCHAR LinkClass = new TCHAR (0, OS.WC_LINK, true);
static {
if (OS.COMCTL32_MAJOR >= 6) {
@@ -119,7 +119,7 @@ public void addSelectionListener (SelectionListener listener) {
addListener (SWT.DefaultSelection, typedListener);
}
-int callWindowProc (int hwnd, int msg, int wParam, int lParam) {
+int /*long*/ callWindowProc (int /*long*/ hwnd, int msg, int /*long*/ wParam, int /*long*/ lParam) {
if (handle == 0) return 0;
if (LinkProc != 0) return OS.CallWindowProc (LinkProc, hwnd, msg, wParam, lParam);
return OS.DefWindowProc (hwnd, msg, wParam, lParam);
@@ -131,9 +131,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 hDC = OS.GetDC (handle);
- int newFont = OS.SendMessage (handle, OS.WM_GETFONT, 0, 0);
- int oldFont = OS.SelectObject (hDC, newFont);
+ int /*long*/ hDC = OS.GetDC (handle);
+ int /*long*/ newFont = OS.SendMessage (handle, OS.WM_GETFONT, 0, 0);
+ int /*long*/ oldFont = OS.SelectObject (hDC, newFont);
TCHAR buffer = new TCHAR (getCodePage (), parse (text), false);
RECT rect = new RECT ();
int flags = OS.DT_CALCRECT | OS.DT_NOPREFIX;
@@ -623,16 +623,16 @@ TCHAR windowClass () {
return OS.COMCTL32_MAJOR >= 6 ? LinkClass : display.windowClass;
}
-int windowProc () {
+int /*long*/ windowProc () {
return LinkProc != 0 ? LinkProc : display.windowProc;
}
-LRESULT WM_CHAR (int wParam, int lParam) {
+LRESULT WM_CHAR (int /*long*/ wParam, int /*long*/ lParam) {
LRESULT result = super.WM_CHAR (wParam, lParam);
if (result != null) return result;
if (OS.COMCTL32_MAJOR < 6) {
if (focusIndex == -1) return result;
- switch (wParam) {
+ switch ((int)/*64*/wParam) {
case ' ':
case SWT.CR:
Event event = new Event ();
@@ -655,7 +655,7 @@ LRESULT WM_CHAR (int wParam, int lParam) {
break;
}
} else {
- switch (wParam) {
+ switch ((int)/*64*/wParam) {
case ' ':
case SWT.CR:
case SWT.TAB:
@@ -665,7 +665,7 @@ LRESULT WM_CHAR (int wParam, int lParam) {
* This allows the application to cancel an operation that is normally
* performed in WM_KEYDOWN from WM_CHAR.
*/
- int code = callWindowProc (handle, OS.WM_KEYDOWN, wParam, lParam);
+ int /*long*/ code = callWindowProc (handle, OS.WM_KEYDOWN, wParam, lParam);
return new LRESULT (code);
}
@@ -673,10 +673,11 @@ LRESULT WM_CHAR (int wParam, int lParam) {
return result;
}
-LRESULT WM_GETDLGCODE (int wParam, int lParam) {
+LRESULT WM_GETDLGCODE (int /*long*/ wParam, int /*long*/ lParam) {
LRESULT result = super.WM_GETDLGCODE (wParam, lParam);
if (result != null) return result;
- int index, count, code = 0;
+ int index, count;
+ int /*long*/ code = 0;
if (OS.COMCTL32_MAJOR >= 6) {
LITEM item = new LITEM ();
item.mask = OS.LIF_ITEMINDEX | OS.LIF_STATE;
@@ -707,20 +708,20 @@ LRESULT WM_GETDLGCODE (int wParam, int lParam) {
return result;
}
-LRESULT WM_GETFONT (int wParam, int lParam) {
+LRESULT WM_GETFONT (int /*long*/ wParam, int /*long*/ lParam) {
LRESULT result = super.WM_GETFONT (wParam, lParam);
if (result != null) return result;
- int code = callWindowProc (handle, OS.WM_GETFONT, wParam, lParam);
+ int /*long*/ 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 wParam, int lParam) {
+LRESULT WM_KEYDOWN (int /*long*/ wParam, int /*long*/ lParam) {
LRESULT result = super.WM_KEYDOWN (wParam, lParam);
if (result != null) return result;
if (OS.COMCTL32_MAJOR >= 6) {
- switch (wParam) {
+ switch ((int)/*64*/wParam) {
case OS.VK_SPACE:
case OS.VK_RETURN:
case OS.VK_TAB:
@@ -736,13 +737,13 @@ LRESULT WM_KEYDOWN (int wParam, int lParam) {
return result;
}
-LRESULT WM_KILLFOCUS (int wParam, int lParam) {
+LRESULT WM_KILLFOCUS (int /*long*/ wParam, int /*long*/ lParam) {
LRESULT result = super.WM_KILLFOCUS (wParam, lParam);
if (OS.COMCTL32_MAJOR < 6) redraw ();
return result;
}
-LRESULT WM_LBUTTONDOWN (int wParam, int lParam) {
+LRESULT WM_LBUTTONDOWN (int /*long*/ wParam, int /*long*/ lParam) {
LRESULT result = super.WM_LBUTTONDOWN (wParam, lParam);
if (result == LRESULT.ZERO) return result;
if (OS.COMCTL32_MAJOR < 6) {
@@ -780,7 +781,7 @@ LRESULT WM_LBUTTONDOWN (int wParam, int lParam) {
return result;
}
-LRESULT WM_LBUTTONUP (int wParam, int lParam) {
+LRESULT WM_LBUTTONUP (int /*long*/ wParam, int /*long*/ lParam) {
LRESULT result = super.WM_LBUTTONUP (wParam, lParam);
if (result == LRESULT.ZERO) return result;
if (OS.COMCTL32_MAJOR < 6) {
@@ -802,7 +803,7 @@ LRESULT WM_LBUTTONUP (int wParam, int lParam) {
return result;
}
-LRESULT WM_MOUSEMOVE (int wParam, int lParam) {
+LRESULT WM_MOUSEMOVE (int /*long*/ wParam, int /*long*/ lParam) {
LRESULT result = super.WM_MOUSEMOVE (wParam, lParam);
if (OS.COMCTL32_MAJOR < 6) {
int x = OS.GET_X_LPARAM (lParam);
@@ -837,7 +838,7 @@ LRESULT WM_MOUSEMOVE (int wParam, int lParam) {
return result;
}
-LRESULT WM_PAINT (int wParam, int lParam) {
+LRESULT WM_PAINT (int /*long*/ wParam, int /*long*/ lParam) {
if (OS.COMCTL32_MAJOR >= 6) {
return super.WM_PAINT (wParam, lParam);
}
@@ -859,7 +860,7 @@ LRESULT WM_PAINT (int wParam, int lParam) {
return LRESULT.ZERO;
}
-LRESULT WM_PRINTCLIENT (int wParam, int lParam) {
+LRESULT WM_PRINTCLIENT (int /*long*/ wParam, int /*long*/ lParam) {
LRESULT result = super.WM_PRINTCLIENT (wParam, lParam);
if (OS.COMCTL32_MAJOR < 6) {
RECT rect = new RECT ();
@@ -874,13 +875,13 @@ LRESULT WM_PRINTCLIENT (int wParam, int lParam) {
return result;
}
-LRESULT WM_SETFOCUS (int wParam, int lParam) {
+LRESULT WM_SETFOCUS (int /*long*/ wParam, int /*long*/ lParam) {
LRESULT result = super.WM_SETFOCUS (wParam, lParam);
if (OS.COMCTL32_MAJOR < 6) redraw ();
return result;
}
-LRESULT WM_SETFONT (int wParam, int lParam) {
+LRESULT WM_SETFONT (int /*long*/ wParam, int /*long*/ lParam) {
if (OS.COMCTL32_MAJOR < 6) {
layout.setFont (Font.win32_new (display, wParam));
}
@@ -888,7 +889,7 @@ LRESULT WM_SETFONT (int wParam, int lParam) {
return super.WM_SETFONT (font = wParam, lParam);
}
-LRESULT WM_SIZE (int wParam, int lParam) {
+LRESULT WM_SIZE (int /*long*/ wParam, int /*long*/ lParam) {
LRESULT result = super.WM_SIZE (wParam, lParam);
if (OS.COMCTL32_MAJOR < 6) {
RECT rect = new RECT ();
@@ -899,7 +900,7 @@ LRESULT WM_SIZE (int wParam, int lParam) {
return result;
}
-LRESULT wmColorChild (int wParam, int lParam) {
+LRESULT wmColorChild (int /*long*/ wParam, int /*long*/ lParam) {
LRESULT result = super.wmColorChild (wParam, lParam);
/*
* Feature in Windows. When a SysLink is disabled, it does
@@ -912,7 +913,7 @@ LRESULT wmColorChild (int wParam, int lParam) {
if (result == null) {
int backPixel = getBackgroundPixel ();
OS.SetBkColor (wParam, backPixel);
- int hBrush = findBrush (backPixel, OS.BS_SOLID);
+ int /*long*/ hBrush = findBrush (backPixel, OS.BS_SOLID);
return new LRESULT (hBrush);
}
}
@@ -920,7 +921,7 @@ LRESULT wmColorChild (int wParam, int lParam) {
return result;
}
-LRESULT wmNotifyChild (NMHDR hdr, int wParam, int lParam) {
+LRESULT wmNotifyChild (NMHDR hdr, int /*long*/ wParam, int /*long*/ 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 f35c9378b6..b05a6b044f 100755
--- 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
@@ -36,7 +36,7 @@ import org.eclipse.swt.events.*;
public class List extends Scrollable {
static final int INSET = 3;
- static final int ListProc;
+ static final int /*long*/ ListProc;
static final TCHAR ListClass = new TCHAR (0, "LISTBOX", true);
static {
WNDCLASS lpWndClass = new WNDCLASS ();
@@ -95,7 +95,7 @@ public void add (String string) {
checkWidget ();
if (string == null) error (SWT.ERROR_NULL_ARGUMENT);
TCHAR buffer = new TCHAR (getCodePage (), string, true);
- int result = OS.SendMessage (handle, OS.LB_ADDSTRING, 0, buffer);
+ int result = (int)/*64*/OS.SendMessage (handle, OS.LB_ADDSTRING, 0, buffer);
if (result == OS.LB_ERR) error (SWT.ERROR_ITEM_NOT_ADDED);
if (result == OS.LB_ERRSPACE) error (SWT.ERROR_ITEM_NOT_ADDED);
if ((style & SWT.H_SCROLL) != 0) setScrollWidth (buffer, true);
@@ -128,10 +128,10 @@ public void add (String string, int index) {
if (string == null) error (SWT.ERROR_NULL_ARGUMENT);
if (index == -1) error (SWT.ERROR_INVALID_RANGE);
TCHAR buffer = new TCHAR (getCodePage (), string, true);
- int result = OS.SendMessage (handle, OS.LB_INSERTSTRING, index, buffer);
+ int result = (int)/*64*/OS.SendMessage (handle, OS.LB_INSERTSTRING, index, buffer);
if (result == OS.LB_ERRSPACE) error (SWT.ERROR_ITEM_NOT_ADDED);
if (result == OS.LB_ERR) {
- int count = OS.SendMessage (handle, OS.LB_GETCOUNT, 0, 0);
+ int count = (int)/*64*/OS.SendMessage (handle, OS.LB_GETCOUNT, 0, 0);
if (0 <= index && index <= count) {
error (SWT.ERROR_ITEM_NOT_ADDED);
} else {
@@ -173,7 +173,7 @@ public void addSelectionListener(SelectionListener listener) {
addListener (SWT.DefaultSelection,typedListener);
}
-int callWindowProc (int hwnd, int msg, int wParam, int lParam) {
+int /*long*/ callWindowProc (int /*long*/ hwnd, int msg, int /*long*/ wParam, int /*long*/ lParam) {
if (handle == 0) return 0;
return OS.CallWindowProc (ListProc, hwnd, msg, wParam, lParam);
}
@@ -187,12 +187,12 @@ public Point computeSize (int wHint, int hHint, boolean changed) {
int width = 0, height = 0;
if (wHint == SWT.DEFAULT) {
if ((style & SWT.H_SCROLL) != 0) {
- width = OS.SendMessage (handle, OS.LB_GETHORIZONTALEXTENT, 0, 0);
+ width = (int)/*64*/OS.SendMessage (handle, OS.LB_GETHORIZONTALEXTENT, 0, 0);
width -= INSET;
} else {
- int count = OS.SendMessage (handle, OS.LB_GETCOUNT, 0, 0);
- int newFont, oldFont = 0;
- int hDC = OS.GetDC (handle);
+ int count = (int)/*64*/OS.SendMessage (handle, OS.LB_GETCOUNT, 0, 0);
+ int /*long*/ newFont, oldFont = 0;
+ int /*long*/ 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 ();
@@ -200,12 +200,12 @@ public Point computeSize (int wHint, int hHint, boolean changed) {
int cp = getCodePage ();
TCHAR buffer = new TCHAR (cp, 64 + 1);
for (int i=0; i<count; i++) {
- int length = OS.SendMessage (handle, OS.LB_GETTEXTLEN, i, 0);
+ int length = (int)/*64*/OS.SendMessage (handle, OS.LB_GETTEXTLEN, i, 0);
if (length != OS.LB_ERR) {
if (length + 1 > buffer.length ()) {
buffer = new TCHAR (cp, length + 1);
}
- int result = OS.SendMessage (handle, OS.LB_GETTEXT, i, buffer);
+ int result = (int)/*64*/OS.SendMessage (handle, OS.LB_GETTEXT, i, buffer);
if (result != OS.LB_ERR) {
OS.DrawText (hDC, buffer, length, rect, flags);
width = Math.max (width, rect.right - rect.left);
@@ -217,8 +217,8 @@ public Point computeSize (int wHint, int hHint, boolean changed) {
}
}
if (hHint == SWT.DEFAULT) {
- int count = OS.SendMessage (handle, OS.LB_GETCOUNT, 0, 0);
- int itemHeight = OS.SendMessage (handle, OS.LB_GETITEMHEIGHT, 0, 0);
+ int count = (int)/*64*/OS.SendMessage (handle, OS.LB_GETCOUNT, 0, 0);
+ int itemHeight = (int)/*64*/OS.SendMessage (handle, OS.LB_GETITEMHEIGHT, 0, 0);
height = count * itemHeight;
}
if (width == 0) width = DEFAULT_WIDTH;
@@ -263,7 +263,7 @@ public void deselect (int [] indices) {
if (indices == null) error (SWT.ERROR_NULL_ARGUMENT);
if (indices.length == 0) return;
if ((style & SWT.SINGLE) != 0) {
- int oldIndex = OS.SendMessage (handle, OS.LB_GETCURSEL, 0, 0);
+ int oldIndex = (int)/*64*/OS.SendMessage (handle, OS.LB_GETCURSEL, 0, 0);
if (oldIndex == OS.LB_ERR) return;
for (int i=0; i<indices.length; i++) {
if (oldIndex == indices [i]) {
@@ -297,7 +297,7 @@ public void deselect (int index) {
checkWidget ();
if (index == -1) return;
if ((style & SWT.SINGLE) != 0) {
- int oldIndex = OS.SendMessage (handle, OS.LB_GETCURSEL, 0, 0);
+ int oldIndex = (int)/*64*/OS.SendMessage (handle, OS.LB_GETCURSEL, 0, 0);
if (oldIndex == OS.LB_ERR) return;
if (oldIndex == index) OS.SendMessage (handle, OS.LB_SETCURSEL, -1, 0);
return;
@@ -324,7 +324,7 @@ public void deselect (int start, int end) {
checkWidget ();
if (start > end) return;
if ((style & SWT.SINGLE) != 0) {
- int oldIndex = OS.SendMessage (handle, OS.LB_GETCURSEL, 0, 0);
+ int oldIndex = (int)/*64*/OS.SendMessage (handle, OS.LB_GETCURSEL, 0, 0);
if (oldIndex == OS.LB_ERR) return;
if (start <= oldIndex && oldIndex <= end) {
OS.SendMessage (handle, OS.LB_SETCURSEL, -1, 0);
@@ -337,7 +337,7 @@ public void deselect (int start, int end) {
* start = end, LB_SELITEMRANGEEX deselects the
* item.
*/
- int count = OS.SendMessage (handle, OS.LB_GETCOUNT, 0, 0);
+ int count = (int)/*64*/OS.SendMessage (handle, OS.LB_GETCOUNT, 0, 0);
if (start < 0 && end < 0) return;
if (start >= count && end >= count) return;
start = Math.min (count - 1, Math.max (0, start));
@@ -375,9 +375,9 @@ public void deselectAll () {
*/
public int getFocusIndex () {
checkWidget ();
- int result = OS.SendMessage (handle, OS.LB_GETCARETINDEX, 0, 0);
+ int result = (int)/*64*/OS.SendMessage (handle, OS.LB_GETCARETINDEX, 0, 0);
if (result == 0) {
- int count = OS.SendMessage (handle, OS.LB_GETCOUNT, 0, 0);
+ int count = (int)/*64*/OS.SendMessage (handle, OS.LB_GETCOUNT, 0, 0);
if (count == 0) return -1;
}
return result;
@@ -400,13 +400,13 @@ public int getFocusIndex () {
*/
public String getItem (int index) {
checkWidget ();
- int length = OS.SendMessage (handle, OS.LB_GETTEXTLEN, index, 0);
+ int length = (int)/*64*/OS.SendMessage (handle, OS.LB_GETTEXTLEN, index, 0);
if (length != OS.LB_ERR) {
TCHAR buffer = new TCHAR (getCodePage (), length + 1);
- int result = OS.SendMessage (handle, OS.LB_GETTEXT, index, buffer);
+ int result = (int)/*64*/OS.SendMessage (handle, OS.LB_GETTEXT, index, buffer);
if (result != OS.LB_ERR) return buffer.toString (0, length);
}
- int count = OS.SendMessage (handle, OS.LB_GETCOUNT, 0, 0);
+ int count = (int)/*64*/OS.SendMessage (handle, OS.LB_GETCOUNT, 0, 0);
if (0 <= index && index < count) error (SWT.ERROR_CANNOT_GET_ITEM);
error (SWT.ERROR_INVALID_RANGE);
return "";
@@ -424,7 +424,7 @@ public String getItem (int index) {
*/
public int getItemCount () {
checkWidget ();
- int result = OS.SendMessage (handle, OS.LB_GETCOUNT, 0, 0);
+ int result = (int)/*64*/OS.SendMessage (handle, OS.LB_GETCOUNT, 0, 0);
if (result == OS.LB_ERR) error (SWT.ERROR_CANNOT_GET_COUNT);
return result;
}
@@ -442,7 +442,7 @@ public int getItemCount () {
*/
public int getItemHeight () {
checkWidget ();
- int result = OS.SendMessage (handle, OS.LB_GETITEMHEIGHT, 0, 0);
+ int result = (int)/*64*/OS.SendMessage (handle, OS.LB_GETITEMHEIGHT, 0, 0);
if (result == OS.LB_ERR) error (SWT.ERROR_CANNOT_GET_ITEM_HEIGHT);
return result;
}
@@ -510,11 +510,11 @@ public String [] getSelection () {
public int getSelectionCount () {
checkWidget ();
if ((style & SWT.SINGLE) != 0) {
- int result = OS.SendMessage (handle, OS.LB_GETCURSEL, 0, 0);
+ int result = (int)/*64*/OS.SendMessage (handle, OS.LB_GETCURSEL, 0, 0);
if (result == OS.LB_ERR) return 0;
return 1;
}
- int result = OS.SendMessage (handle, OS.LB_GETSELCOUNT, 0, 0);
+ int result = (int)/*64*/OS.SendMessage (handle, OS.LB_GETSELCOUNT, 0, 0);
if (result == OS.LB_ERR) error (SWT.ERROR_CANNOT_GET_COUNT);
return result;
}
@@ -533,17 +533,17 @@ public int getSelectionCount () {
public int getSelectionIndex () {
checkWidget ();
if ((style & SWT.SINGLE) != 0) {
- return OS.SendMessage (handle, OS.LB_GETCURSEL, 0, 0);
+ return (int)/*64*/OS.SendMessage (handle, OS.LB_GETCURSEL, 0, 0);
}
- int count = OS.SendMessage (handle, OS.LB_GETSELCOUNT, 0, 0);
+ int count = (int)/*64*/OS.SendMessage (handle, OS.LB_GETSELCOUNT, 0, 0);
if (count == OS.LB_ERR) error (SWT.ERROR_CANNOT_GET_SELECTION);
if (count == 0) return -1;
- int index = OS.SendMessage (handle, OS.LB_GETCARETINDEX, 0, 0);
- int result = OS.SendMessage (handle, OS.LB_GETSEL, index, 0);
+ int index = (int)/*64*/OS.SendMessage (handle, OS.LB_GETCARETINDEX, 0, 0);
+ int result = (int)/*64*/OS.SendMessage (handle, OS.LB_GETSEL, index, 0);
if (result == OS.LB_ERR) error (SWT.ERROR_CANNOT_GET_SELECTION);
if (result != 0) return index;
- int [] buffer = new int [1];
- result = OS.SendMessage (handle, OS.LB_GETSELITEMS, 1, buffer);
+ int [] buffer = new int[1];
+ result = (int)/*64*/OS.SendMessage (handle, OS.LB_GETSELITEMS, 1, buffer);
if (result != 1) error (SWT.ERROR_CANNOT_GET_SELECTION);
return buffer [0];
}
@@ -567,14 +567,14 @@ public int getSelectionIndex () {
public int [] getSelectionIndices () {
checkWidget ();
if ((style & SWT.SINGLE) != 0) {
- int result = OS.SendMessage (handle, OS.LB_GETCURSEL, 0, 0);
+ int result = (int)/*64*/OS.SendMessage (handle, OS.LB_GETCURSEL, 0, 0);
if (result == OS.LB_ERR) return new int [0];
return new int [] {result};
}
- int length = OS.SendMessage (handle, OS.LB_GETSELCOUNT, 0, 0);
+ int length = (int)/*64*/OS.SendMessage (handle, OS.LB_GETSELCOUNT, 0, 0);
if (length == OS.LB_ERR) error (SWT.ERROR_CANNOT_GET_SELECTION);
int [] indices = new int [length];
- int result = OS.SendMessage (handle, OS.LB_GETSELITEMS, length, indices);
+ int result = (int)/*64*/OS.SendMessage (handle, OS.LB_GETSELITEMS, length, indices);
if (result != length) error (SWT.ERROR_CANNOT_GET_SELECTION);
return indices;
}
@@ -593,7 +593,7 @@ public int [] getSelectionIndices () {
*/
public int getTopIndex () {
checkWidget ();
- return OS.SendMessage (handle, OS.LB_GETTOPINDEX, 0, 0);
+ return (int)/*64*/OS.SendMessage (handle, OS.LB_GETTOPINDEX, 0, 0);
}
/**
@@ -657,12 +657,12 @@ public int indexOf (String string, int start) {
}
/* Use LB_FINDSTRINGEXACT to search for the item */
- int count = OS.SendMessage (handle, OS.LB_GETCOUNT, 0, 0);
+ int count = (int)/*64*/OS.SendMessage (handle, OS.LB_GETCOUNT, 0, 0);
if (!(0 <= start && start < count)) return -1;
int index = start - 1, last;
TCHAR buffer = new TCHAR (getCodePage (), string, true);
do {
- index = OS.SendMessage (handle, OS.LB_FINDSTRINGEXACT, last = index, buffer);
+ index = (int)/*64*/OS.SendMessage (handle, OS.LB_FINDSTRINGEXACT, last = index, buffer);
if (index == OS.LB_ERR || index <= last) return -1;
} while (!string.equals (getItem (index)));
return index;
@@ -683,7 +683,7 @@ public int indexOf (String string, int start) {
*/
public boolean isSelected (int index) {
checkWidget ();
- int result = OS.SendMessage (handle, OS.LB_GETSEL, index, 0);
+ int result = (int)/*64*/OS.SendMessage (handle, OS.LB_GETSEL, index, 0);
return (result != 0) && (result != OS.LB_ERR);
}
@@ -710,13 +710,14 @@ public void remove (int [] indices) {
System.arraycopy (indices, 0, newIndices, 0, indices.length);
sort (newIndices);
int start = newIndices [newIndices.length - 1], end = newIndices [0];
- int count = OS.SendMessage (handle, OS.LB_GETCOUNT, 0, 0);
+ int count = (int)/*64*/OS.SendMessage (handle, OS.LB_GETCOUNT, 0, 0);
if (!(0 <= start && start <= end && end < count)) {
error (SWT.ERROR_INVALID_RANGE);
}
- int topIndex = OS.SendMessage (handle, OS.LB_GETTOPINDEX, 0, 0);
+ int topIndex = (int)/*64*/OS.SendMessage (handle, OS.LB_GETTOPINDEX, 0, 0);
RECT rect = null;
- int hDC = 0, oldFont = 0, newFont = 0, newWidth = 0;
+ int /*long*/ hDC = 0, oldFont = 0, newFont = 0;
+ int newWidth = 0;
if ((style & SWT.H_SCROLL) != 0) {
rect = new RECT ();
hDC = OS.GetDC (handle);
@@ -730,13 +731,13 @@ public void remove (int [] indices) {
if (index != last) {
TCHAR buffer = null;
if ((style & SWT.H_SCROLL) != 0) {
- int length = OS.SendMessage (handle, OS.LB_GETTEXTLEN, index, 0);
+ int length = (int)/*64*/OS.SendMessage (handle, OS.LB_GETTEXTLEN, index, 0);
if (length == OS.LB_ERR) break;
buffer = new TCHAR (cp, length + 1);
- int result = OS.SendMessage (handle, OS.LB_GETTEXT, index, buffer);
+ int result = (int)/*64*/OS.SendMessage (handle, OS.LB_GETTEXT, index, buffer);
if (result == OS.LB_ERR) break;
}
- int result = OS.SendMessage (handle, OS.LB_DELETESTRING, index, 0);
+ int result = (int)/*64*/OS.SendMessage (handle, OS.LB_DELETESTRING, index, 0);
if (result == OS.LB_ERR) break;
if ((style & SWT.H_SCROLL) != 0) {
int flags = OS.DT_CALCRECT | OS.DT_SINGLELINE | OS.DT_NOPREFIX;
@@ -778,24 +779,24 @@ public void remove (int index) {
checkWidget ();
TCHAR buffer = null;
if ((style & SWT.H_SCROLL) != 0) {
- int length = OS.SendMessage (handle, OS.LB_GETTEXTLEN, index, 0);
+ int length = (int)/*64*/OS.SendMessage (handle, OS.LB_GETTEXTLEN, index, 0);
if (length == OS.LB_ERR) {
- int count = OS.SendMessage (handle, OS.LB_GETCOUNT, 0, 0);
+ int count = (int)/*64*/OS.SendMessage (handle, OS.LB_GETCOUNT, 0, 0);
if (0 <= index && index < count) error (SWT.ERROR_ITEM_NOT_REMOVED);
error (SWT.ERROR_INVALID_RANGE);
}
buffer = new TCHAR (getCodePage (), length + 1);
- int result = OS.SendMessage (handle, OS.LB_GETTEXT, index, buffer);
+ int result = (int)/*64*/OS.SendMessage (handle, OS.LB_GETTEXT, index, buffer);
if (result == OS.LB_ERR) {
- int count = OS.SendMessage (handle, OS.LB_GETCOUNT, 0, 0);
+ int count = (int)/*64*/OS.SendMessage (handle, OS.LB_GETCOUNT, 0, 0);
if (0 <= index && index < count) error (SWT.ERROR_ITEM_NOT_REMOVED);
error (SWT.ERROR_INVALID_RANGE);
}
}
- int topIndex = OS.SendMessage (handle, OS.LB_GETTOPINDEX, 0, 0);
- int result = OS.SendMessage (handle, OS.LB_DELETESTRING, index, 0);
+ int topIndex = (int)/*64*/OS.SendMessage (handle, OS.LB_GETTOPINDEX, 0, 0);
+ int result = (int)/*64*/OS.SendMessage (handle, OS.LB_DELETESTRING, index, 0);
if (result == OS.LB_ERR) {
- int count = OS.SendMessage (handle, OS.LB_GETCOUNT, 0, 0);
+ int count = (int)/*64*/OS.SendMessage (handle, OS.LB_GETCOUNT, 0, 0);
if (0 <= index && index < count) error (SWT.ERROR_ITEM_NOT_REMOVED);
error (SWT.ERROR_INVALID_RANGE);
}
@@ -824,7 +825,7 @@ public void remove (int index) {
public void remove (int start, int end) {
checkWidget ();
if (start > end) return;
- int count = OS.SendMessage (handle, OS.LB_GETCOUNT, 0, 0);
+ int count = (int)/*64*/OS.SendMessage (handle, OS.LB_GETCOUNT, 0, 0);
if (!(0 <= start && start <= end && end < count)) {
error (SWT.ERROR_INVALID_RANGE);
}
@@ -832,9 +833,10 @@ public void remove (int start, int end) {
removeAll ();
return;
}
- int topIndex = OS.SendMessage (handle, OS.LB_GETTOPINDEX, 0, 0);
+ int topIndex = (int)/*64*/OS.SendMessage (handle, OS.LB_GETTOPINDEX, 0, 0);
RECT rect = null;
- int hDC = 0, oldFont = 0, newFont = 0, newWidth = 0;
+ int /*long*/ hDC = 0, oldFont = 0, newFont = 0;
+ int newWidth = 0;
if ((style & SWT.H_SCROLL) != 0) {
rect = new RECT ();
hDC = OS.GetDC (handle);
@@ -847,13 +849,13 @@ public void remove (int start, int end) {
while (index <= end) {
TCHAR buffer = null;
if ((style & SWT.H_SCROLL) != 0) {
- int length = OS.SendMessage (handle, OS.LB_GETTEXTLEN, start, 0);
+ int length = (int)/*64*/OS.SendMessage (handle, OS.LB_GETTEXTLEN, start, 0);
if (length == OS.LB_ERR) break;
buffer = new TCHAR (cp, length + 1);
- int result = OS.SendMessage (handle, OS.LB_GETTEXT, start, buffer);
+ int result = (int)/*64*/OS.SendMessage (handle, OS.LB_GETTEXT, start, buffer);
if (result == OS.LB_ERR) break;
}
- int result = OS.SendMessage (handle, OS.LB_DELETESTRING, start, 0);
+ int result = (int)/*64*/OS.SendMessage (handle, OS.LB_DELETESTRING, start, 0);
if (result == OS.LB_ERR) break;
if ((style & SWT.H_SCROLL) != 0) {
OS.DrawText (hDC, buffer, -1, rect, flags);
@@ -999,7 +1001,7 @@ public void select (int index) {
void select (int index, boolean scroll) {
if (index < 0) return;
- int count = OS.SendMessage (handle, OS.LB_GETCOUNT, 0, 0);
+ int count = (int)/*64*/OS.SendMessage (handle, OS.LB_GETCOUNT, 0, 0);
if (index >= count) return;
if (scroll) {
if ((style & SWT.SINGLE) != 0) {
@@ -1009,7 +1011,7 @@ void select (int index, boolean scroll) {
}
return;
}
- int topIndex = OS.SendMessage (handle, OS.LB_GETTOPINDEX, 0, 0);
+ int topIndex = (int)/*64*/OS.SendMessage (handle, OS.LB_GETTOPINDEX, 0, 0);
RECT itemRect = new RECT (), selectedRect = null;
OS.SendMessage (handle, OS.LB_GETITEMRECT, index, itemRect);
boolean redraw = drawCount == 0 && OS.IsWindowVisible (handle);
@@ -1019,14 +1021,14 @@ void select (int index, boolean scroll) {
}
int focusIndex = -1;
if ((style & SWT.SINGLE) != 0) {
- int oldIndex = OS.SendMessage (handle, OS.LB_GETCURSEL, 0, 0);
+ int oldIndex = (int)/*64*/OS.SendMessage (handle, OS.LB_GETCURSEL, 0, 0);
if (oldIndex != -1) {
selectedRect = new RECT ();
OS.SendMessage (handle, OS.LB_GETITEMRECT, oldIndex, selectedRect);
}
OS.SendMessage (handle, OS.LB_SETCURSEL, index, 0);
} else {
- focusIndex = OS.SendMessage (handle, OS.LB_GETCARETINDEX, 0, 0);
+ focusIndex = (int)/*64*/OS.SendMessage (handle, OS.LB_GETCARETINDEX, 0, 0);
OS.SendMessage (handle, OS.LB_SETSEL, 1, index);
}
if ((style & SWT.MULTI) != 0) {
@@ -1070,7 +1072,7 @@ void select (int index, boolean scroll) {
public void select (int start, int end) {
checkWidget ();
if (end < 0 || start > end || ((style & SWT.SINGLE) != 0 && start != end)) return;
- int count = OS.SendMessage (handle, OS.LB_GETCOUNT, 0, 0);
+ int count = (int)/*64*/OS.SendMessage (handle, OS.LB_GETCOUNT, 0, 0);
if (count == 0 || start >= count) return;
start = Math.max (0, start);
end = Math.min (end, count - 1);
@@ -1112,7 +1114,7 @@ public void selectAll () {
void setFocusIndex (int index) {
// checkWidget ();
- int count = OS.SendMessage (handle, OS.LB_GETCOUNT, 0, 0);
+ int count = (int)/*64*/OS.SendMessage (handle, OS.LB_GETCOUNT, 0, 0);
if (!(0 <= index && index < count)) return;
OS.SendMessage (handle, OS.LB_SETCARETINDEX, index, 0);
}
@@ -1170,14 +1172,15 @@ public void setItems (String [] items) {
for (int i=0; i<items.length; i++) {
if (items [i] == null) error (SWT.ERROR_INVALID_ARGUMENT);
}
- int oldProc = OS.GetWindowLong (handle, OS.GWL_WNDPROC);
- OS.SetWindowLong (handle, OS.GWL_WNDPROC, ListProc);
+ int /*long*/ oldProc = OS.GetWindowLongPtr (handle, OS.GWLP_WNDPROC);
+ OS.SetWindowLongPtr (handle, OS.GWLP_WNDPROC, ListProc);
boolean redraw = drawCount == 0 && OS.IsWindowVisible (handle);
if (redraw) {
OS.SendMessage (handle, OS.WM_SETREDRAW, 0, 0);
}
RECT rect = null;
- int hDC = 0, oldFont = 0, newFont = 0, newWidth = 0;
+ int /*long*/ hDC = 0, oldFont = 0, newFont = 0;
+ int newWidth = 0;
if ((style & SWT.H_SCROLL) != 0) {
rect = new RECT ();
hDC = OS.GetDC (handle);
@@ -1193,7 +1196,7 @@ public void setItems (String [] items) {
while (index < length) {
String string = items [index];
TCHAR buffer = new TCHAR (cp, string, true);
- int result = OS.SendMessage (handle, OS.LB_ADDSTRING, 0, buffer);
+ int result = (int)/*64*/OS.SendMessage (handle, OS.LB_ADDSTRING, 0, buffer);
if (result == OS.LB_ERR || result == OS.LB_ERRSPACE) break;
if ((style & SWT.H_SCROLL) != 0) {
int flags = OS.DT_CALCRECT | OS.DT_SINGLELINE | OS.DT_NOPREFIX;
@@ -1220,25 +1223,25 @@ public void setItems (String [] items) {
// int flags = OS.RDW_ERASE | OS.RDW_FRAME | OS.RDW_INVALIDATE;
// OS.RedrawWindow (handle, null, 0, flags);
}
- OS.SetWindowLong (handle, OS.GWL_WNDPROC, oldProc);
+ OS.SetWindowLongPtr (handle, OS.GWLP_WNDPROC, oldProc);
if (index < items.length) error (SWT.ERROR_ITEM_NOT_ADDED);
}
void setScrollWidth () {
int newWidth = 0;
RECT rect = new RECT ();
- int newFont, oldFont = 0;
- int hDC = OS.GetDC (handle);
+ int /*long*/ newFont, oldFont = 0;
+ int /*long*/ hDC = OS.GetDC (handle);
newFont = OS.SendMessage (handle, OS.WM_GETFONT, 0, 0);
if (newFont != 0) oldFont = OS.SelectObject (hDC, newFont);
int cp = getCodePage ();
- int count = OS.SendMessage (handle, OS.LB_GETCOUNT, 0, 0);
+ int count = (int)/*64*/OS.SendMessage (handle, OS.LB_GETCOUNT, 0, 0);
int flags = OS.DT_CALCRECT | OS.DT_SINGLELINE | OS.DT_NOPREFIX;
for (int i=0; i<count; i++) {
- int length = OS.SendMessage (handle, OS.LB_GETTEXTLEN, i, 0);
+ int length = (int)/*64*/OS.SendMessage (handle, OS.LB_GETTEXTLEN, i, 0);
if (length != OS.LB_ERR) {
TCHAR buffer = new TCHAR (cp, length + 1);
- int result = OS.SendMessage (handle, OS.LB_GETTEXT, i, buffer);
+ int result = (int)/*64*/OS.SendMessage (handle, OS.LB_GETTEXT, i, buffer);
if (result != OS.LB_ERR) {
OS.DrawText (hDC, buffer, -1, rect, flags);
newWidth = Math.max (newWidth, rect.right - rect.left);
@@ -1252,8 +1255,8 @@ void setScrollWidth () {
void setScrollWidth (TCHAR buffer, boolean grow) {
RECT rect = new RECT ();
- int newFont, oldFont = 0;
- int hDC = OS.GetDC (handle);
+ int /*long*/ newFont, oldFont = 0;
+ int /*long*/ 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;
@@ -1265,7 +1268,7 @@ void setScrollWidth (TCHAR buffer, boolean grow) {
void setScrollWidth (int newWidth, boolean grow) {
newWidth += INSET;
- int width = OS.SendMessage (handle, OS.LB_GETHORIZONTALEXTENT, 0, 0);
+ int width = (int)/*64*/OS.SendMessage (handle, OS.LB_GETHORIZONTALEXTENT, 0, 0);
if (grow) {
if (newWidth <= width) return;
OS.SendMessage (handle, OS.LB_SETHORIZONTALEXTENT, newWidth, 0);
@@ -1409,7 +1412,7 @@ public void setSelection (int start, int end) {
checkWidget ();
deselectAll ();
if (end < 0 || start > end || ((style & SWT.SINGLE) != 0 && start != end)) return;
- int count = OS.SendMessage (handle, OS.LB_GETCOUNT, 0, 0);
+ int count = (int)/*64*/OS.SendMessage (handle, OS.LB_GETCOUNT, 0, 0);
if (count == 0 || start >= count) return;
start = Math.max (0, start);
end = Math.min (end, count - 1);
@@ -1435,9 +1438,9 @@ public void setSelection (int start, int end) {
*/
public void setTopIndex (int index) {
checkWidget ();
- int result = OS.SendMessage (handle, OS.LB_SETTOPINDEX, index, 0);
+ int result = (int)/*64*/OS.SendMessage (handle, OS.LB_SETTOPINDEX, index, 0);
if (result == OS.LB_ERR) {
- int count = OS.SendMessage (handle, OS.LB_GETCOUNT, 0, 0);
+ int count = (int)/*64*/OS.SendMessage (handle, OS.LB_GETCOUNT, 0, 0);
index = Math.min (count - 1, Math.max (0, index));
OS.SendMessage (handle, OS.LB_SETTOPINDEX, index, 0);
}
@@ -1457,21 +1460,21 @@ public void showSelection () {
checkWidget ();
int index;
if ((style & SWT.SINGLE) != 0) {
- index = OS.SendMessage (handle, OS.LB_GETCURSEL, 0, 0);
+ index = (int)/*64*/OS.SendMessage (handle, OS.LB_GETCURSEL, 0, 0);
} else {
int [] indices = new int [1];
- int result = OS.SendMessage (handle, OS.LB_GETSELITEMS, 1, indices);
+ int result = (int)/*64*/OS.SendMessage (handle, OS.LB_GETSELITEMS, 1, indices);
index = indices [0];
if (result != 1) index = -1;
}
if (index == -1) return;
- int count = OS.SendMessage (handle, OS.LB_GETCOUNT, 0, 0);
+ int count = (int)/*64*/OS.SendMessage (handle, OS.LB_GETCOUNT, 0, 0);
if (count == 0) return;
- int height = OS.SendMessage (handle, OS.LB_GETITEMHEIGHT, 0, 0);
+ int height = (int)/*64*/OS.SendMessage (handle, OS.LB_GETITEMHEIGHT, 0, 0);
forceResize ();
RECT rect = new RECT ();
OS.GetClientRect (handle, rect);
- int topIndex = OS.SendMessage (handle, OS.LB_GETTOPINDEX, 0, 0);
+ int topIndex = (int)/*64*/OS.SendMessage (handle, OS.LB_GETTOPINDEX, 0, 0);
int visibleCount = Math.max (rect.bottom / height, 1);
int bottomIndex = Math.min (topIndex + visibleCount, count) - 1;
if (topIndex <= index && index <= bottomIndex) return;
@@ -1493,11 +1496,11 @@ TCHAR windowClass () {
return ListClass;
}
-int windowProc () {
+int /*long*/ windowProc () {
return ListProc;
}
-LRESULT WM_SIZE (int wParam, int lParam) {
+LRESULT WM_SIZE (int /*long*/ wParam, int /*long*/ lParam) {
/*
* Bug in Windows. If the top index is changed while the
* list is being resized, Windows does not redraw properly
@@ -1510,7 +1513,7 @@ LRESULT WM_SIZE (int wParam, int lParam) {
* is to redraw the control when the horizontal scroll bar is
* not at the beginning.
*/
- int oldIndex = OS.SendMessage (handle, OS.LB_GETTOPINDEX, 0, 0);
+ int oldIndex = (int)/*64*/OS.SendMessage (handle, OS.LB_GETTOPINDEX, 0, 0);
LRESULT result = super.WM_SIZE (wParam, lParam);
if (!isDisposed ()) {
SCROLLINFO info = new SCROLLINFO ();
@@ -1519,13 +1522,13 @@ LRESULT WM_SIZE (int wParam, int lParam) {
if (OS.GetScrollInfo (handle, OS.SB_HORZ, info)) {
if (info.nPos != 0) OS.InvalidateRect (handle, null, true);
}
- int newIndex = OS.SendMessage (handle, OS.LB_GETTOPINDEX, 0, 0);
+ int newIndex = (int)/*64*/OS.SendMessage (handle, OS.LB_GETTOPINDEX, 0, 0);
if (oldIndex != newIndex) OS.InvalidateRect (handle, null, true);
}
return result;
}
-LRESULT wmCommandChild (int wParam, int lParam) {
+LRESULT wmCommandChild (int /*long*/ wParam, int /*long*/ 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 ba79d579b3..3a46babb3c 100755
--- 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
@@ -46,9 +46,11 @@ public class Menu extends Widget {
* platforms and should never be accessed from application code.
* </p>
*/
- public int handle;
+ public int /*long*/ handle;
- int x, y, hBrush, hwndCB, id0, id1;
+ int x, y;
+ int /*long*/ hBrush, hwndCB;
+ int id0, id1;
int foreground = -1, background = -1;
Image backgroundImage;
boolean hasLocation;
@@ -173,7 +175,7 @@ public Menu (MenuItem parentItem) {
this (checkNull (parentItem).parent);
}
-Menu (Decorations parent, int style, int handle) {
+Menu (Decorations parent, int style, int /*long*/ handle) {
super (parent, checkStyle (style));
this.parent = parent;
this.handle = handle;
@@ -197,7 +199,7 @@ Menu (Decorations parent, int style, int handle) {
void _setVisible (boolean visible) {
if ((style & (SWT.BAR | SWT.DROP_DOWN)) != 0) return;
- int hwndParent = parent.handle;
+ int /*long*/ hwndParent = parent.handle;
if (visible) {
int flags = OS.TPM_LEFTBUTTON;
if (OS.GetKeyState (OS.VK_LBUTTON) >= 0) flags |= OS.TPM_RIGHTBUTTON;
@@ -310,7 +312,7 @@ void createHandle () {
if (handle != 0) return;
if ((style & SWT.BAR) != 0) {
if (OS.IsPPC) {
- int hwndShell = parent.handle;
+ int /*long*/ hwndShell = parent.handle;
SHMENUBARINFO mbi = new SHMENUBARINFO ();
mbi.cbSize = SHMENUBARINFO.sizeof;
mbi.hwndParent = hwndShell;
@@ -367,7 +369,7 @@ void createHandle () {
/* Set first item */
if (nToolBarId == ID_SPMM || nToolBarId == ID_SPMB) {
- int hMenu = OS.SendMessage (hwndCB, OS.SHCMBM_GETSUBMENU, 0, ID_SPSOFTKEY0);
+ int /*long*/ 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);
@@ -380,7 +382,7 @@ void createHandle () {
/* Set second item */
if (nToolBarId == ID_SPMM || nToolBarId == ID_SPBM) {
- int hMenu = OS.SendMessage (hwndCB, OS.SHCMBM_GETSUBMENU, 0, ID_SPSOFTKEY1);
+ int /*long*/ 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);
@@ -396,14 +398,14 @@ void createHandle () {
* a result, Shell on WinCE SP must use the class Dialog.
*/
int dwMask = OS.SHMBOF_NODEFAULT | OS.SHMBOF_NOTIFY;
- int lParam = OS.MAKELPARAM (dwMask, dwMask);
+ int /*long*/ 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 hwndShell = parent.handle;
+ int /*long*/ 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);
@@ -467,15 +469,16 @@ void createItem (MenuItem item, int index) {
* becomes unexpectedly disabled. The fix is to insert a
* space.
*/
- int hHeap = OS.GetProcessHeap ();
+ int /*long*/ hHeap = OS.GetProcessHeap ();
TCHAR buffer = new TCHAR (0, " ", true);
int byteCount = buffer.length () * TCHAR.sizeof;
- int pszText = OS.HeapAlloc (hHeap, OS.HEAP_ZERO_MEMORY, byteCount);
+ int /*long*/ pszText = OS.HeapAlloc (hHeap, OS.HEAP_ZERO_MEMORY, byteCount);
OS.MoveMemory (pszText, buffer, byteCount);
MENUITEMINFO info = new MENUITEMINFO ();
info.cbSize = MENUITEMINFO.sizeof;
info.fMask = OS.MIIM_ID | OS.MIIM_TYPE | OS.MIIM_DATA;
- info.wID = info.dwItemData = item.id;
+ info.wID = item.id;
+ info.dwItemData = item.id;
info.fType = item.widgetStyle ();
info.dwTypeData = pszText;
success = OS.InsertMenuItem (handle, index, true, info);
@@ -528,11 +531,11 @@ void destroyItem (MenuItem item) {
redraw();
return;
}
- int index = OS.SendMessage (hwndCB, OS.TB_COMMANDTOINDEX, item.id, 0);
+ int index = (int)/*64*/OS.SendMessage (hwndCB, OS.TB_COMMANDTOINDEX, item.id, 0);
if (OS.SendMessage (hwndCB, OS.TB_DELETEBUTTON, index, 0) == 0) {
error (SWT.ERROR_ITEM_NOT_REMOVED);
}
- int count = OS.SendMessage (hwndCB, OS.TB_BUTTONCOUNT, 0, 0);
+ int count = (int)/*64*/OS.SendMessage (hwndCB, OS.TB_BUTTONCOUNT, 0, 0);
if (count == 0) {
if (imageList != null) {
OS.SendMessage (handle, OS.TB_SETIMAGELIST, 0, 0);
@@ -565,7 +568,7 @@ void destroyItem (MenuItem item) {
}
void destroyWidget () {
- int hMenu = handle, hCB = hwndCB;
+ int /*long*/ hMenu = handle, hCB = hwndCB;
releaseHandle ();
if (OS.IsWinCE && hCB != 0) {
OS.CommandBar_Destroy (hCB);
@@ -645,7 +648,7 @@ void fixMenus (Decorations newParent) {
if (parent.menuBar != this) {
return new Rectangle (0, 0, 0, 0);
}
- int hwndShell = parent.handle;
+ int /*long*/ hwndShell = parent.handle;
MENUBARINFO info = new MENUBARINFO ();
info.cbSize = MENUBARINFO.sizeof;
if (OS.GetMenuBarInfo (hwndShell, OS.OBJID_MENU, 0, info)) {
@@ -749,11 +752,11 @@ public boolean getEnabled () {
*/
public MenuItem getItem (int index) {
checkWidget ();
- int id = 0;
+ int /*long*/ id = 0;
if ((OS.IsPPC || OS.IsSP) && hwndCB != 0) {
if (OS.IsPPC) {
TBBUTTON lpButton = new TBBUTTON ();
- int result = OS.SendMessage (hwndCB, OS.TB_GETBUTTON, index, lpButton);
+ int /*long*/ result = OS.SendMessage (hwndCB, OS.TB_GETBUTTON, index, lpButton);
if (result == 0) error (SWT.ERROR_CANNOT_GET_ITEM);
id = lpButton.idCommand;
}
@@ -813,7 +816,7 @@ public MenuItem [] getItems () {
result[1] = display.getMenuItem (id1);
return result;
}
- int count = OS.SendMessage (hwndCB, OS.TB_BUTTONCOUNT, 0, 0);
+ int count = (int)/*64*/OS.SendMessage (hwndCB, OS.TB_BUTTONCOUNT, 0, 0);
TBBUTTON lpButton = new TBBUTTON ();
MenuItem [] result = new MenuItem [count];
for (int i=0; i<count; i++) {
@@ -844,10 +847,10 @@ public MenuItem [] getItems () {
return result;
}
-int GetMenuItemCount (int handle) {
+int GetMenuItemCount (int /*long*/ handle) {
if (OS.IsWinCE) {
if ((OS.IsPPC || OS.IsSP) && hwndCB != 0) {
- return OS.IsSP ? 2 : OS.SendMessage (hwndCB, OS.TB_BUTTONCOUNT, 0, 0);
+ return OS.IsSP ? 2 : (int)/*64*/OS.SendMessage (hwndCB, OS.TB_BUTTONCOUNT, 0, 0);
}
int count = 0;
MENUITEMINFO info = new MENUITEMINFO ();
@@ -984,7 +987,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 hImageList = imageList.getHandle ();
+ int /*long*/ hImageList = imageList.getHandle ();
OS.SendMessage (hwndCB, OS.TB_SETIMAGELIST, 0, hImageList);
return index;
}
@@ -1021,7 +1024,7 @@ public int indexOf (MenuItem item) {
if (item.parent != this) return -1;
if ((OS.IsPPC || OS.IsSP) && hwndCB != 0) {
if (OS.IsPPC) {
- return OS.SendMessage (hwndCB, OS.TB_COMMANDTOINDEX, item.id, 0);
+ return (int)/*64*/OS.SendMessage (hwndCB, OS.TB_COMMANDTOINDEX, item.id, 0);
}
if (OS.IsSP) {
if (item.id == id0) return 0;
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 59e6d70364..ec1551fe03 100755
--- 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
@@ -35,7 +35,8 @@ import org.eclipse.swt.events.*;
public class MenuItem extends Item {
Menu parent, menu;
- int hBitmap, id, accelerator;
+ int /*long*/ hBitmap;
+ int id, accelerator;
/*
* Feature in Windows. On Windows 98, it is necessary
* to add 4 pixels to the width of the image or the image
@@ -324,7 +325,7 @@ public int getAccelerator () {
if (shell.menuBar != parent) {
return new Rectangle (0, 0, 0, 0);
}
- int hwndShell = shell.handle;
+ int /*long*/ hwndShell = shell.handle;
MENUBARINFO info1 = new MENUBARINFO ();
info1.cbSize = MENUBARINFO.sizeof;
if (!OS.GetMenuBarInfo (hwndShell, OS.OBJID_MENU, 1, info1)) {
@@ -341,7 +342,7 @@ public int getAccelerator () {
int height = info2.bottom - info2.top;
return new Rectangle (x, y, width, height);
} else {
- int hMenu = parent.handle;
+ int /*long*/ hMenu = parent.handle;
RECT rect1 = new RECT ();
if (!OS.GetMenuItemRect (0, hMenu, 0, rect1)) {
return new Rectangle (0, 0, 0, 0);
@@ -376,14 +377,14 @@ public int getAccelerator () {
public boolean getEnabled () {
checkWidget ();
if ((OS.IsPPC || OS.IsSP) && parent.hwndCB != 0) {
- int hwndCB = parent.hwndCB;
+ int /*long*/ hwndCB = parent.hwndCB;
TBBUTTONINFO info = new TBBUTTONINFO ();
info.cbSize = TBBUTTONINFO.sizeof;
info.dwMask = OS.TBIF_STATE;
OS.SendMessage (hwndCB, OS.TB_GETBUTTONINFO, id, info);
return (info.fsState & OS.TBSTATE_ENABLED) != 0;
}
- int hMenu = parent.handle;
+ int /*long*/ hMenu = parent.handle;
MENUITEMINFO info = new MENUITEMINFO ();
info.cbSize = MENUITEMINFO.sizeof;
info.fMask = OS.MIIM_STATE;
@@ -456,7 +457,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 hMenu = parent.handle;
+ int /*long*/ hMenu = parent.handle;
MENUITEMINFO info = new MENUITEMINFO ();
info.cbSize = MENUITEMINFO.sizeof;
info.fMask = OS.MIIM_STATE;
@@ -641,7 +642,7 @@ public void setAccelerator (int accelerator) {
public void setEnabled (boolean enabled) {
checkWidget ();
if ((OS.IsPPC || OS.IsSP) && parent.hwndCB != 0) {
- int hwndCB = parent.hwndCB;
+ int /*long*/ hwndCB = parent.hwndCB;
TBBUTTONINFO info = new TBBUTTONINFO ();
info.cbSize = TBBUTTONINFO.sizeof;
info.dwMask = OS.TBIF_STATE;
@@ -650,7 +651,7 @@ public void setEnabled (boolean enabled) {
if (enabled) info.fsState |= OS.TBSTATE_ENABLED;
OS.SendMessage (hwndCB, OS.TB_SETBUTTONINFO, id, info);
} else {
- int hMenu = parent.handle;
+ int /*long*/ hMenu = parent.handle;
if (OS.IsWinCE) {
int index = parent.indexOf (this);
if (index == -1) return;
@@ -711,7 +712,7 @@ public void setImage (Image image) {
super.setImage (image);
if (OS.IsWinCE) {
if ((OS.IsPPC || OS.IsSP) && parent.hwndCB != 0) {
- int hwndCB = parent.hwndCB;
+ int /*long*/ hwndCB = parent.hwndCB;
TBBUTTONINFO info = new TBBUTTONINFO ();
info.cbSize = TBBUTTONINFO.sizeof;
info.dwMask = OS.TBIF_IMAGE;
@@ -734,7 +735,7 @@ public void setImage (Image image) {
info.hbmpItem = OS.HBMMENU_CALLBACK;
}
}
- int hMenu = parent.handle;
+ int /*long*/ hMenu = parent.handle;
OS.SetMenuItemInfo (hMenu, id, false, info);
parent.redraw ();
}
@@ -790,8 +791,8 @@ public void setMenu (Menu menu) {
/* Assign the new menu in the OS */
if ((OS.IsPPC || OS.IsSP) && parent.hwndCB != 0) {
if (OS.IsPPC) {
- int hwndCB = parent.hwndCB;
- int hMenu = menu == null ? 0 : menu.handle;
+ int /*long*/ hwndCB = parent.hwndCB;
+ int /*long*/ hMenu = menu == null ? 0 : menu.handle;
OS.SendMessage (hwndCB, OS.SHCMBM_SETSUBMENU, id, hMenu);
}
if (OS.IsSP) error (SWT.ERROR_CANNOT_SET_MENU);
@@ -804,7 +805,7 @@ public void setMenu (Menu menu) {
* remove the item with RemoveMenu () which does not destroy
* the submenu and then insert the item with InsertMenuItem ().
*/
- int hMenu = parent.handle;
+ int /*long*/ hMenu = parent.handle;
MENUITEMINFO info = new MENUITEMINFO ();
info.cbSize = MENUITEMINFO.sizeof;
info.fMask = OS.MIIM_DATA;
@@ -835,9 +836,9 @@ public void setMenu (Menu menu) {
}
int cch = 128;
- int hHeap = OS.GetProcessHeap ();
+ int /*long*/ hHeap = OS.GetProcessHeap ();
int byteCount = cch * TCHAR.sizeof;
- int pszText = OS.HeapAlloc (hHeap, OS.HEAP_ZERO_MEMORY, byteCount);
+ int /*long*/ pszText = OS.HeapAlloc (hHeap, OS.HEAP_ZERO_MEMORY, byteCount);
info.fMask = OS.MIIM_STATE | OS.MIIM_ID | OS.MIIM_TYPE | OS.MIIM_DATA;
info.dwTypeData = pszText;
info.cch = cch;
@@ -856,7 +857,7 @@ public void setMenu (Menu menu) {
* the item, SetMenuItemInfo() to set the string and EnableMenuItem()
* and CheckMenuItem() to set the state.
*/
- int uIDNewItem = id;
+ int /*long*/ uIDNewItem = id;
int uFlags = OS.MF_BYPOSITION;
if (menu != null) {
uFlags |= OS.MF_POPUP;
@@ -929,7 +930,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 hMenu = parent.handle;
+ int /*long*/ hMenu = parent.handle;
if (OS.IsWinCE) {
int index = parent.indexOf (this);
if (index == -1) return;
@@ -1004,8 +1005,8 @@ public void setText (String string) {
if ((style & SWT.SEPARATOR) != 0) return;
if (text.equals (string)) return;
super.setText (string);
- int hHeap = OS.GetProcessHeap ();
- int pszText = 0;
+ int /*long*/ hHeap = OS.GetProcessHeap ();
+ int /*long*/ pszText = 0;
boolean success = false;
if ((OS.IsPPC || OS.IsSP) && parent.hwndCB != 0) {
/*
@@ -1029,7 +1030,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 hwndCB = parent.hwndCB;
+ int /*long*/ hwndCB = parent.hwndCB;
TBBUTTONINFO info2 = new TBBUTTONINFO ();
info2.cbSize = TBBUTTONINFO.sizeof;
info2.dwMask = OS.TBIF_TEXT;
@@ -1038,7 +1039,7 @@ public void setText (String string) {
} else {
MENUITEMINFO info = new MENUITEMINFO ();
info.cbSize = MENUITEMINFO.sizeof;
- int hMenu = parent.handle;
+ int /*long*/ hMenu = parent.handle;
/*
* Bug in Windows 2000. For some reason, when MIIM_TYPE is set
@@ -1106,7 +1107,7 @@ int widgetStyle () {
return bits | OS.MFT_STRING;
}
-LRESULT wmCommandChild (int wParam, int lParam) {
+LRESULT wmCommandChild (int /*long*/ wParam, int /*long*/ lParam) {
if ((style & SWT.CHECK) != 0) {
setSelection (!getSelection ());
} else {
@@ -1124,7 +1125,7 @@ LRESULT wmCommandChild (int wParam, int lParam) {
return null;
}
-LRESULT wmDrawChild (int wParam, int lParam) {
+LRESULT wmDrawChild (int /*long*/ wParam, int /*long*/ lParam) {
DRAWITEMSTRUCT struct = new DRAWITEMSTRUCT ();
OS.MoveMemory (struct, lParam, DRAWITEMSTRUCT.sizeof);
if (image != null) {
@@ -1147,7 +1148,7 @@ LRESULT wmDrawChild (int wParam, int lParam) {
return null;
}
-LRESULT wmMeasureChild (int wParam, int lParam) {
+LRESULT wmMeasureChild (int /*long*/ wParam, int /*long*/ lParam) {
MEASUREITEMSTRUCT struct = new MEASUREITEMSTRUCT ();
OS.MoveMemory (struct, lParam, MEASUREITEMSTRUCT.sizeof);
int width = 0, height = 0;
@@ -1169,7 +1170,7 @@ LRESULT wmMeasureChild (int wParam, int lParam) {
MENUINFO lpcmi = new MENUINFO ();
lpcmi.cbSize = MENUINFO.sizeof;
lpcmi.fMask = OS.MIM_STYLE;
- int hMenu = parent.handle;
+ int /*long*/ 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 c8ef322c0d..73c3d7272e 100755
--- 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
@@ -175,7 +175,7 @@ public int open () {
* anyway and not rely on MB_MODAL to work by making the
* parent be temporarily modal.
*/
- int hwndOwner = parent != null ? parent.handle : 0;
+ int /*long*/ hwndOwner = parent != null ? parent.handle : 0;
Shell 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 67740c3246..ac6824801e 100755
--- 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
@@ -36,7 +36,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 ProgressBarProc;
+ static final int /*long*/ ProgressBarProc;
static final TCHAR ProgressBarClass = new TCHAR (0, OS.PROGRESS_CLASS, true);
static {
WNDCLASS lpWndClass = new WNDCLASS ();
@@ -59,13 +59,13 @@ public class ProgressBar extends Control {
* code, other than SWT, could create a control with
* this class name, and fail unexpectedly.
*/
- int hInstance = OS.GetModuleHandle (null);
- int hHeap = OS.GetProcessHeap ();
+ int /*long*/ hInstance = OS.GetModuleHandle (null);
+ int /*long*/ hHeap = OS.GetProcessHeap ();
lpWndClass.hInstance = hInstance;
lpWndClass.style &= ~OS.CS_GLOBALCLASS;
lpWndClass.style |= OS.CS_DBLCLKS;
int byteCount = ProgressBarClass.length () * TCHAR.sizeof;
- int lpszClassName = OS.HeapAlloc (hHeap, OS.HEAP_ZERO_MEMORY, byteCount);
+ int /*long*/ lpszClassName = OS.HeapAlloc (hHeap, OS.HEAP_ZERO_MEMORY, byteCount);
OS.MoveMemory (lpszClassName, ProgressBarClass, byteCount);
lpWndClass.lpszClassName = lpszClassName;
OS.RegisterClass (lpWndClass);
@@ -106,7 +106,7 @@ public ProgressBar (Composite parent, int style) {
super (parent, checkStyle (style));
}
-int callWindowProc (int hwnd, int msg, int wParam, int lParam) {
+int /*long*/ callWindowProc (int /*long*/ hwnd, int msg, int /*long*/ wParam, int /*long*/ lParam) {
if (handle == 0) return 0;
return OS.CallWindowProc (ProgressBarProc, hwnd, msg, wParam, lParam);
}
@@ -153,7 +153,7 @@ int defaultForeground () {
*/
public int getMaximum () {
checkWidget ();
- return OS.SendMessage (handle, OS.PBM_GETRANGE, 0, 0);
+ return (int)/*64*/OS.SendMessage (handle, OS.PBM_GETRANGE, 0, 0);
}
/**
@@ -168,7 +168,7 @@ public int getMaximum () {
*/
public int getMinimum () {
checkWidget ();
- return OS.SendMessage (handle, OS.PBM_GETRANGE, 1, 0);
+ return (int)/*64*/OS.SendMessage (handle, OS.PBM_GETRANGE, 1, 0);
}
/**
@@ -183,7 +183,7 @@ public int getMinimum () {
*/
public int getSelection () {
checkWidget ();
- return OS.SendMessage (handle, OS.PBM_GETPOS, 0, 0);
+ return (int)/*64*/OS.SendMessage (handle, OS.PBM_GETPOS, 0, 0);
}
void releaseWidget () {
@@ -238,7 +238,7 @@ void setForegroundPixel (int pixel) {
*/
public void setMaximum (int value) {
checkWidget ();
- int minimum = OS.SendMessage (handle, OS.PBM_GETRANGE, 1, 0);
+ int minimum = (int)/*64*/OS.SendMessage (handle, OS.PBM_GETRANGE, 1, 0);
if (0 <= minimum && minimum < value) {
OS.SendMessage (handle, OS.PBM_SETRANGE32, minimum, value);
}
@@ -259,7 +259,7 @@ public void setMaximum (int value) {
*/
public void setMinimum (int value) {
checkWidget ();
- int maximum = OS.SendMessage (handle, OS.PBM_GETRANGE, 0, 0);
+ int maximum = (int)/*64*/OS.SendMessage (handle, OS.PBM_GETRANGE, 0, 0);
if (0 <= value && value < maximum) {
OS.SendMessage (handle, OS.PBM_SETRANGE32, value, maximum);
}
@@ -294,11 +294,11 @@ TCHAR windowClass () {
return ProgressBarClass;
}
-int windowProc () {
+int /*long*/ windowProc () {
return ProgressBarProc;
}
-LRESULT WM_GETDLGCODE (int wParam, int lParam) {
+LRESULT WM_GETDLGCODE (int /*long*/ wParam, int /*long*/ lParam) {
LRESULT result = super.WM_GETDLGCODE (wParam, lParam);
if (result != null) return result;
/*
@@ -313,7 +313,7 @@ LRESULT WM_GETDLGCODE (int wParam, int lParam) {
return new LRESULT (OS.DLGC_STATIC);
}
-LRESULT WM_SIZE (int wParam, int lParam) {
+LRESULT WM_SIZE (int /*long*/ wParam, int /*long*/ lParam) {
LRESULT result = super.WM_SIZE (wParam, lParam);
if (result != null) return result;
/*
@@ -349,7 +349,7 @@ LRESULT WM_SIZE (int wParam, int lParam) {
return result;
}
-LRESULT WM_TIMER (int wParam, int lParam) {
+LRESULT WM_TIMER (int /*long*/ wParam, int /*long*/ 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 2157186482..2259233a13 100755
--- 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
@@ -105,7 +105,7 @@ public void addSelectionListener (SelectionListener listener) {
addListener (SWT.DefaultSelection,typedListener);
}
-int callWindowProc (int hwnd, int msg, int wParam, int lParam) {
+int /*long*/ callWindowProc (int /*long*/ hwnd, int msg, int /*long*/ wParam, int /*long*/ lParam) {
if (handle == 0) return 0;
return OS.DefWindowProc (hwnd, msg, wParam, lParam);
}
@@ -135,12 +135,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 hwndTrack = parent.handle;
+ int /*long*/ hwndTrack = parent.handle;
byte [] bits = {-86, 0, 85, 0, -86, 0, 85, 0, -86, 0, 85, 0, -86, 0, 85, 0};
- int stippleBitmap = OS.CreateBitmap (8, 8, 1, 1, bits);
- int stippleBrush = OS.CreatePatternBrush (stippleBitmap);
- int hDC = OS.GetDCEx (hwndTrack, 0, OS.DCX_CACHE);
- int oldBrush = OS.SelectObject (hDC, stippleBrush);
+ 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);
OS.PatBlt (hDC, x, y, width, height, OS.PATINVERT);
OS.SelectObject (hDC, oldBrush);
OS.ReleaseDC (hwndTrack, hDC);
@@ -177,20 +177,20 @@ TCHAR windowClass () {
return display.windowClass;
}
-int windowProc () {
+int /*long*/ windowProc () {
return display.windowProc;
}
-LRESULT WM_ERASEBKGND (int wParam, int lParam) {
+LRESULT WM_ERASEBKGND (int /*long*/ wParam, int /*long*/ lParam) {
super.WM_ERASEBKGND (wParam, lParam);
drawBackground (wParam);
return LRESULT.ONE;
}
-LRESULT WM_KEYDOWN (int wParam, int lParam) {
+LRESULT WM_KEYDOWN (int /*long*/ wParam, int /*long*/ lParam) {
LRESULT result = super.WM_KEYDOWN (wParam, lParam);
if (result != null) return result;
- switch (wParam) {
+ switch ((int)/*64*/wParam) {
case OS.VK_LEFT:
case OS.VK_RIGHT:
case OS.VK_UP:
@@ -207,7 +207,7 @@ LRESULT WM_KEYDOWN (int wParam, int lParam) {
if (wParam == OS.VK_LEFT || wParam == OS.VK_RIGHT) break;
pt.y = wParam == OS.VK_UP ? -step : step;
}
- int hwndTrack = parent.handle;
+ int /*long*/ hwndTrack = parent.handle;
OS.MapWindowPoints (handle, hwndTrack, pt, 1);
RECT rect = new RECT (), clientRect = new RECT ();
OS.GetWindowRect (handle, rect);
@@ -253,16 +253,16 @@ LRESULT WM_KEYDOWN (int wParam, int lParam) {
return result;
}
-LRESULT WM_GETDLGCODE (int wParam, int lParam) {
+LRESULT WM_GETDLGCODE (int /*long*/ wParam, int /*long*/ lParam) {
return new LRESULT (OS.DLGC_STATIC);
}
-LRESULT WM_LBUTTONDOWN (int wParam, int lParam) {
+LRESULT WM_LBUTTONDOWN (int /*long*/ wParam, int /*long*/ lParam) {
LRESULT result = super.WM_LBUTTONDOWN (wParam, lParam);
if (result == LRESULT.ZERO) return result;
/* Compute the banding rectangle */
- int hwndTrack = parent.handle;
+ int /*long*/ hwndTrack = parent.handle;
POINT pt = new POINT ();
OS.POINTSTOPOINT (pt, lParam);
RECT rect = new RECT ();
@@ -310,7 +310,7 @@ LRESULT WM_LBUTTONDOWN (int wParam, int lParam) {
return result;
}
-LRESULT WM_LBUTTONUP (int wParam, int lParam) {
+LRESULT WM_LBUTTONUP (int /*long*/ wParam, int /*long*/ lParam) {
LRESULT result = super.WM_LBUTTONUP (wParam, lParam);
if (result == LRESULT.ZERO) return result;
@@ -340,7 +340,7 @@ LRESULT WM_LBUTTONUP (int wParam, int lParam) {
return result;
}
-LRESULT WM_MOUSEMOVE (int wParam, int lParam) {
+LRESULT WM_MOUSEMOVE (int /*long*/ wParam, int /*long*/ lParam) {
LRESULT result = super.WM_MOUSEMOVE (wParam, lParam);
if (result != null) return result;
if (!dragging || (wParam & OS.MK_LBUTTON) == 0) return result;
@@ -348,7 +348,7 @@ LRESULT WM_MOUSEMOVE (int wParam, int lParam) {
/* Compute the banding rectangle */
POINT pt = new POINT ();
OS.POINTSTOPOINT (pt, lParam);
- int hwndTrack = parent.handle;
+ int /*long*/ hwndTrack = parent.handle;
OS.MapWindowPoints (handle, hwndTrack, pt, 1);
RECT rect = new RECT (), clientRect = new RECT ();
OS.GetWindowRect (handle, rect);
@@ -395,12 +395,12 @@ LRESULT WM_MOUSEMOVE (int wParam, int lParam) {
return result;
}
-LRESULT WM_SETCURSOR (int wParam, int lParam) {
+LRESULT WM_SETCURSOR (int /*long*/ wParam, int /*long*/ lParam) {
LRESULT result = super.WM_SETCURSOR (wParam, lParam);
if (result != null) return result;
int hitTest = (short) OS.LOWORD (lParam);
if (hitTest == OS.HTCLIENT) {
- int hCursor = 0;
+ int /*long*/ 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 38d399f72d..3d205f0391 100755
--- 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
@@ -37,7 +37,7 @@ import org.eclipse.swt.events.*;
public class Scale extends Control {
boolean ignoreResize;
- static final int TrackBarProc;
+ static final int /*long*/ TrackBarProc;
static final TCHAR TrackBarClass = new TCHAR (0, OS.TRACKBAR_CLASS, true);
static {
WNDCLASS lpWndClass = new WNDCLASS ();
@@ -60,13 +60,13 @@ public class Scale extends Control {
* code, other than SWT, could create a control with
* this class name, and fail unexpectedly.
*/
- int hInstance = OS.GetModuleHandle (null);
- int hHeap = OS.GetProcessHeap ();
+ int /*long*/ hInstance = OS.GetModuleHandle (null);
+ int /*long*/ hHeap = OS.GetProcessHeap ();
lpWndClass.hInstance = hInstance;
lpWndClass.style &= ~OS.CS_GLOBALCLASS;
lpWndClass.style |= OS.CS_DBLCLKS;
int byteCount = TrackBarClass.length () * TCHAR.sizeof;
- int lpszClassName = OS.HeapAlloc (hHeap, OS.HEAP_ZERO_MEMORY, byteCount);
+ int /*long*/ lpszClassName = OS.HeapAlloc (hHeap, OS.HEAP_ZERO_MEMORY, byteCount);
OS.MoveMemory (lpszClassName, TrackBarClass, byteCount);
lpWndClass.lpszClassName = lpszClassName;
OS.RegisterClass (lpWndClass);
@@ -137,7 +137,7 @@ public void addSelectionListener(SelectionListener listener) {
addListener (SWT.DefaultSelection,typedListener);
}
-int callWindowProc (int hwnd, int msg, int wParam, int lParam) {
+int /*long*/ callWindowProc (int /*long*/ hwnd, int msg, int /*long*/ wParam, int /*long*/ lParam) {
if (handle == 0) return 0;
return OS.CallWindowProc (TrackBarProc, hwnd, msg, wParam, lParam);
}
@@ -192,7 +192,7 @@ int defaultForeground () {
*/
public int getIncrement () {
checkWidget ();
- return OS.SendMessage (handle, OS.TBM_GETLINESIZE, 0, 0);
+ return (int)/*64*/OS.SendMessage (handle, OS.TBM_GETLINESIZE, 0, 0);
}
/**
@@ -207,7 +207,7 @@ public int getIncrement () {
*/
public int getMaximum () {
checkWidget ();
- return OS.SendMessage (handle, OS.TBM_GETRANGEMAX, 0, 0);
+ return (int)/*64*/OS.SendMessage (handle, OS.TBM_GETRANGEMAX, 0, 0);
}
/**
@@ -222,7 +222,7 @@ public int getMaximum () {
*/
public int getMinimum () {
checkWidget ();
- return OS.SendMessage (handle, OS.TBM_GETRANGEMIN, 0, 0);
+ return (int)OS.SendMessage (handle, OS.TBM_GETRANGEMIN, 0, 0);
}
/**
@@ -239,7 +239,7 @@ public int getMinimum () {
*/
public int getPageIncrement () {
checkWidget ();
- return OS.SendMessage (handle, OS.TBM_GETPAGESIZE, 0, 0);
+ return (int)/*64*/OS.SendMessage (handle, OS.TBM_GETPAGESIZE, 0, 0);
}
/**
@@ -254,7 +254,7 @@ public int getPageIncrement () {
*/
public int getSelection () {
checkWidget ();
- return OS.SendMessage (handle, OS.TBM_GETPOS, 0, 0);
+ return (int)/*64*/OS.SendMessage (handle, OS.TBM_GETPOS, 0, 0);
}
/**
@@ -282,7 +282,7 @@ public void removeSelectionListener(SelectionListener listener) {
eventTable.unhook (SWT.DefaultSelection,listener);
}
-void setBackgroundImage (int hImage) {
+void setBackgroundImage (int /*long*/ hImage) {
super.setBackgroundImage (hImage);
/*
* Bug in Windows. Changing the background color of the Scale
@@ -324,8 +324,8 @@ void setBackgroundPixel (int pixel) {
public void setIncrement (int increment) {
checkWidget ();
if (increment < 1) return;
- int minimum = OS.SendMessage (handle, OS.TBM_GETRANGEMIN, 0, 0);
- int maximum = OS.SendMessage (handle, OS.TBM_GETRANGEMAX, 0, 0);
+ int minimum = (int)/*64*/OS.SendMessage (handle, OS.TBM_GETRANGEMIN, 0, 0);
+ int maximum = (int)/*64*/OS.SendMessage (handle, OS.TBM_GETRANGEMAX, 0, 0);
if (increment > maximum - minimum) return;
OS.SendMessage (handle, OS.TBM_SETLINESIZE, 0, increment);
}
@@ -345,7 +345,7 @@ public void setIncrement (int increment) {
*/
public void setMaximum (int value) {
checkWidget ();
- int minimum = OS.SendMessage (handle, OS.TBM_GETRANGEMIN, 0, 0);
+ int minimum = (int)/*64*/OS.SendMessage (handle, OS.TBM_GETRANGEMIN, 0, 0);
if (0 <= minimum && minimum < value) {
OS.SendMessage (handle, OS.TBM_SETRANGEMAX, 1, value);
}
@@ -366,7 +366,7 @@ public void setMaximum (int value) {
*/
public void setMinimum (int value) {
checkWidget ();
- int maximum = OS.SendMessage (handle, OS.TBM_GETRANGEMAX, 0, 0);
+ int maximum = (int)/*64*/OS.SendMessage (handle, OS.TBM_GETRANGEMAX, 0, 0);
if (0 <= value && value < maximum) {
OS.SendMessage (handle, OS.TBM_SETRANGEMIN, 1, value);
}
@@ -388,8 +388,8 @@ public void setMinimum (int value) {
public void setPageIncrement (int pageIncrement) {
checkWidget ();
if (pageIncrement < 1) return;
- int minimum = OS.SendMessage (handle, OS.TBM_GETRANGEMIN, 0, 0);
- int maximum = OS.SendMessage (handle, OS.TBM_GETRANGEMAX, 0, 0);
+ int minimum = (int)/*64*/OS.SendMessage (handle, OS.TBM_GETRANGEMIN, 0, 0);
+ int maximum = (int)/*64*/OS.SendMessage (handle, OS.TBM_GETRANGEMAX, 0, 0);
if (pageIncrement > maximum - minimum) return;
OS.SendMessage (handle, OS.TBM_SETPAGESIZE, 0, pageIncrement);
OS.SendMessage (handle, OS.TBM_SETTICFREQ, pageIncrement, 0);
@@ -421,11 +421,11 @@ TCHAR windowClass () {
return TrackBarClass;
}
-int windowProc () {
+int /*long*/ windowProc () {
return TrackBarProc;
}
-LRESULT WM_PAINT (int wParam, int lParam) {
+LRESULT WM_PAINT (int /*long*/ wParam, int /*long*/ lParam) {
/*
* Bug in Windows. For some reason, when WM_CTLCOLORSTATIC
* is used to implement transparency and returns a NULL brush,
@@ -457,12 +457,12 @@ LRESULT WM_PAINT (int wParam, int lParam) {
return super.WM_PAINT (wParam, lParam);
}
-LRESULT WM_SIZE (int wParam, int lParam) {
+LRESULT WM_SIZE (int /*long*/ wParam, int /*long*/ lParam) {
if (ignoreResize) return null;
return super.WM_SIZE (wParam, lParam);
}
-LRESULT wmScrollChild (int wParam, int lParam) {
+LRESULT wmScrollChild (int /*long*/ wParam, int /*long*/ 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 c0d2fed795..f9b83efe30 100755
--- 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
@@ -179,7 +179,8 @@ void createWidget () {
}
void destroyWidget () {
- int hwnd = hwndScrollBar (), type = scrollBarType ();
+ int /*long*/ hwnd = hwndScrollBar ();
+ int type = scrollBarType ();
if (OS.IsWinCE) {
SCROLLINFO info = new SCROLLINFO ();
info.cbSize = SCROLLINFO.sizeof;
@@ -264,7 +265,7 @@ public int getMaximum () {
SCROLLINFO info = new SCROLLINFO ();
info.cbSize = SCROLLINFO.sizeof;
info.fMask = OS.SIF_RANGE;
- int hwnd = hwndScrollBar ();
+ int /*long*/ hwnd = hwndScrollBar ();
int type = scrollBarType ();
OS.GetScrollInfo (hwnd, type, info);
return info.nMax;
@@ -285,7 +286,7 @@ public int getMinimum () {
SCROLLINFO info = new SCROLLINFO ();
info.cbSize = SCROLLINFO.sizeof;
info.fMask = OS.SIF_RANGE;
- int hwnd = hwndScrollBar ();
+ int /*long*/ hwnd = hwndScrollBar ();
int type = scrollBarType ();
OS.GetScrollInfo (hwnd, type, info);
return info.nMin;
@@ -338,7 +339,7 @@ public int getSelection () {
SCROLLINFO info = new SCROLLINFO ();
info.cbSize = SCROLLINFO.sizeof;
info.fMask = OS.SIF_POS;
- int hwnd = hwndScrollBar ();
+ int /*long*/ hwnd = hwndScrollBar ();
int type = scrollBarType ();
OS.GetScrollInfo (hwnd, type, info);
return info.nPos;
@@ -391,7 +392,7 @@ public int getThumb () {
SCROLLINFO info = new SCROLLINFO ();
info.cbSize = SCROLLINFO.sizeof;
info.fMask = OS.SIF_PAGE;
- int hwnd = hwndScrollBar ();
+ int /*long*/ hwnd = hwndScrollBar ();
int type = scrollBarType ();
OS.GetScrollInfo (hwnd, type, info);
if (info.nPage != 0) --info.nPage;
@@ -420,7 +421,7 @@ public boolean getVisible () {
return (state & HIDDEN) == 0;
}
-int hwndScrollBar () {
+int /*long*/ hwndScrollBar () {
return parent.scrolledHandle ();
}
@@ -524,7 +525,8 @@ public void setEnabled (boolean enabled) {
*/
// if (OS.IsWinCE) error (SWT.ERROR_NOT_IMPLEMENTED);
if (!OS.IsWinCE) {
- int hwnd = hwndScrollBar (), type = scrollBarType ();
+ int /*long*/ hwnd = hwndScrollBar ();
+ int type = scrollBarType ();
int flags = enabled ? OS.ESB_ENABLE_BOTH : OS.ESB_DISABLE_BOTH;
OS.EnableScrollBar (hwnd, type, flags);
if (enabled) {
@@ -572,7 +574,8 @@ public void setMaximum (int value) {
if (value < 0) return;
SCROLLINFO info = new SCROLLINFO ();
info.cbSize = SCROLLINFO.sizeof;
- int hwnd = hwndScrollBar (), type = scrollBarType ();
+ int /*long*/ hwnd = hwndScrollBar ();
+ int type = scrollBarType ();
info.fMask = OS.SIF_RANGE | OS.SIF_DISABLENOSCROLL;
OS.GetScrollInfo (hwnd, type, info);
if (value - info.nMin - info.nPage < 1) return;
@@ -598,7 +601,8 @@ public void setMinimum (int value) {
if (value < 0) return;
SCROLLINFO info = new SCROLLINFO ();
info.cbSize = SCROLLINFO.sizeof;
- int hwnd = hwndScrollBar (), type = scrollBarType ();
+ int /*long*/ hwnd = hwndScrollBar ();
+ int type = scrollBarType ();
info.fMask = OS.SIF_RANGE | OS.SIF_DISABLENOSCROLL;
OS.GetScrollInfo (hwnd, type, info);
if (info.nMax - value - info.nPage < 1) return;
@@ -625,7 +629,7 @@ public void setPageIncrement (int value) {
pageIncrement = value;
}
-boolean SetScrollInfo (int hwnd, int flags, SCROLLINFO info, boolean fRedraw) {
+boolean SetScrollInfo (int /*long*/ 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,
@@ -704,7 +708,8 @@ public void setSelection (int selection) {
checkWidget();
SCROLLINFO info = new SCROLLINFO ();
info.cbSize = SCROLLINFO.sizeof;
- int hwnd = hwndScrollBar (), type = scrollBarType ();
+ int /*long*/ hwnd = hwndScrollBar ();
+ int type = scrollBarType ();
info.fMask = OS.SIF_POS;
info.nPos = selection;
SetScrollInfo (hwnd, type, info, true);
@@ -729,7 +734,8 @@ public void setThumb (int value) {
if (value < 1) return;
SCROLLINFO info = new SCROLLINFO ();
info.cbSize = SCROLLINFO.sizeof;
- int hwnd = hwndScrollBar (), type = scrollBarType ();
+ int /*long*/ hwnd = hwndScrollBar ();
+ int type = scrollBarType ();
info.fMask = OS.SIF_PAGE | OS.SIF_RANGE | OS.SIF_DISABLENOSCROLL;
OS.GetScrollInfo (hwnd, type, info);
info.nPage = value;
@@ -775,7 +781,8 @@ 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 hwnd = hwndScrollBar (), type = scrollBarType ();
+ int /*long*/ hwnd = hwndScrollBar ();
+ int type = scrollBarType ();
SetScrollInfo (hwnd, type, info, true);
}
@@ -808,7 +815,8 @@ public void setVisible (boolean visible) {
if (OS.IsWinCE) {
SCROLLINFO info = new SCROLLINFO ();
info.cbSize = SCROLLINFO.sizeof;
- int hwnd = hwndScrollBar (), type = scrollBarType ();
+ int /*long*/ hwnd = hwndScrollBar ();
+ int type = scrollBarType ();
info.fMask = OS.SIF_RANGE | OS.SIF_PAGE;
if (visible) info.fMask |= OS.SIF_DISABLENOSCROLL;
OS.GetScrollInfo (hwnd, type, info);
@@ -844,7 +852,8 @@ public void setVisible (boolean visible) {
* of the scroll bar will get the correct value.
*/
state = visible ? state & ~HIDDEN : state | HIDDEN;
- int hwnd = hwndScrollBar (), type = scrollBarType ();
+ int /*long*/ hwnd = hwndScrollBar ();
+ int type = scrollBarType ();
if (OS.ShowScrollBar (hwnd, type, visible)) {
/*
* Bug in Windows. For some reason, when the widget
@@ -873,7 +882,7 @@ public void setVisible (boolean visible) {
}
}
-LRESULT wmScrollChild (int wParam, int lParam) {
+LRESULT wmScrollChild (int /*long*/ wParam, int /*long*/ 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 13f901cd5d..9b71942dcd 100755
--- 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
@@ -72,7 +72,7 @@ public Scrollable (Composite parent, int style) {
super (parent, style);
}
-int callWindowProc (int hwnd, int msg, int wParam, int lParam) {
+int /*long*/ callWindowProc (int /*long*/ hwnd, int msg, int /*long*/ wParam, int /*long*/ lParam) {
if (handle == 0) return 0;
return OS.DefWindowProc (hwnd, msg, wParam, lParam);
}
@@ -106,7 +106,7 @@ int callWindowProc (int hwnd, int msg, int wParam, int lParam) {
*/
public Rectangle computeTrim (int x, int y, int width, int height) {
checkWidget ();
- int scrolledHandle = scrolledHandle ();
+ int /*long*/ scrolledHandle = scrolledHandle ();
RECT rect = new RECT ();
OS.SetRect (rect, x, y, x + width, y + height);
int bits1 = OS.GetWindowLong (scrolledHandle, OS.GWL_STYLE);
@@ -151,7 +151,7 @@ public Rectangle getClientArea () {
checkWidget ();
forceResize ();
RECT rect = new RECT ();
- int scrolledHandle = scrolledHandle ();
+ int /*long*/ scrolledHandle = scrolledHandle ();
OS.GetClientRect (scrolledHandle, rect);
int x = rect.left, y = rect.top;
int width = rect.right - rect.left;
@@ -209,7 +209,7 @@ void releaseChildren (boolean destroy) {
super.releaseChildren (destroy);
}
-int scrolledHandle () {
+int /*long*/ scrolledHandle () {
return handle;
}
@@ -238,11 +238,11 @@ TCHAR windowClass () {
return display.windowClass;
}
-int windowProc () {
+int /*long*/ windowProc () {
return display.windowProc;
}
-LRESULT WM_HSCROLL (int wParam, int lParam) {
+LRESULT WM_HSCROLL (int /*long*/ wParam, int /*long*/ lParam) {
LRESULT result = super.WM_HSCROLL (wParam, lParam);
if (result != null) return result;
@@ -259,7 +259,7 @@ LRESULT WM_HSCROLL (int wParam, int lParam) {
return result;
}
-LRESULT WM_MOUSEWHEEL (int wParam, int lParam) {
+LRESULT WM_MOUSEWHEEL (int /*long*/ wParam, int /*long*/ lParam) {
LRESULT result = super.WM_MOUSEWHEEL (wParam, lParam);
if (result != null) return result;
@@ -308,7 +308,7 @@ LRESULT WM_MOUSEWHEEL (int wParam, int lParam) {
*/
int vPosition = verticalBar == null ? 0 : verticalBar.getSelection ();
int hPosition = horizontalBar == null ? 0 : horizontalBar.getSelection ();
- int code = callWindowProc (handle, OS.WM_MOUSEWHEEL, wParam, lParam);
+ int /*long*/ code = callWindowProc (handle, OS.WM_MOUSEWHEEL, wParam, lParam);
if (verticalBar != null) {
int position = verticalBar.getSelection ();
if (position != vPosition) {
@@ -328,15 +328,15 @@ LRESULT WM_MOUSEWHEEL (int wParam, int lParam) {
return new LRESULT (code);
}
-LRESULT WM_SIZE (int wParam, int lParam) {
- int code = callWindowProc (handle, OS.WM_SIZE, wParam, lParam);
+LRESULT WM_SIZE (int /*long*/ wParam, int /*long*/ lParam) {
+ int /*long*/ 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 wParam, int lParam) {
+LRESULT WM_VSCROLL (int /*long*/ wParam, int /*long*/ lParam) {
LRESULT result = super.WM_VSCROLL (wParam, lParam);
if (result != null) return result;
/*
@@ -352,7 +352,7 @@ LRESULT WM_VSCROLL (int wParam, int lParam) {
return result;
}
-LRESULT wmScroll (ScrollBar bar, boolean update, int hwnd, int msg, int wParam, int lParam) {
+LRESULT wmScroll (ScrollBar bar, boolean update, int /*long*/ hwnd, int msg, int /*long*/ wParam, int /*long*/ lParam) {
LRESULT result = null;
if (update) {
int type = msg == OS.WM_HSCROLL ? OS.SB_HORZ : OS.SB_VERT;
@@ -397,7 +397,7 @@ LRESULT wmScroll (ScrollBar bar, boolean update, int hwnd, int msg, int wParam,
}
OS.SetScrollInfo (hwnd, type, info, true);
} else {
- int code = callWindowProc (hwnd, msg, wParam, lParam);
+ int /*long*/ 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 4224633475..2851f3b17f 100755
--- 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
@@ -115,18 +115,18 @@ import org.eclipse.swt.events.*;
public class Shell extends Decorations {
Menu activeMenu;
ToolTip [] toolTips;
- int hIMC, hwndMDIClient, lpstrTip, toolTipHandle, balloonTipHandle;
+ int /*long*/ hIMC, hwndMDIClient, lpstrTip, toolTipHandle, balloonTipHandle;
int minWidth = SWT.DEFAULT, minHeight = SWT.DEFAULT;
- int [] brushes;
+ int /*long*/ [] brushes;
boolean showWithParent;
String toolTitle, balloonTitle;
- int toolIcon, balloonIcon;
- int windowProc;
+ int /*long*/ toolIcon, balloonIcon;
+ int /*long*/ windowProc;
Control lastActive, lockToolTipControl;
SHACTIVATEINFO psai;
Region region;
- static /*final*/ int ToolTipProc;
- static final int DialogProc;
+ static /*final*/ int /*long*/ ToolTipProc;
+ static final int /*long*/ DialogProc;
static final TCHAR DialogClass = new TCHAR (0, OS.IsWinCE ? "Dialog" : "#32770", true);
final static int [] SYSTEM_COLORS = {
OS.COLOR_BTNFACE,
@@ -265,7 +265,7 @@ public Shell (Display display, int style) {
this (display, null, style, 0, false);
}
-Shell (Display display, Shell parent, int style, int handle, boolean embedded) {
+Shell (Display display, Shell parent, int style, int /*long*/ handle, boolean embedded) {
super ();
checkSubclass ();
if (display == null) display = Display.getCurrent ();
@@ -377,11 +377,11 @@ public Shell (Shell parent, int style) {
* @param handle the handle for the shell
* @return a new shell object containing the specified display and handle
*/
-public static Shell win32_new (Display display, int handle) {
+public static Shell win32_new (Display display, int /*long*/ handle) {
return new Shell (display, null, SWT.NO_TRIM, handle, true);
}
-public static Shell internal_new (Display display, int handle) {
+public static Shell internal_new (Display display, int /*long*/ handle) {
return new Shell (display, null, SWT.NO_TRIM, handle, false);
}
@@ -425,12 +425,12 @@ public void addShellListener (ShellListener listener) {
addListener (SWT.Deactivate, typedListener);
}
-int balloonTipHandle () {
+int /*long*/ balloonTipHandle () {
if (balloonTipHandle == 0) createBalloonTipHandle ();
return balloonTipHandle;
}
-int callWindowProc (int hwnd, int msg, int wParam, int lParam) {
+int /*long*/ callWindowProc (int /*long*/ hwnd, int msg, int /*long*/ wParam, int /*long*/ lParam) {
if (handle == 0) return 0;
if (hwnd == toolTipHandle || hwnd == balloonTipHandle) {
return OS.CallWindowProc (ToolTipProc, hwnd, msg, wParam, lParam);
@@ -489,7 +489,7 @@ void createBalloonTipHandle () {
null);
if (balloonTipHandle == 0) error (SWT.ERROR_NO_HANDLES);
if (ToolTipProc == 0) {
- ToolTipProc = OS.GetWindowLong (balloonTipHandle, OS.GWL_WNDPROC);
+ ToolTipProc = OS.GetWindowLongPtr (balloonTipHandle, OS.GWLP_WNDPROC);
}
/*
* Feature in Windows. Despite the fact that the
@@ -500,7 +500,7 @@ void createBalloonTipHandle () {
*/
OS.SendMessage (balloonTipHandle, OS.TTM_SETMAXTIPWIDTH, 0, 0x7FFF);
display.addControl (balloonTipHandle, this);
- OS.SetWindowLong (balloonTipHandle, OS.GWL_WNDPROC, display.windowProc);
+ OS.SetWindowLongPtr (balloonTipHandle, OS.GWLP_WNDPROC, display.windowProc);
}
void createHandle () {
@@ -597,7 +597,7 @@ void createToolTipHandle () {
null);
if (toolTipHandle == 0) error (SWT.ERROR_NO_HANDLES);
if (ToolTipProc == 0) {
- ToolTipProc = OS.GetWindowLong (toolTipHandle, OS.GWL_WNDPROC);
+ ToolTipProc = OS.GetWindowLongPtr (toolTipHandle, OS.GWLP_WNDPROC);
}
/*
* Feature in Windows. Despite the fact that the
@@ -608,7 +608,7 @@ void createToolTipHandle () {
*/
OS.SendMessage (toolTipHandle, OS.TTM_SETMAXTIPWIDTH, 0, 0x7FFF);
display.addControl (toolTipHandle, this);
- OS.SetWindowLong (toolTipHandle, OS.GWL_WNDPROC, display.windowProc);
+ OS.SetWindowLongPtr (toolTipHandle, OS.GWLP_WNDPROC, display.windowProc);
}
void deregister () {
@@ -668,7 +668,7 @@ void enableWidget (boolean enabled) {
}
}
-int findBrush (int value, int lbStyle) {
+int /*long*/ findBrush (int /*long*/ value, int lbStyle) {
if (lbStyle == OS.BS_SOLID) {
for (int i=0; i<SYSTEM_COLORS.length; i++) {
if (value == OS.GetSysColor (SYSTEM_COLORS [i])) {
@@ -676,10 +676,10 @@ int findBrush (int value, int lbStyle) {
}
}
}
- if (brushes == null) brushes = new int [BRUSHES_SIZE];
+ if (brushes == null) brushes = new int /*long*/ [BRUSHES_SIZE];
LOGBRUSH logBrush = new LOGBRUSH ();
for (int i=0; i<brushes.length; i++) {
- int hBrush = brushes [i];
+ int /*long*/ hBrush = brushes [i];
if (hBrush == 0) break;
OS.GetObject (hBrush, LOGBRUSH.sizeof, logBrush);
switch (logBrush.lbStyle) {
@@ -696,12 +696,12 @@ int findBrush (int value, int lbStyle) {
}
}
int length = brushes.length;
- int hBrush = brushes [--length];
+ int /*long*/ hBrush = brushes [--length];
if (hBrush != 0) OS.DeleteObject (hBrush);
System.arraycopy (brushes, 0, brushes, 1, length);
switch (lbStyle) {
case OS.BS_SOLID:
- hBrush = OS.CreateSolidBrush (value);
+ hBrush = OS.CreateSolidBrush ((int)/*64*/value);
break;
case OS.BS_PATTERN:
hBrush = OS.CreatePatternBrush (value);
@@ -722,9 +722,10 @@ Control findThemeControl () {
return null;
}
-ToolTip findToolTip (int id) {
+//TODO - should ids be long
+ToolTip findToolTip (int /*long*/ _id) {
if (toolTips == null) return null;
- id = id - Display.ID_START;
+ int id = (int)/*64*/_id - Display.ID_START;
return 0 <= id && id < toolTips.length ? toolTips [id] : null;
}
@@ -738,7 +739,7 @@ void fixActiveShell () {
* application). The fix is to activate the disabled parent
* shell before disposing or hiding the active shell.
*/
- int hwndParent = OS.GetParent (handle);
+ int /*long*/ hwndParent = OS.GetParent (handle);
if (hwndParent != 0 && handle == OS.GetActiveWindow ()) {
if (!OS.IsWindowEnabled (hwndParent) && OS.IsWindowVisible (hwndParent)) {
OS.SetActiveWindow (hwndParent);
@@ -836,7 +837,7 @@ ToolTip getCurrentToolTip () {
return null;
}
-ToolTip getCurrentToolTip (int hwndToolTip) {
+ToolTip getCurrentToolTip (int /*long*/ hwndToolTip) {
if (hwndToolTip == 0) return null;
if (OS.SendMessage (hwndToolTip, OS.TTM_GETCURRENTTOOL, 0, 0) != 0) {
TOOLINFO lpti = new TOOLINFO ();
@@ -873,7 +874,7 @@ public boolean getEnabled () {
public int getImeInputMode () {
checkWidget ();
if (!OS.IsDBLocale) return 0;
- int hIMC = OS.ImmGetContext (handle);
+ int /*long*/ 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);
@@ -1022,7 +1023,7 @@ public boolean isVisible () {
return getVisible ();
}
-int hwndMDIClient () {
+int /*long*/ hwndMDIClient () {
if (hwndMDIClient == 0) {
int widgetStyle = OS.MDIS_ALLCHILDSTYLES | OS.WS_CHILD | OS.WS_CLIPCHILDREN | OS.WS_CLIPSIBLINGS;
hwndMDIClient = OS.CreateWindowEx (
@@ -1149,7 +1150,7 @@ void releaseWidget () {
activeMenu = null;
display.clearModal (this);
if (lpstrTip != 0) {
- int hHeap = OS.GetProcessHeap ();
+ int /*long*/ hHeap = OS.GetProcessHeap ();
OS.HeapFree (hHeap, 0, lpstrTip);
}
lpstrTip = 0;
@@ -1196,9 +1197,9 @@ public void removeShellListener (ShellListener listener) {
eventTable.unhook (SWT.Deactivate, listener);
}
-LRESULT selectPalette (int hPalette) {
- int hDC = OS.GetDC (handle);
- int hOld = OS.SelectPalette (hDC, hPalette, false);
+LRESULT selectPalette (int /*long*/ hPalette) {
+ int /*long*/ hDC = OS.GetDC (handle);
+ int /*long*/ hOld = OS.SelectPalette (hDC, hPalette, false);
int result = OS.RealizePalette (hDC);
if (result > 0) {
OS.InvalidateRect (handle, null, true);
@@ -1308,7 +1309,7 @@ public void setImeInputMode (int mode) {
checkWidget ();
if (!OS.IsDBLocale) return;
boolean imeOn = mode != SWT.NONE && mode != SWT.ROMAN;
- int hIMC = OS.ImmGetContext (handle);
+ int /*long*/ hIMC = OS.ImmGetContext (handle);
OS.ImmSetOpenStatus (hIMC, imeOn);
if (imeOn) {
int [] lpfdwConversion = new int [1], lpfdwSentence = new int [1];
@@ -1406,7 +1407,7 @@ public void setMinimumSize (Point size) {
}
void setItemEnabled (int cmd, boolean enabled) {
- int hMenu = OS.GetSystemMenu (handle, false);
+ int /*long*/ hMenu = OS.GetSystemMenu (handle, false);
if (hMenu == 0) return;
int flags = OS.MF_ENABLED;
if (!enabled) flags = OS.MF_DISABLED | OS.MF_GRAYED;
@@ -1441,7 +1442,7 @@ public void setRegion (Region region) {
checkWidget ();
if ((style & SWT.NO_TRIM) == 0) return;
if (region != null && region.isDisposed()) error (SWT.ERROR_INVALID_ARGUMENT);
- int hRegion = 0;
+ int /*long*/ hRegion = 0;
if (region != null) {
hRegion = OS.CreateRectRgn (0, 0, 0, 0);
OS.CombineRgn (hRegion, region.handle, hRegion, OS.RGN_OR);
@@ -1450,13 +1451,13 @@ public void setRegion (Region region) {
this.region = region;
}
-void setToolTipText (int hwnd, String text) {
+void setToolTipText (int /*long*/ hwnd, String text) {
if (OS.IsWinCE) return;
TOOLINFO lpti = new TOOLINFO ();
lpti.cbSize = TOOLINFO.sizeof;
lpti.hwnd = handle;
lpti.uId = hwnd;
- int hwndToolTip = toolTipHandle ();
+ int /*long*/ hwndToolTip = toolTipHandle ();
if (text == null) {
OS.SendMessage (hwndToolTip, OS.TTM_DELTOOL, 0, lpti);
} else {
@@ -1478,7 +1479,7 @@ void setToolTipText (NMTTDISPINFO lpnmtdi, byte [] buffer) {
* shell trimmings.
*/
if (!hasCursor ()) return;
- int hHeap = OS.GetProcessHeap ();
+ int /*long*/ hHeap = OS.GetProcessHeap ();
if (lpstrTip != 0) OS.HeapFree (hHeap, 0, lpstrTip);
int byteCount = buffer.length;
lpstrTip = OS.HeapAlloc (hHeap, OS.HEAP_ZERO_MEMORY, byteCount);
@@ -1494,7 +1495,7 @@ void setToolTipText (NMTTDISPINFO lpnmtdi, char [] buffer) {
* shell trimmings.
*/
if (!hasCursor ()) return;
- int hHeap = OS.GetProcessHeap ();
+ int /*long*/ 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);
@@ -1502,7 +1503,7 @@ void setToolTipText (NMTTDISPINFO lpnmtdi, char [] buffer) {
lpnmtdi.lpszText = lpstrTip;
}
-void setToolTipTitle (int hwndToolTip, String text, int icon) {
+void setToolTipTitle (int /*long*/ 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
@@ -1571,7 +1572,7 @@ public void setVisible (boolean visible) {
bringToTop ();
if (isDisposed ()) return;
}
- int hwndShell = OS.GetActiveWindow ();
+ int /*long*/ hwndShell = OS.GetActiveWindow ();
if (hwndShell == 0) {
if (parent != null) hwndShell = parent.handle;
}
@@ -1608,17 +1609,17 @@ public void setVisible (boolean visible) {
void subclass () {
super.subclass ();
if (ToolTipProc != 0) {
- int newProc = display.windowProc;
+ int /*long*/ newProc = display.windowProc;
if (toolTipHandle != 0) {
- OS.SetWindowLong (toolTipHandle, OS.GWL_WNDPROC, newProc);
+ OS.SetWindowLongPtr (toolTipHandle, OS.GWLP_WNDPROC, newProc);
}
if (balloonTipHandle != 0) {
- OS.SetWindowLong (balloonTipHandle, OS.GWL_WNDPROC, newProc);
+ OS.SetWindowLongPtr (balloonTipHandle, OS.GWLP_WNDPROC, newProc);
}
}
}
-int toolTipHandle () {
+int /*long*/ toolTipHandle () {
if (toolTipHandle == 0) createToolTipHandle ();
return toolTipHandle;
}
@@ -1640,10 +1641,10 @@ void unsubclass () {
super.unsubclass ();
if (ToolTipProc != 0) {
if (toolTipHandle != 0) {
- OS.SetWindowLong (toolTipHandle, OS.GWL_WNDPROC, ToolTipProc);
+ OS.SetWindowLongPtr (toolTipHandle, OS.GWLP_WNDPROC, ToolTipProc);
}
if (toolTipHandle != 0) {
- OS.SetWindowLong (toolTipHandle, OS.GWL_WNDPROC, ToolTipProc);
+ OS.SetWindowLongPtr (toolTipHandle, OS.GWLP_WNDPROC, ToolTipProc);
}
}
}
@@ -1660,7 +1661,7 @@ CREATESTRUCT widgetCreateStruct () {
return null;
}
-int widgetParent () {
+int /*long*/ widgetParent () {
if (handle != 0) return handle;
return parent != null ? parent.handle : 0;
}
@@ -1717,7 +1718,7 @@ TCHAR windowClass () {
return parent != null ? DialogClass : super.windowClass ();
}
-int windowProc () {
+int /*long*/ windowProc () {
if (windowProc != 0) return windowProc;
if (OS.IsSP) return DialogProc;
if ((style & SWT.TOOL) != 0) {
@@ -1727,7 +1728,7 @@ int windowProc () {
return parent != null ? DialogProc : super.windowProc ();
}
-int windowProc (int hwnd, int msg, int wParam, int lParam) {
+int /*long*/ windowProc (int /*long*/ hwnd, int msg, int /*long*/ wParam, int /*long*/ lParam) {
if (handle == 0) return 0;
if (hwnd == toolTipHandle || hwnd == balloonTipHandle) {
switch (msg) {
@@ -1792,7 +1793,7 @@ int widgetStyle () {
return bits | OS.WS_OVERLAPPED | OS.WS_CAPTION;
}
-LRESULT WM_ACTIVATE (int wParam, int lParam) {
+LRESULT WM_ACTIVATE (int /*long*/ wParam, int /*long*/ lParam) {
if (OS.IsPPC) {
/*
* Note: this does not work when we get WM_ACTIVATE prior
@@ -1800,7 +1801,7 @@ LRESULT WM_ACTIVATE (int wParam, int lParam) {
*/
if (hooks (SWT.HardKeyDown) || hooks (SWT.HardKeyUp)) {
int fActive = OS.LOWORD (wParam);
- int hwnd = fActive != 0 ? handle : 0;
+ int /*long*/ hwnd = fActive != 0 ? handle : 0;
for (int bVk=OS.VK_APP1; bVk<=OS.VK_APP6; bVk++) {
OS.SHSetAppKeyWndAssoc ((byte) bVk, hwnd);
}
@@ -1840,7 +1841,7 @@ LRESULT WM_ACTIVATE (int wParam, int lParam) {
return parent != null ? LRESULT.ZERO : result;
}
-LRESULT WM_COMMAND (int wParam, int lParam) {
+LRESULT WM_COMMAND (int /*long*/ wParam, int /*long*/ lParam) {
if (OS.IsPPC) {
/*
* Note in WinCE PPC: Close the Shell when the "Done Button" has
@@ -1865,12 +1866,12 @@ LRESULT WM_COMMAND (int wParam, int lParam) {
*/
if (OS.IsPPC || OS.IsSP) {
if (menuBar != null) {
- int hwndCB = menuBar.hwndCB;
+ int /*long*/ hwndCB = menuBar.hwndCB;
if (lParam != 0 && hwndCB != 0) {
if (lParam == hwndCB) {
return super.WM_COMMAND (wParam, 0);
} else {
- int hwndChild = OS.GetWindow (hwndCB, OS.GW_CHILD);
+ int /*long*/ hwndChild = OS.GetWindow (hwndCB, OS.GW_CHILD);
if (lParam == hwndChild) return super.WM_COMMAND (wParam, 0);
}
}
@@ -1879,7 +1880,7 @@ LRESULT WM_COMMAND (int wParam, int lParam) {
return super.WM_COMMAND (wParam, lParam);
}
-LRESULT WM_DESTROY (int wParam, int lParam) {
+LRESULT WM_DESTROY (int /*long*/ wParam, int /*long*/ lParam) {
LRESULT result = super.WM_DESTROY (wParam, lParam);
/*
* When the shell is a WS_CHILD window of a non-SWT
@@ -1895,7 +1896,7 @@ LRESULT WM_DESTROY (int wParam, int lParam) {
return result;
}
-LRESULT WM_ERASEBKGND (int wParam, int lParam) {
+LRESULT WM_ERASEBKGND (int /*long*/ wParam, int /*long*/ lParam) {
LRESULT result = super.WM_ERASEBKGND (wParam, lParam);
if (result != null) return result;
/*
@@ -1913,7 +1914,7 @@ LRESULT WM_ERASEBKGND (int wParam, int lParam) {
return result;
}
-LRESULT WM_ENTERIDLE (int wParam, int lParam) {
+LRESULT WM_ENTERIDLE (int /*long*/ wParam, int /*long*/ lParam) {
LRESULT result = super.WM_ENTERIDLE (wParam, lParam);
if (result != null) return result;
if (OS.IsWinCE && display.runMessages) {
@@ -1922,7 +1923,7 @@ LRESULT WM_ENTERIDLE (int wParam, int lParam) {
return result;
}
-LRESULT WM_GETMINMAXINFO (int wParam, int lParam) {
+LRESULT WM_GETMINMAXINFO (int /*long*/ wParam, int /*long*/ lParam) {
LRESULT result = super.WM_GETMINMAXINFO (wParam, lParam);
if (result != null) return result;
if (minWidth != SWT.DEFAULT || minHeight != SWT.DEFAULT) {
@@ -1936,7 +1937,7 @@ LRESULT WM_GETMINMAXINFO (int wParam, int lParam) {
return result;
}
-LRESULT WM_MOUSEACTIVATE (int wParam, int lParam) {
+LRESULT WM_MOUSEACTIVATE (int /*long*/ wParam, int /*long*/ lParam) {
LRESULT result = super.WM_MOUSEACTIVATE (wParam, lParam);
if (result != null) return result;
@@ -1990,7 +1991,7 @@ LRESULT WM_MOUSEACTIVATE (int wParam, int lParam) {
int pos = OS.GetMessagePos ();
OS.POINTSTOPOINT (pt, pos);
}
- int hwnd = OS.WindowFromPoint (pt);
+ int /*long*/ hwnd = OS.WindowFromPoint (pt);
if (hwnd == 0) return null;
Control control = display.findControl (hwnd);
@@ -2015,7 +2016,7 @@ LRESULT WM_MOUSEACTIVATE (int wParam, int lParam) {
return null;
}
-LRESULT WM_MOVE (int wParam, int lParam) {
+LRESULT WM_MOVE (int /*long*/ wParam, int /*long*/ lParam) {
LRESULT result = super.WM_MOVE (wParam, lParam);
if (result != null) return result;
ToolTip tip = getCurrentToolTip ();
@@ -2023,7 +2024,7 @@ LRESULT WM_MOVE (int wParam, int lParam) {
return result;
}
-LRESULT WM_NCACTIVATE (int wParam, int lParam) {
+LRESULT WM_NCACTIVATE (int /*long*/ wParam, int /*long*/ lParam) {
Display display = this.display;
LRESULT result = super.WM_NCACTIVATE (wParam, lParam);
if (display.isXMouseActive ()) {
@@ -2039,23 +2040,23 @@ LRESULT WM_NCACTIVATE (int wParam, int lParam) {
return result;
}
-LRESULT WM_NCHITTEST (int wParam, int lParam) {
+LRESULT WM_NCHITTEST (int /*long*/ wParam, int /*long*/ lParam) {
if (!OS.IsWindowEnabled (handle)) return null;
if (!isEnabled () || !isActive ()) {
if (!Display.TrimEnabled) return new LRESULT (OS.HTNOWHERE);
- int hittest = callWindowProc (handle, OS.WM_NCHITTEST, wParam, lParam);
+ int /*long*/ 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 hittest = callWindowProc (handle, OS.WM_NCHITTEST, wParam, lParam);
+ int /*long*/ 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 wParam, int lParam) {
+LRESULT WM_NCLBUTTONDOWN (int /*long*/ wParam, int /*long*/ lParam) {
LRESULT result = super.WM_NCLBUTTONDOWN (wParam, lParam);
if (result != null) return result;
/*
@@ -2067,11 +2068,11 @@ LRESULT WM_NCLBUTTONDOWN (int wParam, int lParam) {
*/
if (!display.ignoreRestoreFocus) return result;
Display display = this.display;
- int hwndActive = 0;
+ int /*long*/ hwndActive = 0;
boolean fixActive = OS.IsWin95 && display.lastHittest == OS.HTCAPTION;
if (fixActive) hwndActive = OS.SetActiveWindow (handle);
display.lockActiveWindow = true;
- int code = callWindowProc (handle, OS.WM_NCLBUTTONDOWN, wParam, lParam);
+ int /*long*/ code = callWindowProc (handle, OS.WM_NCLBUTTONDOWN, wParam, lParam);
display.lockActiveWindow = false;
if (fixActive) OS.SetActiveWindow (hwndActive);
Control focusControl = display.lastHittestControl;
@@ -2083,21 +2084,21 @@ LRESULT WM_NCLBUTTONDOWN (int wParam, int lParam) {
return new LRESULT (code);
}
-LRESULT WM_PALETTECHANGED (int wParam, int lParam) {
+LRESULT WM_PALETTECHANGED (int /*long*/ wParam, int /*long*/ lParam) {
if (wParam != handle) {
- int hPalette = display.hPalette;
+ int /*long*/ hPalette = display.hPalette;
if (hPalette != 0) return selectPalette (hPalette);
}
return super.WM_PALETTECHANGED (wParam, lParam);
}
-LRESULT WM_QUERYNEWPALETTE (int wParam, int lParam) {
- int hPalette = display.hPalette;
+LRESULT WM_QUERYNEWPALETTE (int /*long*/ wParam, int /*long*/ lParam) {
+ int /*long*/ hPalette = display.hPalette;
if (hPalette != 0) return selectPalette (hPalette);
return super.WM_QUERYNEWPALETTE (wParam, lParam);
}
-LRESULT WM_SETCURSOR (int wParam, int lParam) {
+LRESULT WM_SETCURSOR (int /*long*/ wParam, int /*long*/ lParam) {
/*
* Feature in Windows. When the shell is disabled
* by a Windows standard dialog (like a MessageBox
@@ -2111,7 +2112,7 @@ LRESULT WM_SETCURSOR (int wParam, int lParam) {
if (!Display.TrimEnabled) {
Shell modalShell = display.getModalShell ();
if (modalShell != null && !isActive ()) {
- int hwndModal = modalShell.handle;
+ int /*long*/ hwndModal = modalShell.handle;
if (OS.IsWindowEnabled (hwndModal)) {
OS.SetActiveWindow (hwndModal);
}
@@ -2119,7 +2120,7 @@ LRESULT WM_SETCURSOR (int wParam, int lParam) {
}
if (!OS.IsWindowEnabled (handle)) {
if (!OS.IsWinCE) {
- int hwndPopup = OS.GetLastActivePopup (handle);
+ int /*long*/ hwndPopup = OS.GetLastActivePopup (handle);
if (hwndPopup != 0 && hwndPopup != handle) {
if (display.getControl (hwndPopup) == null) {
if (OS.IsWindowEnabled (hwndPopup)) {
@@ -2169,7 +2170,7 @@ LRESULT WM_SETCURSOR (int wParam, int lParam) {
return super.WM_SETCURSOR (wParam, lParam);
}
-LRESULT WM_SETTINGCHANGE (int wParam, int lParam) {
+LRESULT WM_SETTINGCHANGE (int /*long*/ wParam, int /*long*/ lParam) {
LRESULT result = super.WM_SETTINGCHANGE (wParam, lParam);
if (result != null) return result;
if (OS.IsPPC) {
@@ -2194,7 +2195,7 @@ LRESULT WM_SETTINGCHANGE (int wParam, int lParam) {
return result;
}
-LRESULT WM_SHOWWINDOW (int wParam, int lParam) {
+LRESULT WM_SHOWWINDOW (int /*long*/ wParam, int /*long*/ lParam) {
LRESULT result = super.WM_SHOWWINDOW (wParam, lParam);
if (result != null) return result;
/*
@@ -2216,7 +2217,7 @@ LRESULT WM_SHOWWINDOW (int wParam, int lParam) {
return result;
}
-LRESULT WM_SYSCOMMAND (int wParam, int lParam) {
+LRESULT WM_SYSCOMMAND (int /*long*/ wParam, int /*long*/ lParam) {
LRESULT result = super.WM_SYSCOMMAND (wParam, lParam);
if (result != null) return result;
/*
@@ -2237,7 +2238,7 @@ LRESULT WM_SYSCOMMAND (int wParam, int lParam) {
* this at this time.
*/
if (OS.IsWinNT) {
- int cmd = wParam & 0xFFF0;
+ int cmd = (int)/*64*/wParam & 0xFFF0;
switch (cmd) {
case OS.SC_MINIMIZE:
long memory = Runtime.getRuntime ().totalMemory ();
@@ -2250,7 +2251,7 @@ LRESULT WM_SYSCOMMAND (int wParam, int lParam) {
return result;
}
-LRESULT WM_WINDOWPOSCHANGING (int wParam, int lParam) {
+LRESULT WM_WINDOWPOSCHANGING (int /*long*/ wParam, int /*long*/ 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 ee0ac6a443..0acfd3f309 100755
--- 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
@@ -67,7 +67,7 @@ import org.eclipse.swt.events.*;
public class Slider extends Control {
int increment, pageIncrement;
boolean ignoreFocus;
- static final int ScrollBarProc;
+ static final int /*long*/ ScrollBarProc;
static final TCHAR ScrollBarClass = new TCHAR (0, "SCROLLBAR", true);
static {
WNDCLASS lpWndClass = new WNDCLASS ();
@@ -148,7 +148,7 @@ public void addSelectionListener (SelectionListener listener) {
addListener (SWT.DefaultSelection,typedListener);
}
-int callWindowProc (int hwnd, int msg, int wParam, int lParam) {
+int /*long*/ callWindowProc (int /*long*/ hwnd, int msg, int /*long*/ wParam, int /*long*/ lParam) {
if (handle == 0) return 0;
/*
* Feature in Windows. Windows runs a modal message
@@ -470,7 +470,7 @@ public void setPageIncrement (int value) {
pageIncrement = value;
}
-boolean SetScrollInfo (int hwnd, int flags, SCROLLINFO info, boolean fRedraw) {
+boolean SetScrollInfo (int /*long*/ hwnd, int flags, SCROLLINFO info, boolean fRedraw) {
/*
* Feature in Windows. Using SIF_DISABLENOSCROLL,
* SetScrollInfo () can change enabled and disabled
@@ -619,11 +619,11 @@ TCHAR windowClass () {
return ScrollBarClass;
}
-int windowProc () {
+int /*long*/ windowProc () {
return ScrollBarProc;
}
-LRESULT WM_KEYDOWN (int wParam, int lParam) {
+LRESULT WM_KEYDOWN (int /*long*/ wParam, int /*long*/ lParam) {
LRESULT result = super.WM_KEYDOWN (wParam, lParam);
if (result != null) return result;
if ((style & SWT.VERTICAL) != 0) return result;
@@ -637,11 +637,11 @@ LRESULT WM_KEYDOWN (int wParam, int lParam) {
* in the operating system.
*/
if ((style & SWT.MIRRORED) != 0) {
- switch (wParam) {
+ switch ((int)/*64*/wParam) {
case OS.VK_LEFT:
case OS.VK_RIGHT: {
int key = wParam == OS.VK_LEFT ? OS.VK_RIGHT : OS.VK_LEFT;
- int code = callWindowProc (handle, OS.WM_KEYDOWN, key, lParam);
+ int /*long*/ code = callWindowProc (handle, OS.WM_KEYDOWN, key, lParam);
return new LRESULT (code);
}
}
@@ -649,7 +649,7 @@ LRESULT WM_KEYDOWN (int wParam, int lParam) {
return result;
}
-LRESULT WM_LBUTTONDBLCLK (int wParam, int lParam) {
+LRESULT WM_LBUTTONDBLCLK (int /*long*/ wParam, int /*long*/ lParam) {
/*
* Feature in Windows. Windows uses the WS_TABSTOP
* style for the scroll bar to decide that focus
@@ -682,7 +682,7 @@ LRESULT WM_LBUTTONDBLCLK (int wParam, int lParam) {
return result;
}
-LRESULT WM_LBUTTONDOWN (int wParam, int lParam) {
+LRESULT WM_LBUTTONDOWN (int /*long*/ wParam, int /*long*/ lParam) {
/*
* Feature in Windows. Windows uses the WS_TABSTOP
* style for the scroll bar to decide that focus
@@ -715,12 +715,12 @@ LRESULT WM_LBUTTONDOWN (int wParam, int lParam) {
return result;
}
-LRESULT WM_SETFOCUS (int wParam, int lParam) {
+LRESULT WM_SETFOCUS (int /*long*/ wParam, int /*long*/ lParam) {
if (ignoreFocus) return null;
return super.WM_SETFOCUS (wParam, lParam);
}
-LRESULT wmScrollChild (int wParam, int lParam) {
+LRESULT wmScrollChild (int /*long*/ wParam, int /*long*/ 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 83ce114ca4..ebdd71f729 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
@@ -37,12 +37,12 @@ import org.eclipse.swt.events.*;
* @since 3.1
*/
public class Spinner extends Composite {
- int hwndText, hwndUpDown;
+ int /*long*/ hwndText, hwndUpDown;
boolean ignoreModify;
int pageIncrement, digits;
- static final int EditProc;
+ static final int /*long*/ EditProc;
static final TCHAR EditClass = new TCHAR (0, "EDIT", true);
- static final int UpDownProc;
+ static final int /*long*/ UpDownProc;
static final TCHAR UpDownClass = new TCHAR (0, OS.UPDOWN_CLASS, true);
static {
WNDCLASS lpWndClass = new WNDCLASS ();
@@ -85,7 +85,7 @@ public Spinner (Composite parent, int style) {
super (parent, checkStyle (style));
}
-int callWindowProc (int hwnd, int msg, int wParam, int lParam) {
+int /*long*/ callWindowProc (int /*long*/ hwnd, int msg, int /*long*/ wParam, int /*long*/ lParam) {
if (handle == 0) return 0;
if (hwnd == hwndText) {
return OS.CallWindowProc (EditProc, hwnd, msg, wParam, lParam);
@@ -107,7 +107,7 @@ static int checkStyle (int style) {
return style & ~(SWT.H_SCROLL | SWT.V_SCROLL);
}
-boolean checkHandle (int hwnd) {
+boolean checkHandle (int /*long*/ hwnd) {
return hwnd == handle || hwnd == hwndText || hwnd == hwndUpDown;
}
@@ -118,7 +118,7 @@ protected void checkSubclass () {
void createHandle () {
super.createHandle ();
state &= ~(CANVAS | THEME_BACKGROUND);
- int hInstance = OS.GetModuleHandle (null);
+ int /*long*/ 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;
@@ -136,7 +136,7 @@ void createHandle () {
hInstance,
null);
if (hwndText == 0) error (SWT.ERROR_NO_HANDLES);
- OS.SetWindowLong (hwndText, OS.GWL_ID, hwndText);
+ OS.SetWindowLongPtr (hwndText, OS.GWLP_ID, hwndText);
int upDownStyle = OS.WS_CHILD | OS.WS_VISIBLE | OS.UDS_AUTOBUDDY;
if ((style & SWT.WRAP) != 0) upDownStyle |= OS.UDS_WRAP;
if ((style & SWT.BORDER) != 0) {
@@ -159,9 +159,9 @@ void createHandle () {
if (hwndUpDown == 0) error (SWT.ERROR_NO_HANDLES);
int flags = OS.SWP_NOSIZE | OS.SWP_NOMOVE | OS.SWP_NOACTIVATE;
SetWindowPos (hwndText, hwndUpDown, 0, 0, 0, 0, flags);
- OS.SetWindowLong (hwndUpDown, OS.GWL_ID, hwndUpDown);
+ OS.SetWindowLongPtr (hwndUpDown, OS.GWLP_ID, hwndUpDown);
if (OS.IsDBLocale) {
- int hIMC = OS.ImmGetContext (handle);
+ int /*long*/ hIMC = OS.ImmGetContext (handle);
OS.ImmAssociateContext (hwndText, hIMC);
OS.ImmAssociateContext (hwndUpDown, hIMC);
OS.ImmReleaseContext (handle, hIMC);
@@ -258,7 +258,7 @@ void addVerifyListener (VerifyListener listener) {
addListener (SWT.Verify, typedListener);
}
-int borderHandle () {
+int /*long*/ borderHandle () {
return hwndText;
}
@@ -266,8 +266,8 @@ public Point computeSize (int wHint, int hHint, boolean changed) {
checkWidget ();
int width = 0, height = 0;
if (wHint == SWT.DEFAULT || hHint == SWT.DEFAULT) {
- int newFont, oldFont = 0;
- int hDC = OS.GetDC (hwndText);
+ int /*long*/ newFont, oldFont = 0;
+ int /*long*/ 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 ();
@@ -328,7 +328,7 @@ public Rectangle computeTrim (int x, int y, int width, int height) {
* the single-line text widget in an editable combo
* box.
*/
- int margins = OS.SendMessage (hwndText, OS.EM_GETMARGINS, 0, 0);
+ int /*long*/ 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) {
@@ -392,7 +392,7 @@ void deregister () {
}
boolean hasFocus () {
- int hwndFocus = OS.GetFocus ();
+ int /*long*/ hwndFocus = OS.GetFocus ();
if (hwndFocus == handle) return true;
if (hwndFocus == hwndText) return true;
if (hwndFocus == hwndUpDown) return true;
@@ -503,7 +503,7 @@ public int getSelection () {
if (OS.IsWinCE) {
return OS.LOWORD (OS.SendMessage (hwndUpDown, OS.UDM_GETPOS, 0, 0));
} else {
- return OS.SendMessage (hwndUpDown, OS.UDM_GETPOS32, 0, 0);
+ return (int)/*64*/OS.SendMessage (hwndUpDown, OS.UDM_GETPOS32, 0, 0);
}
}
@@ -659,7 +659,7 @@ void removeVerifyListener (VerifyListener listener) {
eventTable.unhook (SWT.Verify, listener);
}
-boolean sendKeyEvent (int type, int msg, int wParam, int lParam, Event event) {
+boolean sendKeyEvent (int type, int msg, int /*long*/ wParam, int /*long*/ lParam, Event event) {
if (!super.sendKeyEvent (type, msg, wParam, lParam, event)) {
return false;
}
@@ -742,7 +742,7 @@ boolean sendKeyEvent (int type, int msg, int wParam, int lParam, Event event) {
return false;
}
-void setBackgroundImage (int hBitmap) {
+void setBackgroundImage (int /*long*/ hBitmap) {
super.setBackgroundImage (hBitmap);
OS.InvalidateRect (hwndText, null, true);
}
@@ -781,7 +781,7 @@ public void setDigits (int value) {
if (OS.IsWinCE) {
pos = OS.LOWORD (OS.SendMessage (hwndUpDown, OS.UDM_GETPOS, 0, 0));
} else {
- pos = OS.SendMessage (hwndUpDown, OS.UDM_GETPOS32, 0, 0);
+ pos = (int)/*64*/OS.SendMessage (hwndUpDown, OS.UDM_GETPOS32, 0, 0);
}
setSelection (pos, false, true, false);
}
@@ -806,14 +806,14 @@ void setForegroundPixel (int pixel) {
public void setIncrement (int value) {
checkWidget ();
if (value < 1) return;
- int hHeap = OS.GetProcessHeap ();
- int count = OS.SendMessage (hwndUpDown, OS.UDM_GETACCEL, 0, (UDACCEL)null);
- int udaccels = OS.HeapAlloc (hHeap, OS.HEAP_ZERO_MEMORY, UDACCEL.sizeof * count);
+ int /*long*/ 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);
OS.SendMessage (hwndUpDown, OS.UDM_GETACCEL, count, udaccels);
int first = -1;
UDACCEL udaccel = new UDACCEL ();
for (int i = 0; i < count; i++) {
- int offset = udaccels + (i * UDACCEL.sizeof);
+ int /*long*/ offset = udaccels + (i * UDACCEL.sizeof);
OS.MoveMemory (udaccel, offset, UDACCEL.sizeof);
if (first == -1) first = udaccel.nInc;
udaccel.nInc = udaccel.nInc * value / first;
@@ -846,7 +846,7 @@ public void setMaximum (int value) {
if (OS.IsWinCE) {
pos = OS.LOWORD (OS.SendMessage (hwndUpDown, OS.UDM_GETPOS, 0, 0));
} else {
- pos = OS.SendMessage (hwndUpDown, OS.UDM_GETPOS32, 0, 0);
+ pos = (int)/*64*/OS.SendMessage (hwndUpDown, OS.UDM_GETPOS32, 0, 0);
}
OS.SendMessage (hwndUpDown , OS.UDM_SETRANGE32, min [0], value);
if (pos > value) setSelection (value, true, true, false);
@@ -875,7 +875,7 @@ public void setMinimum (int value) {
if (OS.IsWinCE) {
pos = OS.LOWORD (OS.SendMessage (hwndUpDown, OS.UDM_GETPOS, 0, 0));
} else {
- pos = OS.SendMessage (hwndUpDown, OS.UDM_GETPOS32, 0, 0);
+ pos = (int)/*64*/OS.SendMessage (hwndUpDown, OS.UDM_GETPOS32, 0, 0);
}
OS.SendMessage (hwndUpDown , OS.UDM_SETRANGE32, value, max [0]);
if (pos < value) setSelection (value, true, true, false);
@@ -998,15 +998,15 @@ public void setValues (int selection, int minimum, int maximum, int digits, int
void subclass () {
super.subclass ();
- int newProc = display.windowProc;
- OS.SetWindowLong (hwndText, OS.GWL_WNDPROC, newProc);
- OS.SetWindowLong (hwndUpDown, OS.GWL_WNDPROC, newProc);
+ int /*long*/ newProc = display.windowProc;
+ OS.SetWindowLongPtr (hwndText, OS.GWLP_WNDPROC, newProc);
+ OS.SetWindowLongPtr (hwndUpDown, OS.GWLP_WNDPROC, newProc);
}
void unsubclass () {
super.unsubclass ();
- OS.SetWindowLong (hwndText, OS.GWL_WNDPROC, EditProc);
- OS.SetWindowLong (hwndUpDown, OS.GWL_WNDPROC, UpDownProc);
+ OS.SetWindowLongPtr (hwndText, OS.GWLP_WNDPROC, EditProc);
+ OS.SetWindowLongPtr (hwndUpDown, OS.GWLP_WNDPROC, UpDownProc);
}
String verifyText (String string, int start, int end, Event keyEvent) {
@@ -1046,7 +1046,7 @@ int widgetExtStyle () {
return super.widgetExtStyle () & ~OS.WS_EX_CLIENTEDGE;
}
-int windowProc (int hwnd, int msg, int wParam, int lParam) {
+int /*long*/ windowProc (int /*long*/ hwnd, int msg, int /*long*/ wParam, int /*long*/ lParam) {
if (hwnd == hwndText || hwnd == hwndUpDown) {
LRESULT result = null;
switch (msg) {
@@ -1106,29 +1106,29 @@ int windowProc (int hwnd, int msg, int wParam, int lParam) {
return super.windowProc (hwnd, msg, wParam, lParam);
}
-LRESULT WM_ERASEBKGND (int wParam, int lParam) {
+LRESULT WM_ERASEBKGND (int /*long*/ wParam, int /*long*/ lParam) {
super.WM_ERASEBKGND (wParam, lParam);
drawBackground (wParam);
return LRESULT.ONE;
}
-LRESULT WM_KILLFOCUS (int wParam, int lParam) {
+LRESULT WM_KILLFOCUS (int /*long*/ wParam, int /*long*/ lParam) {
return null;
}
-LRESULT WM_SETFOCUS (int wParam, int lParam) {
+LRESULT WM_SETFOCUS (int /*long*/ wParam, int /*long*/ lParam) {
OS.SetFocus (hwndText);
return null;
}
-LRESULT WM_SETFONT (int wParam, int lParam) {
+LRESULT WM_SETFONT (int /*long*/ wParam, int /*long*/ 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 wParam, int lParam) {
+LRESULT WM_SIZE (int /*long*/ wParam, int /*long*/ lParam) {
LRESULT result = super.WM_SIZE (wParam, lParam);
if (isDisposed ()) return result;
int width = OS.LOWORD (lParam), height = OS.HIWORD (lParam);
@@ -1141,7 +1141,7 @@ LRESULT WM_SIZE (int wParam, int lParam) {
return result;
}
-LRESULT wmChar (int hwnd, int wParam, int lParam) {
+LRESULT wmChar (int /*long*/ hwnd, int /*long*/ wParam, int /*long*/ lParam) {
LRESULT result = super.wmChar (hwnd, wParam, lParam);
if (result != null) return result;
/*
@@ -1151,7 +1151,7 @@ LRESULT wmChar (int hwnd, int wParam, int lParam) {
* The fix is to look for these keys and not call
* the window proc.
*/
- switch (wParam) {
+ switch ((int)/*64*/wParam) {
case SWT.CR:
postEvent (SWT.DefaultSelection);
// FALL THROUGH
@@ -1161,7 +1161,7 @@ LRESULT wmChar (int hwnd, int wParam, int lParam) {
return result;
}
-LRESULT wmClipboard (int hwndText, int msg, int wParam, int lParam) {
+LRESULT wmClipboard (int /*long*/ hwndText, int msg, int /*long*/ wParam, int /*long*/ lParam) {
if ((style & SWT.READ_ONLY) != 0) return null;
// if (!hooks (SWT.Verify) && !filters (SWT.Verify)) return null;
boolean call = false;
@@ -1211,11 +1211,11 @@ LRESULT wmClipboard (int hwndText, int msg, int wParam, int lParam) {
}
TCHAR buffer = new TCHAR (getCodePage (), newText, true);
if (msg == OS.WM_SETTEXT) {
- int hHeap = OS.GetProcessHeap ();
+ int /*long*/ hHeap = OS.GetProcessHeap ();
int byteCount = buffer.length () * TCHAR.sizeof;
- int pszText = OS.HeapAlloc (hHeap, OS.HEAP_ZERO_MEMORY, byteCount);
+ int /*long*/ pszText = OS.HeapAlloc (hHeap, OS.HEAP_ZERO_MEMORY, byteCount);
OS.MoveMemory (pszText, buffer, byteCount);
- int code = OS.CallWindowProc (EditProc, hwndText, msg, wParam, pszText);
+ int /*long*/ code = OS.CallWindowProc (EditProc, hwndText, msg, wParam, pszText);
OS.HeapFree (hHeap, 0, pszText);
return new LRESULT (code);
} else {
@@ -1227,7 +1227,7 @@ LRESULT wmClipboard (int hwndText, int msg, int wParam, int lParam) {
return null;
}
-LRESULT wmCommandChild (int wParam, int lParam) {
+LRESULT wmCommandChild (int /*long*/ wParam, int /*long*/ lParam) {
int code = OS.HIWORD (wParam);
switch (code) {
case OS.EN_CHANGE:
@@ -1238,7 +1238,7 @@ LRESULT wmCommandChild (int wParam, int lParam) {
if (OS.IsWinCE) {
pos = OS.LOWORD (OS.SendMessage (hwndUpDown, OS.UDM_GETPOS, 0, 0));
} else {
- pos = OS.SendMessage (hwndUpDown, OS.UDM_GETPOS32, 0, 0);
+ pos = (int)/*64*/OS.SendMessage (hwndUpDown, OS.UDM_GETPOS32, 0, 0);
}
if (pos != value) setSelection (value, true, false, true);
}
@@ -1249,7 +1249,7 @@ LRESULT wmCommandChild (int wParam, int lParam) {
return super.wmCommandChild (wParam, lParam);
}
-LRESULT wmKeyDown (int hwnd, int wParam, int lParam) {
+LRESULT wmKeyDown (int /*long*/ hwnd, int /*long*/ wParam, int /*long*/ lParam) {
LRESULT result = super.wmKeyDown (hwnd, wParam, lParam);
if (result != null) return result;
@@ -1257,7 +1257,7 @@ LRESULT wmKeyDown (int hwnd, int wParam, int lParam) {
UDACCEL udaccel = new UDACCEL ();
OS.SendMessage (hwndUpDown, OS.UDM_GETACCEL, 1, udaccel);
int delta = 0;
- switch (wParam) {
+ switch ((int)/*64*/wParam) {
case OS.VK_UP: delta = udaccel.nInc; break;
case OS.VK_DOWN: delta = -udaccel.nInc; break;
case OS.VK_PRIOR: delta = pageIncrement; break;
@@ -1269,7 +1269,7 @@ LRESULT wmKeyDown (int hwnd, int wParam, int lParam) {
if (OS.IsWinCE) {
value = OS.LOWORD (OS.SendMessage (hwndUpDown, OS.UDM_GETPOS, 0, 0));
} else {
- value = OS.SendMessage (hwndUpDown, OS.UDM_GETPOS32, 0, 0);
+ value = (int)/*64*/OS.SendMessage (hwndUpDown, OS.UDM_GETPOS32, 0, 0);
}
}
int newValue = value + delta;
@@ -1284,7 +1284,7 @@ LRESULT wmKeyDown (int hwnd, int wParam, int lParam) {
}
/* Stop the edit control from moving the caret */
- switch (wParam) {
+ switch ((int)/*64*/wParam) {
case OS.VK_UP:
case OS.VK_DOWN:
return LRESULT.ZERO;
@@ -1292,20 +1292,20 @@ LRESULT wmKeyDown (int hwnd, int wParam, int lParam) {
return result;
}
-LRESULT wmKillFocus (int hwnd, int wParam, int lParam) {
+LRESULT wmKillFocus (int /*long*/ hwnd, int /*long*/ wParam, int /*long*/ lParam) {
int value = getSelectionText ();
if (value == -1) {
if (OS.IsWinCE) {
value = OS.LOWORD (OS.SendMessage (hwndUpDown, OS.UDM_GETPOS, 0, 0));
} else {
- value = OS.SendMessage (hwndUpDown, OS.UDM_GETPOS32, 0, 0);
+ value = (int)/*64*/OS.SendMessage (hwndUpDown, OS.UDM_GETPOS32, 0, 0);
}
setSelection (value, false, true, false);
}
return super.wmKillFocus (hwnd, wParam, lParam);
}
-LRESULT wmNotifyChild (NMHDR hdr, int wParam, int lParam) {
+LRESULT wmNotifyChild (NMHDR hdr, int /*long*/ wParam, int /*long*/ lParam) {
switch (hdr.code) {
case OS.UDN_DELTAPOS:
NMUPDOWN lpnmud = new NMUPDOWN ();
@@ -1334,7 +1334,7 @@ LRESULT wmNotifyChild (NMHDR hdr, int wParam, int lParam) {
return super.wmNotifyChild (hdr, wParam, lParam);
}
-LRESULT wmScrollChild (int wParam, int lParam) {
+LRESULT wmScrollChild (int /*long*/ wParam, int /*long*/ 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 cc0a67e193..38819c85fd 100755
--- 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
@@ -45,7 +45,7 @@ import org.eclipse.swt.events.*;
public class TabFolder extends Composite {
TabItem [] items;
ImageList imageList;
- static final int TabFolderProc;
+ static final int /*long*/ TabFolderProc;
static final TCHAR TabFolderClass = new TCHAR (0, OS.WC_TABCONTROL, true);
/*
@@ -78,12 +78,12 @@ public class TabFolder extends Composite {
* code, other than SWT, could create a control with
* this class name, and fail unexpectedly.
*/
- int hInstance = OS.GetModuleHandle (null);
- int hHeap = OS.GetProcessHeap ();
+ int /*long*/ hInstance = OS.GetModuleHandle (null);
+ int /*long*/ hHeap = OS.GetProcessHeap ();
lpWndClass.hInstance = hInstance;
lpWndClass.style &= ~(OS.CS_HREDRAW | OS.CS_VREDRAW | OS.CS_GLOBALCLASS);
int byteCount = TabFolderClass.length () * TCHAR.sizeof;
- int lpszClassName = OS.HeapAlloc (hHeap, OS.HEAP_ZERO_MEMORY, byteCount);
+ int /*long*/ lpszClassName = OS.HeapAlloc (hHeap, OS.HEAP_ZERO_MEMORY, byteCount);
OS.MoveMemory (lpszClassName, TabFolderClass, byteCount);
lpWndClass.lpszClassName = lpszClassName;
OS.RegisterClass (lpWndClass);
@@ -154,7 +154,7 @@ public void addSelectionListener(SelectionListener listener) {
addListener(SWT.DefaultSelection,typedListener);
}
-int callWindowProc (int hwnd, int msg, int wParam, int lParam) {
+int /*long*/ callWindowProc (int /*long*/ hwnd, int msg, int /*long*/ wParam, int /*long*/ lParam) {
if (handle == 0) return 0;
return OS.CallWindowProc (TabFolderProc, hwnd, msg, wParam, lParam);
}
@@ -189,7 +189,7 @@ public Point computeSize (int wHint, int hHint, boolean changed) {
RECT insetRect = new RECT (), itemRect = new RECT ();
OS.SendMessage (handle, OS.TCM_ADJUSTRECT, 0, insetRect);
int width = insetRect.left - insetRect.right;
- int count = OS.SendMessage (handle, OS.TCM_GETITEMCOUNT, 0, 0);
+ int count = (int)/*64*/OS.SendMessage (handle, OS.TCM_GETITEMCOUNT, 0, 0);
if (count != 0) {
OS.SendMessage (handle, OS.TCM_GETITEMRECT, count - 1, itemRect);
width = Math.max (width, itemRect.right - insetRect.right);
@@ -218,7 +218,7 @@ public Rectangle computeTrim (int x, int y, int width, int height) {
}
void createItem (TabItem item, int index) {
- int count = OS.SendMessage (handle, OS.TCM_GETITEMCOUNT, 0, 0);
+ int count = (int)/*64*/OS.SendMessage (handle, OS.TCM_GETITEMCOUNT, 0, 0);
if (!(0 <= index && index <= count)) error (SWT.ERROR_INVALID_RANGE);
if (count == items.length) {
TabItem [] newItems = new TabItem [items.length + 4];
@@ -261,7 +261,7 @@ void createHandle () {
* is set. The fix is to set TTM_SETMAXTIPWIDTH to
* a large value.
*/
- int hwndToolTip = OS.SendMessage (handle, OS.TCM_GETTOOLTIPS, 0, 0);
+ int /*long*/ hwndToolTip = OS.SendMessage (handle, OS.TCM_GETTOOLTIPS, 0, 0);
OS.SendMessage (hwndToolTip, OS.TTM_SETMAXTIPWIDTH, 0, 0x7FFF);
}
@@ -271,14 +271,14 @@ void createWidget () {
}
void destroyItem (TabItem item) {
- int count = OS.SendMessage (handle, OS.TCM_GETITEMCOUNT, 0, 0);
+ int count = (int)/*64*/OS.SendMessage (handle, OS.TCM_GETITEMCOUNT, 0, 0);
int index = 0;
while (index < count) {
if (items [index] == item) break;
index++;
}
if (index == count) return;
- int selectionIndex = OS.SendMessage (handle, OS.TCM_GETCURSEL, 0, 0);
+ int selectionIndex = (int)/*64*/OS.SendMessage (handle, OS.TCM_GETCURSEL, 0, 0);
if (OS.SendMessage (handle, OS.TCM_DELETEITEM, index, 0) == 0) {
error (SWT.ERROR_ITEM_NOT_REMOVED);
}
@@ -297,7 +297,7 @@ void destroyItem (TabItem item) {
}
}
-void drawThemeBackground (int hDC, int hwnd, RECT rect) {
+void drawThemeBackground (int /*long*/ hDC, int /*long*/ hwnd, RECT rect) {
RECT rect2 = new RECT ();
OS.GetClientRect (handle, rect2);
OS.MapWindowPoints (handle, hwnd, rect2, 2);
@@ -339,7 +339,7 @@ public Rectangle getClientArea () {
*/
public TabItem getItem (int index) {
checkWidget ();
- int count = OS.SendMessage (handle, OS.TCM_GETITEMCOUNT, 0, 0);
+ int count = (int)/*64*/OS.SendMessage (handle, OS.TCM_GETITEMCOUNT, 0, 0);
if (!(0 <= index && index < count)) error (SWT.ERROR_INVALID_RANGE);
return items [index];
}
@@ -356,7 +356,7 @@ public TabItem getItem (int index) {
*/
public int getItemCount () {
checkWidget ();
- return OS.SendMessage (handle, OS.TCM_GETITEMCOUNT, 0, 0);
+ return (int)/*64*/OS.SendMessage (handle, OS.TCM_GETITEMCOUNT, 0, 0);
}
/**
@@ -377,7 +377,7 @@ public int getItemCount () {
*/
public TabItem [] getItems () {
checkWidget ();
- int count = OS.SendMessage (handle, OS.TCM_GETITEMCOUNT, 0, 0);
+ int count = (int)/*64*/OS.SendMessage (handle, OS.TCM_GETITEMCOUNT, 0, 0);
TabItem [] result = new TabItem [count];
System.arraycopy (items, 0, result, 0, count);
return result;
@@ -401,7 +401,7 @@ public TabItem [] getItems () {
*/
public TabItem [] getSelection () {
checkWidget ();
- int index = OS.SendMessage (handle, OS.TCM_GETCURSEL, 0, 0);
+ int index = (int)/*64*/OS.SendMessage (handle, OS.TCM_GETCURSEL, 0, 0);
if (index == -1) return new TabItem [0];
return new TabItem [] {items [index]};
}
@@ -419,7 +419,7 @@ public TabItem [] getSelection () {
*/
public int getSelectionIndex () {
checkWidget ();
- return OS.SendMessage (handle, OS.TCM_GETCURSEL, 0, 0);
+ return (int)/*64*/OS.SendMessage (handle, OS.TCM_GETCURSEL, 0, 0);
}
int imageIndex (Image image) {
@@ -428,7 +428,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 hImageList = imageList.getHandle ();
+ int /*long*/ hImageList = imageList.getHandle ();
OS.SendMessage (handle, OS.TCM_SETIMAGELIST, 0, hImageList);
return index;
}
@@ -461,7 +461,7 @@ int imageIndex (Image image) {
public int indexOf (TabItem item) {
checkWidget ();
if (item == null) error (SWT.ERROR_NULL_ARGUMENT);
- int count = OS.SendMessage (handle, OS.TCM_GETITEMCOUNT, 0, 0);
+ int count = (int)/*64*/OS.SendMessage (handle, OS.TCM_GETITEMCOUNT, 0, 0);
for (int i=0; i<count; i++) {
if (items [i] == item) return i;
}
@@ -474,7 +474,7 @@ Point minimumSize (int wHint, int hHint, boolean flushCache) {
for (int i=0; i<children.length; i++) {
Control child = children [i];
int index = 0;
- int count = OS.SendMessage (handle, OS.TCM_GETITEMCOUNT, 0, 0);
+ int count = (int)/*64*/OS.SendMessage (handle, OS.TCM_GETITEMCOUNT, 0, 0);
while (index < count) {
if (items [index].control == child) break;
index++;
@@ -523,7 +523,7 @@ boolean mnemonicMatch (char key) {
void releaseChildren (boolean destroy) {
if (items != null) {
- int count = OS.SendMessage (handle, OS.TCM_GETITEMCOUNT, 0, 0);
+ int count = (int)/*64*/OS.SendMessage (handle, OS.TCM_GETITEMCOUNT, 0, 0);
for (int i=0; i<count; i++) {
TabItem item = items [i];
if (item != null && !item.isDisposed ()) {
@@ -546,7 +546,7 @@ void releaseWidget () {
void removeControl (Control control) {
super.removeControl (control);
- int count = OS.SendMessage (handle, OS.TCM_GETITEMCOUNT, 0, 0);
+ int count = (int)/*64*/OS.SendMessage (handle, OS.TCM_GETITEMCOUNT, 0, 0);
for (int i=0; i<count; i++) {
TabItem item = items [i];
if (item.control == control) item.setControl (null);
@@ -636,7 +636,7 @@ public void setFont (Font font) {
Rectangle newRect = getClientArea ();
if (!oldRect.equals (newRect)) {
sendResize ();
- int index = OS.SendMessage (handle, OS.TCM_GETCURSEL, 0, 0);
+ int index = (int)/*64*/OS.SendMessage (handle, OS.TCM_GETCURSEL, 0, 0);
if (index != -1) {
TabItem item = items [index];
Control control = item.control;
@@ -662,13 +662,13 @@ public void setFont (Font font) {
*/
public void setSelection (int index) {
checkWidget ();
- int count = OS.SendMessage (handle, OS.TCM_GETITEMCOUNT, 0, 0);
+ int count = (int)/*64*/OS.SendMessage (handle, OS.TCM_GETITEMCOUNT, 0, 0);
if (!(0 <= index && index < count)) return;
setSelection (index, false);
}
void setSelection (int index, boolean notify) {
- int oldIndex = OS.SendMessage (handle, OS.TCM_GETCURSEL, 0, 0);
+ int oldIndex = (int)/*64*/OS.SendMessage (handle, OS.TCM_GETCURSEL, 0, 0);
if (oldIndex == index) return;
if (oldIndex != -1) {
TabItem item = items [oldIndex];
@@ -678,7 +678,7 @@ void setSelection (int index, boolean notify) {
}
}
OS.SendMessage (handle, OS.TCM_SETCURSEL, index, 0);
- int newIndex = OS.SendMessage (handle, OS.TCM_GETCURSEL, 0, 0);
+ int newIndex = (int)/*64*/OS.SendMessage (handle, OS.TCM_GETCURSEL, 0, 0);
if (newIndex != -1) {
TabItem item = items [newIndex];
Control control = item.control;
@@ -698,8 +698,9 @@ String toolTipText (NMTTDISPINFO hdr) {
if ((hdr.uFlags & OS.TTF_IDISHWND) != 0) {
return null;
}
- int index = hdr.idFrom;
- int hwndToolTip = OS.SendMessage (handle, OS.TCM_GETTOOLTIPS, 0, 0);
+ //TODO - should ids be long
+ int index = (int)/*64*/hdr.idFrom;
+ int /*long*/ hwndToolTip = OS.SendMessage (handle, OS.TCM_GETTOOLTIPS, 0, 0);
if (hwndToolTip == hdr.hwndFrom) {
if (toolTipText != null) return "";
if (0 <= index && index < items.length) {
@@ -746,11 +747,11 @@ TCHAR windowClass () {
return TabFolderClass;
}
-int windowProc () {
+int /*long*/ windowProc () {
return TabFolderProc;
}
-LRESULT WM_GETDLGCODE (int wParam, int lParam) {
+LRESULT WM_GETDLGCODE (int /*long*/ wParam, int /*long*/ lParam) {
LRESULT result = super.WM_GETDLGCODE (wParam, lParam);
/*
* Return DLGC_BUTTON so that mnemonics will be
@@ -761,7 +762,7 @@ LRESULT WM_GETDLGCODE (int wParam, int lParam) {
return new LRESULT (OS.DLGC_BUTTON);
}
-LRESULT WM_MOUSELEAVE (int wParam, int lParam) {
+LRESULT WM_MOUSELEAVE (int /*long*/ wParam, int /*long*/ lParam) {
LRESULT result = super.WM_MOUSELEAVE (wParam, lParam);
if (result != null) return result;
/*
@@ -778,7 +779,7 @@ LRESULT WM_MOUSELEAVE (int wParam, int lParam) {
if (OS.COMCTL32_MAJOR >= 6) {
TOOLINFO lpti = new TOOLINFO ();
lpti.cbSize = TOOLINFO.sizeof;
- int hwndToolTip = OS.SendMessage (handle, OS.TCM_GETTOOLTIPS, 0, 0);
+ int /*long*/ 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);
@@ -789,7 +790,7 @@ LRESULT WM_MOUSELEAVE (int wParam, int lParam) {
return result;
}
-LRESULT WM_NCHITTEST (int wParam, int lParam) {
+LRESULT WM_NCHITTEST (int /*long*/ wParam, int /*long*/ lParam) {
LRESULT result = super.WM_NCHITTEST (wParam, lParam);
if (result != null) return result;
/*
@@ -804,11 +805,11 @@ LRESULT WM_NCHITTEST (int wParam, int lParam) {
* default window proc that returns HTCLIENT when
* the mouse is in the client area.
*/
- int hittest = OS.DefWindowProc (handle, OS.WM_NCHITTEST, wParam, lParam);
+ int /*long*/ hittest = OS.DefWindowProc (handle, OS.WM_NCHITTEST, wParam, lParam);
return new LRESULT (hittest);
}
-LRESULT WM_NOTIFY (int wParam, int lParam) {
+LRESULT WM_NOTIFY (int /*long*/ wParam, int /*long*/ lParam) {
/*
* Feature in Windows. When the tab folder window
* proc processes WM_NOTIFY, it forwards this
@@ -832,7 +833,7 @@ LRESULT WM_NOTIFY (int wParam, int lParam) {
return LRESULT.ZERO;
}
-LRESULT WM_PARENTNOTIFY (int wParam, int lParam) {
+LRESULT WM_PARENTNOTIFY (int /*long*/ wParam, int /*long*/ lParam) {
LRESULT result = super.WM_PARENTNOTIFY (wParam, lParam);
if (result != null) return result;
/*
@@ -850,7 +851,8 @@ LRESULT WM_PARENTNOTIFY (int wParam, int lParam) {
int code = OS.LOWORD (wParam);
switch (code) {
case OS.WM_CREATE: {
- int id = OS.HIWORD (wParam), hwnd = lParam;
+ int id = OS.HIWORD (wParam);
+ int /*long*/ 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);
@@ -862,7 +864,7 @@ LRESULT WM_PARENTNOTIFY (int wParam, int lParam) {
return result;
}
-LRESULT WM_SIZE (int wParam, int lParam) {
+LRESULT WM_SIZE (int /*long*/ wParam, int /*long*/ lParam) {
LRESULT result = super.WM_SIZE (wParam, lParam);
/*
* It is possible (but unlikely), that application
@@ -872,7 +874,7 @@ LRESULT WM_SIZE (int wParam, int lParam) {
* WM_SIZE message.
*/
if (isDisposed ()) return result;
- int index = OS.SendMessage (handle, OS.TCM_GETCURSEL, 0, 0);
+ int index = (int)/*64*/OS.SendMessage (handle, OS.TCM_GETCURSEL, 0, 0);
if (index != -1) {
TabItem item = items [index];
Control control = item.control;
@@ -883,7 +885,7 @@ LRESULT WM_SIZE (int wParam, int lParam) {
return result;
}
-LRESULT WM_WINDOWPOSCHANGING (int wParam, int lParam) {
+LRESULT WM_WINDOWPOSCHANGING (int /*long*/ wParam, int /*long*/ lParam) {
LRESULT result = super.WM_WINDOWPOSCHANGING (wParam, lParam);
if (result != null) return result;
if (!OS.IsWindowVisible (handle)) return result;
@@ -932,13 +934,13 @@ LRESULT WM_WINDOWPOSCHANGING (int wParam, int lParam) {
return result;
}
-LRESULT wmNotifyChild (NMHDR hdr, int wParam, int lParam) {
+LRESULT wmNotifyChild (NMHDR hdr, int /*long*/ wParam, int /*long*/ lParam) {
int code = hdr.code;
switch (code) {
case OS.TCN_SELCHANGE:
case OS.TCN_SELCHANGING:
TabItem item = null;
- int index = OS.SendMessage (handle, OS.TCM_GETCURSEL, 0, 0);
+ int index = (int)/*64*/OS.SendMessage (handle, OS.TCM_GETCURSEL, 0, 0);
if (index != -1) item = items [index];
if (item != null) {
Control control = item.control;
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 040584bf2e..2228bb80f9 100755
--- 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
@@ -128,11 +128,11 @@ void _setText (int index, String string) {
if (j < i) string = new String (text, 0, j);
}
}
- int hwnd = parent.handle;
- int hHeap = OS.GetProcessHeap ();
+ int /*long*/ hwnd = parent.handle;
+ int /*long*/ hHeap = OS.GetProcessHeap ();
TCHAR buffer = new TCHAR (parent.getCodePage (), string, true);
int byteCount = buffer.length () * TCHAR.sizeof;
- int pszText = OS.HeapAlloc (hHeap, OS.HEAP_ZERO_MEMORY, byteCount);
+ int /*long*/ pszText = OS.HeapAlloc (hHeap, OS.HEAP_ZERO_MEMORY, byteCount);
OS.MoveMemory (pszText, buffer, byteCount);
TCITEM tcItem = new TCITEM ();
tcItem.mask = OS.TCIF_TEXT;
@@ -270,7 +270,7 @@ public void setImage (Image image) {
if (OS.COMCTL32_MAJOR >= 6) {
if (text.indexOf ('&') != -1) _setText (index, text);
}
- int hwnd = parent.handle;
+ int /*long*/ 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 11e12adf8a..90d8620b46 100755
--- 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
@@ -74,8 +74,9 @@ public class Table extends Composite {
boolean ignoreCustomDraw, ignoreDrawForeground, ignoreDrawBackground, ignoreDrawFocus, ignoreDrawSelection, ignoreDrawHot;
boolean customDraw, dragStarted, explorerTheme, firstColumnImage, fixScrollWidth, tipRequested, wasSelected, wasResized;
boolean ignoreActivate, ignoreSelect, ignoreShrink, ignoreResize, ignoreColumnMove, ignoreColumnResize;
- int headerToolTipHandle, itemHeight, lastIndexOf, lastWidth, sortDirection, resizeCount, selectionForeground, hotIndex;
- static /*final*/ int HeaderProc;
+ int /*long*/ headerToolTipHandle;
+ int itemHeight, lastIndexOf, lastWidth, sortDirection, resizeCount, selectionForeground, hotIndex;
+ static /*final*/ int /*long*/ HeaderProc;
static final int INSET = 4;
static final int GRID_WIDTH = 1;
static final int SORT_WIDTH = 10;
@@ -84,7 +85,7 @@ public class Table extends Composite {
static final int VISTA_EXTRA = 2;
static final int EXPLORER_EXTRA = 2;
static final boolean EXPLORER_THEME = true;
- static final int TableProc;
+ static final int /*long*/ TableProc;
static final TCHAR TableClass = new TCHAR (0, OS.WC_LISTVIEW, true);
static {
WNDCLASS lpWndClass = new WNDCLASS ();
@@ -185,11 +186,11 @@ public void addSelectionListener (SelectionListener listener) {
addListener (SWT.DefaultSelection,typedListener);
}
-int callWindowProc (int hwnd, int msg, int wParam, int lParam) {
+int /*long*/ callWindowProc (int /*long*/ hwnd, int msg, int /*long*/ wParam, int /*long*/ lParam) {
return callWindowProc (hwnd, msg, wParam, lParam, false);
}
-int callWindowProc (int hwnd, int msg, int wParam, int lParam, boolean forceSelect) {
+int /*long*/ callWindowProc (int /*long*/ hwnd, int msg, int /*long*/ wParam, int /*long*/ lParam, boolean forceSelect) {
if (handle == 0) return 0;
if (handle != hwnd) {
return OS.CallWindowProc (HeaderProc, hwnd, msg, wParam, lParam);
@@ -251,19 +252,19 @@ int callWindowProc (int hwnd, int msg, int wParam, int lParam, boolean forceSele
case OS.WM_SETFONT:
case OS.WM_TIMER: {
if (findImageControl () != null) {
- topIndex = OS.SendMessage (handle, OS.LVM_GETTOPINDEX, 0, 0);
+ topIndex = (int)/*64*/OS.SendMessage (handle, OS.LVM_GETTOPINDEX, 0, 0);
}
}
}
boolean oldSelected = wasSelected;
if (checkSelection) wasSelected = false;
if (checkActivate) ignoreActivate = true;
- int code = OS.CallWindowProc (TableProc, hwnd, msg, wParam, lParam);
+ int /*long*/ code = OS.CallWindowProc (TableProc, hwnd, msg, wParam, lParam);
if (checkActivate) ignoreActivate = false;
if (checkSelection) {
if (wasSelected || forceSelect) {
Event event = new Event ();
- int index = OS.SendMessage (handle, OS.LVM_GETNEXTITEM, -1, OS.LVNI_FOCUSED);
+ int index = (int)/*64*/OS.SendMessage (handle, OS.LVM_GETNEXTITEM, -1, OS.LVNI_FOCUSED);
if (index != -1) event.item = _getItem (index);
postEvent (SWT.Selection, event);
}
@@ -290,7 +291,7 @@ int callWindowProc (int hwnd, int msg, int wParam, int lParam, boolean forceSele
if (redraw) {
OS.DefWindowProc (handle, OS.WM_SETREDRAW, 1, 0);
OS.InvalidateRect (handle, null, true);
- int hwndHeader = OS.SendMessage (handle, OS.LVM_GETHEADER, 0, 0);
+ int /*long*/ hwndHeader = OS.SendMessage (handle, OS.LVM_GETHEADER, 0, 0);
if (hwndHeader != 0) OS.InvalidateRect (hwndHeader, null, true);
}
//FALL THROUGH
@@ -339,8 +340,8 @@ static int checkStyle (int style) {
return checkBits (style, SWT.SINGLE, SWT.MULTI, 0, 0, 0, 0);
}
-LRESULT CDDS_ITEMPOSTPAINT (NMLVCUSTOMDRAW nmcd, int wParam, int lParam) {
- int hDC = nmcd.hdc;
+LRESULT CDDS_ITEMPOSTPAINT (NMLVCUSTOMDRAW nmcd, int /*long*/ wParam, int /*long*/ lParam) {
+ int /*long*/ hDC = nmcd.hdc;
if (explorerTheme && !ignoreCustomDraw) {
hotIndex = -1;
if (hooks (SWT.EraseItem) && nmcd.left != nmcd.right) {
@@ -363,20 +364,20 @@ LRESULT CDDS_ITEMPOSTPAINT (NMLVCUSTOMDRAW nmcd, int wParam, int lParam) {
if (OS.IsWindowVisible (handle) && OS.IsWindowEnabled (handle)) {
if (!explorerTheme && (style & SWT.FULL_SELECTION) != 0) {
if (OS.SendMessage (handle, OS.LVM_GETBKCOLOR, 0, 0) == OS.CLR_NONE) {
- int dwExStyle = OS.SendMessage (handle, OS.LVM_GETEXTENDEDLISTVIEWSTYLE, 0, 0);
+ int dwExStyle = (int)/*64*/OS.SendMessage (handle, OS.LVM_GETEXTENDEDLISTVIEWSTYLE, 0, 0);
if ((dwExStyle & OS.LVS_EX_FULLROWSELECT) == 0) {
// if ((nmcd.uItemState & OS.CDIS_FOCUS) != 0) {
if (OS.SendMessage (handle, OS.LVM_GETNEXTITEM, -1, OS.LVNI_FOCUSED) == nmcd.dwItemSpec) {
if (handle == OS.GetFocus ()) {
- int uiState = OS.SendMessage (handle, OS.WM_QUERYUISTATE, 0, 0);
+ int uiState = (int)/*64*/OS.SendMessage (handle, OS.WM_QUERYUISTATE, 0, 0);
if ((uiState & OS.UISF_HIDEFOCUS) == 0) {
RECT rect = new RECT ();
rect.left = OS.LVIR_BOUNDS;
boolean oldIgnore = ignoreCustomDraw;
ignoreCustomDraw = true;
OS.SendMessage (handle, OS. LVM_GETITEMRECT, nmcd.dwItemSpec, rect);
- int hwndHeader = OS.SendMessage (handle, OS.LVM_GETHEADER, 0, 0);
- int index = OS.SendMessage (hwndHeader, OS.HDM_ORDERTOINDEX, 0, 0);
+ int /*long*/ 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) {
itemRect.left = OS.LVIR_LABEL;
@@ -400,7 +401,7 @@ LRESULT CDDS_ITEMPOSTPAINT (NMLVCUSTOMDRAW nmcd, int wParam, int lParam) {
return null;
}
-LRESULT CDDS_ITEMPREPAINT (NMLVCUSTOMDRAW nmcd, int wParam, int lParam) {
+LRESULT CDDS_ITEMPREPAINT (NMLVCUSTOMDRAW nmcd, int /*long*/ wParam, int /*long*/ lParam) {
/*
* Bug in Windows. When the table has the extended style
* LVS_EX_FULLROWSELECT and LVM_SETBKCOLOR is used with
@@ -417,7 +418,7 @@ LRESULT CDDS_ITEMPREPAINT (NMLVCUSTOMDRAW nmcd, int wParam, int lParam) {
if (OS.IsWindowVisible (handle) && OS.IsWindowEnabled (handle)) {
if (!explorerTheme && (style & SWT.FULL_SELECTION) != 0) {
if (OS.SendMessage (handle, OS.LVM_GETBKCOLOR, 0, 0) == OS.CLR_NONE) {
- int dwExStyle = OS.SendMessage (handle, OS.LVM_GETEXTENDEDLISTVIEWSTYLE, 0, 0);
+ int dwExStyle = (int)/*64*/OS.SendMessage (handle, OS.LVM_GETEXTENDEDLISTVIEWSTYLE, 0, 0);
if ((dwExStyle & OS.LVS_EX_FULLROWSELECT) == 0) {
if ((nmcd.uItemState & OS.CDIS_FOCUS) != 0) {
nmcd.uItemState &= ~OS.CDIS_FOCUS;
@@ -429,10 +430,10 @@ LRESULT CDDS_ITEMPREPAINT (NMLVCUSTOMDRAW nmcd, int wParam, int lParam) {
}
}
if (explorerTheme && !ignoreCustomDraw) {
- hotIndex = (nmcd.uItemState & OS.CDIS_HOT) != 0 ? nmcd.dwItemSpec : -1;
+ 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 hrgn = OS.CreateRectRgn (0, 0, 0, 0);
+ int /*long*/ hrgn = OS.CreateRectRgn (0, 0, 0, 0);
OS.SelectClipRgn (nmcd.hdc, hrgn);
OS.DeleteObject (hrgn);
}
@@ -440,7 +441,7 @@ LRESULT CDDS_ITEMPREPAINT (NMLVCUSTOMDRAW nmcd, int wParam, int lParam) {
return new LRESULT (OS.CDRF_NOTIFYSUBITEMDRAW | OS.CDRF_NOTIFYPOSTPAINT);
}
-LRESULT CDDS_POSTPAINT (NMLVCUSTOMDRAW nmcd, int wParam, int lParam) {
+LRESULT CDDS_POSTPAINT (NMLVCUSTOMDRAW nmcd, int /*long*/ wParam, int /*long*/ lParam) {
if (ignoreCustomDraw) return null;
/*
* Bug in Windows. When the table has the extended style
@@ -453,7 +454,7 @@ LRESULT CDDS_POSTPAINT (NMLVCUSTOMDRAW nmcd, int wParam, int lParam) {
if (--customCount == 0 && OS.IsWindowVisible (handle)) {
if (!explorerTheme && (style & SWT.FULL_SELECTION) != 0) {
if (OS.SendMessage (handle, OS.LVM_GETBKCOLOR, 0, 0) == OS.CLR_NONE) {
- int dwExStyle = OS.SendMessage (handle, OS.LVM_GETEXTENDEDLISTVIEWSTYLE, 0, 0);
+ int dwExStyle = (int)/*64*/OS.SendMessage (handle, OS.LVM_GETEXTENDEDLISTVIEWSTYLE, 0, 0);
if ((dwExStyle & OS.LVS_EX_FULLROWSELECT) == 0) {
int bits = OS.LVS_EX_FULLROWSELECT;
if (OS.IsWinCE) {
@@ -463,7 +464,7 @@ LRESULT CDDS_POSTPAINT (NMLVCUSTOMDRAW nmcd, int wParam, int lParam) {
OS.ValidateRect (handle, null);
if (damaged) OS.InvalidateRect (handle, rect, true);
} else {
- int rgn = OS.CreateRectRgn (0, 0, 0, 0);
+ int /*long*/ 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);
@@ -477,7 +478,7 @@ LRESULT CDDS_POSTPAINT (NMLVCUSTOMDRAW nmcd, int wParam, int lParam) {
return null;
}
-LRESULT CDDS_PREPAINT (NMLVCUSTOMDRAW nmcd, int wParam, int lParam) {
+LRESULT CDDS_PREPAINT (NMLVCUSTOMDRAW nmcd, int /*long*/ wParam, int /*long*/ lParam) {
if (ignoreCustomDraw) {
return new LRESULT (OS.CDRF_NOTIFYITEMDRAW | OS.CDRF_NOTIFYPOSTPAINT);
}
@@ -492,7 +493,7 @@ LRESULT CDDS_PREPAINT (NMLVCUSTOMDRAW nmcd, int wParam, int lParam) {
if (customCount++ == 0 && OS.IsWindowVisible (handle)) {
if (!explorerTheme && (style & SWT.FULL_SELECTION) != 0) {
if (OS.SendMessage (handle, OS.LVM_GETBKCOLOR, 0, 0) == OS.CLR_NONE) {
- int dwExStyle = OS.SendMessage (handle, OS.LVM_GETEXTENDEDLISTVIEWSTYLE, 0, 0);
+ int dwExStyle = (int)/*64*/OS.SendMessage (handle, OS.LVM_GETEXTENDEDLISTVIEWSTYLE, 0, 0);
if ((dwExStyle & OS.LVS_EX_FULLROWSELECT) != 0) {
int bits = OS.LVS_EX_FULLROWSELECT;
if (OS.IsWinCE) {
@@ -502,7 +503,7 @@ LRESULT CDDS_PREPAINT (NMLVCUSTOMDRAW nmcd, int wParam, int lParam) {
OS.ValidateRect (handle, null);
if (damaged) OS.InvalidateRect (handle, rect, true);
} else {
- int rgn = OS.CreateRectRgn (0, 0, 0, 0);
+ int /*long*/ 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);
@@ -522,7 +523,7 @@ LRESULT CDDS_PREPAINT (NMLVCUSTOMDRAW nmcd, int wParam, int lParam) {
* The fix is to draw the background using custom draw.
*/
if (explorerTheme && columnCount == 0) {
- int hDC = nmcd.hdc;
+ int /*long*/ hDC = nmcd.hdc;
RECT rect = new RECT ();
OS.SetRect (rect, nmcd.left, nmcd.top, nmcd.right, nmcd.bottom);
if (OS.IsWindowEnabled (handle) || findImageControl () != null) {
@@ -553,7 +554,7 @@ LRESULT CDDS_PREPAINT (NMLVCUSTOMDRAW nmcd, int wParam, int lParam) {
int clrSortBk = getSortColumnPixel ();
RECT columnRect = new RECT (), headerRect = new RECT ();
OS.GetClientRect (handle, columnRect);
- int hwndHeader = OS.SendMessage (handle, OS.LVM_GETHEADER, 0, 0);
+ int /*long*/ 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;
@@ -573,10 +574,10 @@ LRESULT CDDS_PREPAINT (NMLVCUSTOMDRAW nmcd, int wParam, int lParam) {
return new LRESULT (OS.CDRF_NOTIFYITEMDRAW | OS.CDRF_NOTIFYPOSTPAINT);
}
-LRESULT CDDS_SUBITEMPOSTPAINT (NMLVCUSTOMDRAW nmcd, int wParam, int lParam) {
+LRESULT CDDS_SUBITEMPOSTPAINT (NMLVCUSTOMDRAW nmcd, int /*long*/ wParam, int /*long*/ lParam) {
if (ignoreCustomDraw) return null;
if (nmcd.left == nmcd.right) return new LRESULT (OS.CDRF_DODEFAULT);
- int hDC = nmcd.hdc;
+ int /*long*/ hDC = nmcd.hdc;
if (ignoreDrawForeground) OS.RestoreDC (hDC, -1);
if (OS.IsWindowVisible (handle)) {
/*
@@ -588,10 +589,11 @@ LRESULT CDDS_SUBITEMPOSTPAINT (NMLVCUSTOMDRAW nmcd, int wParam, int lParam) {
if (OS.SendMessage (handle, OS.LVM_GETBKCOLOR, 0, 0) != OS.CLR_NONE) {
if ((sortDirection & (SWT.UP | SWT.DOWN)) != 0) {
if (sortColumn != null && !sortColumn.isDisposed ()) {
- int oldColumn = OS.SendMessage (handle, OS.LVM_GETSELECTEDCOLUMN, 0, 0);
+ int oldColumn = (int)/*64*/OS.SendMessage (handle, OS.LVM_GETSELECTEDCOLUMN, 0, 0);
if (oldColumn == -1) {
int newColumn = indexOf (sortColumn);
- int result = 0, rgn = 0;
+ int result = 0;
+ int /*long*/ 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);
@@ -607,7 +609,7 @@ LRESULT CDDS_SUBITEMPOSTPAINT (NMLVCUSTOMDRAW nmcd, int wParam, int lParam) {
}
}
if (hooks (SWT.PaintItem)) {
- TableItem item = _getItem (nmcd.dwItemSpec);
+ TableItem item = _getItem ((int)/*64*/nmcd.dwItemSpec);
sendPaintItemEvent (item, nmcd);
//widget could be disposed at this point
}
@@ -615,8 +617,8 @@ LRESULT CDDS_SUBITEMPOSTPAINT (NMLVCUSTOMDRAW nmcd, int wParam, int lParam) {
return null;
}
-LRESULT CDDS_SUBITEMPREPAINT (NMLVCUSTOMDRAW nmcd, int wParam, int lParam) {
- int hDC = nmcd.hdc;
+LRESULT CDDS_SUBITEMPREPAINT (NMLVCUSTOMDRAW nmcd, int /*long*/ wParam, int /*long*/ lParam) {
+ int /*long*/ hDC = nmcd.hdc;
if (explorerTheme && !ignoreCustomDraw && hooks (SWT.EraseItem) && (nmcd.left != nmcd.right)) {
OS.RestoreDC (hDC, -1);
}
@@ -628,9 +630,9 @@ LRESULT CDDS_SUBITEMPREPAINT (NMLVCUSTOMDRAW nmcd, int wParam, int lParam) {
* has been added to the array. The fix is to check for
* null.
*/
- TableItem item = _getItem (nmcd.dwItemSpec);
+ TableItem item = _getItem ((int)/*64*/nmcd.dwItemSpec);
if (item == null) return null;
- int hFont = item.cellFont != null ? item.cellFont [nmcd.iSubItem] : -1;
+ int /*long*/ hFont = item.cellFont != null ? item.cellFont [nmcd.iSubItem] : -1;
if (hFont == -1) hFont = item.font;
if (hFont != -1) OS.SelectObject (hDC, hFont);
if (ignoreCustomDraw || (nmcd.left == nmcd.right)) {
@@ -641,7 +643,7 @@ LRESULT CDDS_SUBITEMPREPAINT (NMLVCUSTOMDRAW nmcd, int wParam, int lParam) {
ignoreDrawForeground = ignoreDrawSelection = ignoreDrawFocus = ignoreDrawBackground = false;
if (OS.IsWindowVisible (handle)) {
if (hooks (SWT.MeasureItem)) {
- sendMeasureItemEvent (item, nmcd.dwItemSpec, nmcd.iSubItem, nmcd.hdc);
+ sendMeasureItemEvent (item, (int)/*64*/nmcd.dwItemSpec, nmcd.iSubItem, nmcd.hdc);
if (isDisposed () || item.isDisposed ()) return null;
}
if (hooks (SWT.EraseItem)) {
@@ -666,7 +668,7 @@ LRESULT CDDS_SUBITEMPREPAINT (NMLVCUSTOMDRAW nmcd, int wParam, int lParam) {
*/
if (OS.IsWindowVisible (handle) && OS.IsWindowEnabled (handle)) {
if (!explorerTheme && !ignoreDrawSelection && (style & SWT.FULL_SELECTION) != 0) {
- int bits = OS.SendMessage (handle, OS.LVM_GETEXTENDEDLISTVIEWSTYLE, 0, 0);
+ int bits = (int)/*64*/OS.SendMessage (handle, OS.LVM_GETEXTENDEDLISTVIEWSTYLE, 0, 0);
if ((bits & OS.LVS_EX_FULLROWSELECT) == 0) {
/*
* Bug in Windows. For some reason, CDIS_SELECTED always set,
@@ -676,8 +678,8 @@ LRESULT CDDS_SUBITEMPREPAINT (NMLVCUSTOMDRAW nmcd, int wParam, int lParam) {
LVITEM lvItem = new LVITEM ();
lvItem.mask = OS.LVIF_STATE;
lvItem.stateMask = OS.LVIS_SELECTED;
- lvItem.iItem = nmcd.dwItemSpec;
- int result = OS.SendMessage (handle, OS.LVM_GETITEM, 0, lvItem);
+ lvItem.iItem = (int)/*64*/nmcd.dwItemSpec;
+ int /*long*/ 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) {
@@ -699,7 +701,7 @@ LRESULT CDDS_SUBITEMPREPAINT (NMLVCUSTOMDRAW nmcd, int wParam, int lParam) {
}
}
if (clrSelection != -1) {
- RECT rect = item.getBounds (nmcd.dwItemSpec, nmcd.iSubItem, true, nmcd.iSubItem != 0, true, false, hDC);
+ RECT rect = item.getBounds ((int)/*64*/nmcd.dwItemSpec, nmcd.iSubItem, true, nmcd.iSubItem != 0, true, false, hDC);
fillBackground (hDC, clrSelection, rect);
}
}
@@ -717,8 +719,8 @@ LRESULT CDDS_SUBITEMPREPAINT (NMLVCUSTOMDRAW nmcd, int wParam, int lParam) {
boolean hasAttributes = true;
if (hFont == -1 && clrText == -1 && clrTextBk == -1) {
if (item.cellForeground == null && item.cellBackground == null && item.cellFont == null) {
- int hwndHeader = OS.SendMessage (handle, OS.LVM_GETHEADER, 0, 0);
- int count = OS.SendMessage (hwndHeader, OS.HDM_GETITEMCOUNT, 0, 0);
+ int /*long*/ 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;
}
}
@@ -754,9 +756,10 @@ LRESULT CDDS_SUBITEMPREPAINT (NMLVCUSTOMDRAW nmcd, int wParam, int lParam) {
* in CDDS_SUBITEMPOSTPAINT.
*/
if (clrTextBk != -1) {
- int oldColumn = OS.SendMessage (handle, OS.LVM_GETSELECTEDCOLUMN, 0, 0);
+ int oldColumn = (int)/*64*/OS.SendMessage (handle, OS.LVM_GETSELECTEDCOLUMN, 0, 0);
if (oldColumn != -1 && oldColumn == nmcd.iSubItem) {
- int result = 0, rgn = 0;
+ int result = 0;
+ int /*long*/ 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);
@@ -821,7 +824,7 @@ boolean checkData (TableItem item, int index, boolean redraw) {
return true;
}
-boolean checkHandle (int hwnd) {
+boolean checkHandle (int /*long*/ hwnd) {
if (hwnd == handle) return true;
return hwnd == OS.SendMessage (handle, OS.LVM_GETHEADER, 0, 0);
}
@@ -853,7 +856,7 @@ protected void checkSubclass () {
*/
public void clear (int index) {
checkWidget ();
- int count = OS.SendMessage (handle, OS.LVM_GETITEMCOUNT, 0, 0);
+ int count = (int)/*64*/OS.SendMessage (handle, OS.LVM_GETITEMCOUNT, 0, 0);
if (!(0 <= index && index < count)) error (SWT.ERROR_INVALID_RANGE);
TableItem item = items [index];
if (item != null) {
@@ -910,7 +913,7 @@ public void clear (int index) {
public void clear (int start, int end) {
checkWidget ();
if (start > end) return;
- int count = OS.SendMessage (handle, OS.LVM_GETITEMCOUNT, 0, 0);
+ int count = (int)/*64*/OS.SendMessage (handle, OS.LVM_GETITEMCOUNT, 0, 0);
if (!(0 <= start && start <= end && end < count)) {
error (SWT.ERROR_INVALID_RANGE);
}
@@ -985,7 +988,7 @@ public void clear (int [] indices) {
checkWidget ();
if (indices == null) error (SWT.ERROR_NULL_ARGUMENT);
if (indices.length == 0) return;
- int count = OS.SendMessage (handle, OS.LVM_GETITEMCOUNT, 0, 0);
+ int count = (int)/*64*/OS.SendMessage (handle, OS.LVM_GETITEMCOUNT, 0, 0);
for (int i=0; i<indices.length; i++) {
if (!(0 <= indices [i] && indices [i] < count)) {
error (SWT.ERROR_INVALID_RANGE);
@@ -1050,7 +1053,7 @@ public void clearAll () {
checkWidget ();
LVITEM lvItem = null;
boolean cleared = false;
- int count = OS.SendMessage (handle, OS.LVM_GETITEMCOUNT, 0, 0);
+ int count = (int)/*64*/OS.SendMessage (handle, OS.LVM_GETITEMCOUNT, 0, 0);
for (int i=0; i<count; i++) {
TableItem item = items [i];
if (item != null) {
@@ -1114,7 +1117,7 @@ public Point computeSize (int wHint, int hHint, boolean changed) {
// OS.ReleaseDC (handle, hDC);
// }
// }
- int hwndHeader = OS.SendMessage (handle, OS.LVM_GETHEADER, 0, 0);
+ int /*long*/ hwndHeader = OS.SendMessage (handle, OS.LVM_GETHEADER, 0, 0);
RECT rect = new RECT ();
OS.GetWindowRect (hwndHeader, rect);
int height = rect.bottom - rect.top;
@@ -1123,18 +1126,18 @@ public Point computeSize (int wHint, int hHint, boolean changed) {
bits |= wHint & 0xFFFF;
} else {
int width = 0;
- int count = OS.SendMessage (hwndHeader, OS.HDM_GETITEMCOUNT, 0, 0);
+ int count = (int)/*64*/OS.SendMessage (hwndHeader, OS.HDM_GETITEMCOUNT, 0, 0);
for (int i=0; i<count; i++) {
width += OS.SendMessage (handle, OS.LVM_GETCOLUMNWIDTH, i, 0);
}
bits |= width & 0xFFFF;
}
- int result = OS.SendMessage (handle, OS.LVM_APPROXIMATEVIEWRECT, -1, OS.MAKELPARAM (bits, 0xFFFF));
+ int /*long*/ result = OS.SendMessage (handle, OS.LVM_APPROXIMATEVIEWRECT, -1, OS.MAKELPARAM (bits, 0xFFFF));
int width = OS.LOWORD (result);
- int empty = OS.SendMessage (handle, OS.LVM_APPROXIMATEVIEWRECT, 0, 0);
- int oneItem = OS.SendMessage (handle, OS.LVM_APPROXIMATEVIEWRECT, 1, 0);
+ int /*long*/ empty = OS.SendMessage (handle, OS.LVM_APPROXIMATEVIEWRECT, 0, 0);
+ int /*long*/ oneItem = OS.SendMessage (handle, OS.LVM_APPROXIMATEVIEWRECT, 1, 0);
int itemHeight = OS.HIWORD (oneItem) - OS.HIWORD (empty);
- height += OS.SendMessage (handle, OS.LVM_GETITEMCOUNT, 0, 0) * itemHeight;
+ height += (int)/*64*/OS.SendMessage (handle, OS.LVM_GETITEMCOUNT, 0, 0) * itemHeight;
if (width == 0) width = DEFAULT_WIDTH;
if (height == 0) height = DEFAULT_HEIGHT;
if (wHint != SWT.DEFAULT) width = wHint;
@@ -1164,8 +1167,8 @@ void createHandle () {
/* Get the header window proc */
if (HeaderProc == 0) {
- int hwndHeader = OS.SendMessage (handle, OS.LVM_GETHEADER, 0, 0);
- HeaderProc = OS.GetWindowLong (hwndHeader, OS.GWL_WNDPROC);
+ int /*long*/ hwndHeader = OS.SendMessage (handle, OS.LVM_GETHEADER, 0, 0);
+ HeaderProc = OS.GetWindowLongPtr (hwndHeader, OS.GWLP_WNDPROC);
}
/*
@@ -1194,8 +1197,8 @@ void createHandle () {
/* Set the checkbox image list */
if ((style & SWT.CHECK) != 0) {
- int empty = OS.SendMessage (handle, OS.LVM_APPROXIMATEVIEWRECT, 0, 0);
- int oneItem = OS.SendMessage (handle, OS.LVM_APPROXIMATEVIEWRECT, 1, 0);
+ int /*long*/ empty = OS.SendMessage (handle, OS.LVM_APPROXIMATEVIEWRECT, 0, 0);
+ int /*long*/ 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);
@@ -1213,7 +1216,7 @@ void createHandle () {
* The control will not destroy a font that it did not
* create.
*/
- int hFont = OS.GetStockObject (OS.SYSTEM_FONT);
+ int /*long*/ hFont = OS.GetStockObject (OS.SYSTEM_FONT);
OS.SendMessage (handle, OS.WM_SETFONT, hFont, 0);
/*
@@ -1225,8 +1228,8 @@ void createHandle () {
*/
LVCOLUMN lvColumn = new LVCOLUMN ();
lvColumn.mask = OS.LVCF_TEXT | OS.LVCF_WIDTH;
- int hHeap = OS.GetProcessHeap ();
- int pszText = OS.HeapAlloc (hHeap, OS.HEAP_ZERO_MEMORY, TCHAR.sizeof);
+ int /*long*/ hHeap = OS.GetProcessHeap ();
+ int /*long*/ 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);
@@ -1249,7 +1252,7 @@ void createHandle () {
*/
if (OS.WIN32_VERSION < OS.VERSION (4, 10)) return;
if ((style & SWT.RIGHT_TO_LEFT) != 0) {
- int hwndHeader = OS.SendMessage (handle, OS.LVM_GETHEADER, 0, 0);
+ int /*long*/ 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);
}
@@ -1281,7 +1284,7 @@ void createHeaderToolTips () {
void createItem (TableColumn column, int index) {
if (!(0 <= index && index <= columnCount)) error (SWT.ERROR_INVALID_RANGE);
- int oldColumn = OS.SendMessage (handle, OS.LVM_GETSELECTEDCOLUMN, 0, 0);
+ int oldColumn = (int)/*64*/OS.SendMessage (handle, OS.LVM_GETSELECTEDCOLUMN, 0, 0);
if (oldColumn >= index) {
OS.SendMessage (handle, OS.LVM_SETSELECTEDCOLUMN, oldColumn + 1, 0);
}
@@ -1290,7 +1293,7 @@ void createItem (TableColumn column, int index) {
System.arraycopy (columns, 0, newColumns, 0, columns.length);
columns = newColumns;
}
- int itemCount = OS.SendMessage (handle, OS.LVM_GETITEMCOUNT, 0, 0);
+ int itemCount = (int)/*64*/OS.SendMessage (handle, OS.LVM_GETITEMCOUNT, 0, 0);
for (int i=0; i<itemCount; i++) {
TableItem item = items [i];
if (item != null) {
@@ -1339,8 +1342,8 @@ void createItem (TableColumn column, int index) {
item.cellForeground = temp;
}
if (item.cellFont != null) {
- int [] cellFont = item.cellFont;
- int [] temp = new int [columnCount + 1];
+ int /*long*/ [] cellFont = item.cellFont;
+ int /*long*/ [] temp = new int /*long*/ [columnCount + 1];
System.arraycopy (cellFont, 0, temp, 0, index);
System.arraycopy (cellFont, index, temp, index + 1, columnCount - index);
temp [index] = -1;
@@ -1372,9 +1375,9 @@ void createItem (TableColumn column, int index) {
OS.SendMessage (handle, OS.LVM_GETCOLUMN, 1, lvColumn);
int width = lvColumn.cx;
int cchTextMax = 1024;
- int hHeap = OS.GetProcessHeap ();
+ int /*long*/ hHeap = OS.GetProcessHeap ();
int byteCount = cchTextMax * TCHAR.sizeof;
- int pszText = OS.HeapAlloc (hHeap, OS.HEAP_ZERO_MEMORY, byteCount);
+ int /*long*/ 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;
@@ -1416,7 +1419,7 @@ void createItem (TableColumn column, int index) {
/* Add the tool tip item for the header */
if (headerToolTipHandle != 0) {
RECT rect = new RECT ();
- int hwndHeader = OS.SendMessage (handle, OS.LVM_GETHEADER, 0, 0);
+ int /*long*/ 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;
@@ -1434,7 +1437,7 @@ void createItem (TableColumn column, int index) {
}
void createItem (TableItem item, int index) {
- int count = OS.SendMessage (handle, OS.LVM_GETITEMCOUNT, 0, 0);
+ int count = (int)/*64*/OS.SendMessage (handle, OS.LVM_GETITEMCOUNT, 0, 0);
if (!(0 <= index && index <= count)) error (SWT.ERROR_INVALID_RANGE);
if (count == items.length) {
/*
@@ -1468,7 +1471,7 @@ void createItem (TableItem item, int index) {
/* Insert the item */
setDeferResize (true);
ignoreSelect = ignoreShrink = true;
- int result = OS.SendMessage (handle, OS.LVM_INSERTITEM, 0, lvItem);
+ int result = (int)/*64*/OS.SendMessage (handle, OS.LVM_INSERTITEM, 0, lvItem);
ignoreSelect = ignoreShrink = false;
if (result == -1) error (SWT.ERROR_ITEM_NOT_ADDED);
System.arraycopy (items, index, items, index + 1, count - index);
@@ -1492,7 +1495,7 @@ int defaultBackground () {
void deregister () {
super.deregister ();
- int hwndHeader = OS.SendMessage (handle, OS.LVM_GETHEADER, 0, 0);
+ int /*long*/ hwndHeader = OS.SendMessage (handle, OS.LVM_GETHEADER, 0, 0);
if (hwndHeader != 0) display.removeControl (hwndHeader);
}
@@ -1575,7 +1578,7 @@ public void deselect (int index) {
*/
public void deselect (int start, int end) {
checkWidget ();
- int count = OS.SendMessage (handle, OS.LVM_GETITEMCOUNT, 0, 0);
+ int count = (int)/*64*/OS.SendMessage (handle, OS.LVM_GETITEMCOUNT, 0, 0);
if (start == 0 && end == count - 1) {
deselectAll ();
} else {
@@ -1618,7 +1621,7 @@ void destroyItem (TableColumn column) {
if (columns [index] == column) break;
index++;
}
- int oldColumn = OS.SendMessage (handle, OS.LVM_GETSELECTEDCOLUMN, 0, 0);
+ int oldColumn = (int)/*64*/OS.SendMessage (handle, OS.LVM_GETSELECTEDCOLUMN, 0, 0);
if (oldColumn == index) {
OS.SendMessage (handle, OS.LVM_SETSELECTEDCOLUMN, -1, 0);
} else {
@@ -1640,9 +1643,9 @@ void destroyItem (TableColumn column) {
if (columnCount > 1) {
index = 1;
int cchTextMax = 1024;
- int hHeap = OS.GetProcessHeap ();
+ int /*long*/ hHeap = OS.GetProcessHeap ();
int byteCount = cchTextMax * TCHAR.sizeof;
- int pszText = OS.HeapAlloc (hHeap, OS.HEAP_ZERO_MEMORY, byteCount);
+ int /*long*/ 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;
@@ -1653,8 +1656,8 @@ void destroyItem (TableColumn column) {
OS.SendMessage (handle, OS.LVM_SETCOLUMN, 0, lvColumn);
if (pszText != 0) OS.HeapFree (hHeap, 0, pszText);
} else {
- int hHeap = OS.GetProcessHeap ();
- int pszText = OS.HeapAlloc (hHeap, OS.HEAP_ZERO_MEMORY, TCHAR.sizeof);
+ int /*long*/ hHeap = OS.GetProcessHeap ();
+ int /*long*/ 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;
@@ -1666,7 +1669,7 @@ void destroyItem (TableColumn column) {
HDITEM hdItem = new HDITEM ();
hdItem.mask = OS.HDI_FORMAT;
hdItem.fmt = OS.HDF_LEFT;
- int hwndHeader = OS.SendMessage (handle, OS.LVM_GETHEADER, 0, 0);
+ int /*long*/ hwndHeader = OS.SendMessage (handle, OS.LVM_GETHEADER, 0, 0);
OS.SendMessage (hwndHeader, OS.HDM_SETITEM, index, hdItem);
}
}
@@ -1675,7 +1678,7 @@ void destroyItem (TableColumn column) {
lvItem.mask = OS.LVIF_TEXT | OS.LVIF_IMAGE;
lvItem.pszText = OS.LPSTR_TEXTCALLBACK;
lvItem.iImage = OS.I_IMAGECALLBACK;
- int itemCount = OS.SendMessage (handle, OS.LVM_GETITEMCOUNT, 0, 0);
+ int itemCount = (int)/*64*/OS.SendMessage (handle, OS.LVM_GETITEMCOUNT, 0, 0);
for (int i=0; i<itemCount; i++) {
lvItem.iItem = i;
OS.SendMessage (handle, OS.LVM_SETITEM, 0, lvItem);
@@ -1690,7 +1693,7 @@ void destroyItem (TableColumn column) {
if (first) index = 0;
System.arraycopy (columns, index + 1, columns, index, --columnCount - index);
columns [columnCount] = null;
- int itemCount = OS.SendMessage (handle, OS.LVM_GETITEMCOUNT, 0, 0);
+ int itemCount = (int)/*64*/OS.SendMessage (handle, OS.LVM_GETITEMCOUNT, 0, 0);
for (int i=0; i<itemCount; i++) {
TableItem item = items [i];
if (item != null) {
@@ -1738,8 +1741,8 @@ void destroyItem (TableColumn column) {
item.cellForeground = temp;
}
if (item.cellFont != null) {
- int [] cellFont = item.cellFont;
- int [] temp = new int [columnCount];
+ int /*long*/ [] cellFont = item.cellFont;
+ int /*long*/ [] temp = new int /*long*/ [columnCount];
System.arraycopy (cellFont, 0, temp, 0, index);
System.arraycopy (cellFont, index + 1, temp, index, columnCount - index);
item.cellFont = temp;
@@ -1809,7 +1812,7 @@ void destroyItem (TableColumn column) {
}
void destroyItem (TableItem item) {
- int count = OS.SendMessage (handle, OS.LVM_GETITEMCOUNT, 0, 0);
+ int count = (int)/*64*/OS.SendMessage (handle, OS.LVM_GETITEMCOUNT, 0, 0);
int index = 0;
while (index < count) {
if (items [index] == item) break;
@@ -1818,7 +1821,7 @@ void destroyItem (TableItem item) {
if (index == count) return;
setDeferResize (true);
ignoreSelect = ignoreShrink = true;
- int code = OS.SendMessage (handle, OS.LVM_DELETEITEM, index, 0);
+ int /*long*/ code = OS.SendMessage (handle, OS.LVM_DELETEITEM, index, 0);
ignoreSelect = ignoreShrink = false;
if (code == 0) error (SWT.ERROR_ITEM_NOT_REMOVED);
System.arraycopy (items, index + 1, items, index, --count - index);
@@ -1835,11 +1838,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 hImageList = OS.SendMessage (handle, OS.LVM_GETIMAGELIST, OS.LVSIL_SMALL, 0);
+ int /*long*/ 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 hStateList = OS.SendMessage (handle, OS.LVM_GETIMAGELIST, OS.LVSIL_STATE, 0);
+ int /*long*/ 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);
@@ -1849,7 +1852,7 @@ void fixCheckboxImageList (boolean fixScroll) {
void fixCheckboxImageListColor (boolean fixScroll) {
if ((style & SWT.CHECK) == 0) return;
- int hStateList = OS.SendMessage (handle, OS.LVM_GETIMAGELIST, OS.LVSIL_STATE, 0);
+ int /*long*/ 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);
@@ -1870,7 +1873,7 @@ void fixItemHeight (boolean fixScroll) {
*/
if (itemHeight != -1) return;
if (OS.COMCTL32_VERSION >= OS.VERSION (5, 80)) return;
- int bits = OS.SendMessage (handle, OS.LVM_GETEXTENDEDLISTVIEWSTYLE, 0, 0);
+ int bits = (int)/*64*/OS.SendMessage (handle, OS.LVM_GETEXTENDEDLISTVIEWSTYLE, 0, 0);
if ((bits & OS.LVS_EX_GRIDLINES) == 0) return;
bits = OS.GetWindowLong (handle, OS.GWL_STYLE);
if ((bits & OS.LVS_NOCOLUMNHEADER) != 0) return;
@@ -1888,18 +1891,18 @@ void fixItemHeight (boolean fixScroll) {
setRedraw (false);
setTopIndex (0);
}
- int hOldList = OS.SendMessage (handle, OS.LVM_GETIMAGELIST, OS.LVSIL_SMALL, 0);
+ int /*long*/ hOldList = OS.SendMessage (handle, OS.LVM_GETIMAGELIST, OS.LVSIL_SMALL, 0);
if (hOldList != 0) return;
- int hwndHeader = OS.SendMessage (handle, OS.LVM_GETHEADER, 0, 0);
+ int /*long*/ 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 hImageList = OS.ImageList_Create (1, height, 0, 0, 0);
+ int /*long*/ 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 hHeaderImageList = headerImageList.getHandle ();
+ int /*long*/ hHeaderImageList = headerImageList.getHandle ();
OS.SendMessage (hwndHeader, OS.HDM_SETIMAGELIST, 0, hHeaderImageList);
}
OS.ImageList_Destroy (hImageList);
@@ -2033,7 +2036,7 @@ public TableColumn [] getColumns () {
int getFocusIndex () {
// checkWidget ();
- return OS.SendMessage (handle, OS.LVM_GETNEXTITEM, -1, OS.LVNI_FOCUSED);
+ return (int)/*64*/OS.SendMessage (handle, OS.LVM_GETNEXTITEM, -1, OS.LVNI_FOCUSED);
}
/**
@@ -2065,7 +2068,7 @@ public int getGridLineWidth () {
*/
public int getHeaderHeight () {
checkWidget ();
- int hwndHeader = OS.SendMessage (handle, OS.LVM_GETHEADER, 0, 0);
+ int /*long*/ hwndHeader = OS.SendMessage (handle, OS.LVM_GETHEADER, 0, 0);
if (hwndHeader == 0) return 0;
RECT rect = new RECT ();
OS.GetWindowRect (hwndHeader, rect);
@@ -2112,7 +2115,7 @@ public boolean getHeaderVisible () {
*/
public TableItem getItem (int index) {
checkWidget ();
- int count = OS.SendMessage (handle, OS.LVM_GETITEMCOUNT, 0, 0);
+ int count = (int)/*64*/OS.SendMessage (handle, OS.LVM_GETITEMCOUNT, 0, 0);
if (!(0 <= index && index < count)) error (SWT.ERROR_INVALID_RANGE);
return _getItem (index);
}
@@ -2158,7 +2161,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 hwndHeader = OS.SendMessage (handle, OS.LVM_GETHEADER, 0, 0);
+ int /*long*/ hwndHeader = OS.SendMessage (handle, OS.LVM_GETHEADER, 0, 0);
if (hwndHeader != 0) {
RECT rect = new RECT ();
OS.GetWindowRect (hwndHeader, rect);
@@ -2187,7 +2190,7 @@ public TableItem getItem (Point point) {
*/
public int getItemCount () {
checkWidget ();
- return OS.SendMessage (handle, OS.LVM_GETITEMCOUNT, 0, 0);
+ return (int)/*64*/OS.SendMessage (handle, OS.LVM_GETITEMCOUNT, 0, 0);
}
/**
@@ -2203,8 +2206,8 @@ public int getItemCount () {
*/
public int getItemHeight () {
checkWidget ();
- int empty = OS.SendMessage (handle, OS.LVM_APPROXIMATEVIEWRECT, 0, 0);
- int oneItem = OS.SendMessage (handle, OS.LVM_APPROXIMATEVIEWRECT, 1, 0);
+ int /*long*/ empty = OS.SendMessage (handle, OS.LVM_APPROXIMATEVIEWRECT, 0, 0);
+ int /*long*/ oneItem = OS.SendMessage (handle, OS.LVM_APPROXIMATEVIEWRECT, 1, 0);
return OS.HIWORD (oneItem) - OS.HIWORD (empty);
}
@@ -2226,7 +2229,7 @@ public int getItemHeight () {
*/
public TableItem [] getItems () {
checkWidget ();
- int count = OS.SendMessage (handle, OS.LVM_GETITEMCOUNT, 0, 0);
+ int count = (int)/*64*/OS.SendMessage (handle, OS.LVM_GETITEMCOUNT, 0, 0);
TableItem [] result = new TableItem [count];
if ((style & SWT.VIRTUAL) != 0) {
for (int i=0; i<count; i++) {
@@ -2257,7 +2260,7 @@ public TableItem [] getItems () {
*/
public boolean getLinesVisible () {
checkWidget ();
- int bits = OS.SendMessage (handle, OS.LVM_GETEXTENDEDLISTVIEWSTYLE, 0, 0);
+ int bits = (int)/*64*/OS.SendMessage (handle, OS.LVM_GETEXTENDEDLISTVIEWSTYLE, 0, 0);
return (bits & OS.LVS_EX_GRIDLINES) != 0;
}
@@ -2279,9 +2282,9 @@ public boolean getLinesVisible () {
*/
public TableItem [] getSelection () {
checkWidget ();
- int i = -1, j = 0, count = OS.SendMessage (handle, OS.LVM_GETSELECTEDCOUNT, 0, 0);
+ int i = -1, j = 0, count = (int)/*64*/OS.SendMessage (handle, OS.LVM_GETSELECTEDCOUNT, 0, 0);
TableItem [] result = new TableItem [count];
- while ((i = OS.SendMessage (handle, OS.LVM_GETNEXTITEM, i, OS.LVNI_SELECTED)) != -1) {
+ while ((i = (int)/*64*/OS.SendMessage (handle, OS.LVM_GETNEXTITEM, i, OS.LVNI_SELECTED)) != -1) {
result [j++] = _getItem (i);
}
return result;
@@ -2299,7 +2302,7 @@ public TableItem [] getSelection () {
*/
public int getSelectionCount () {
checkWidget ();
- return OS.SendMessage (handle, OS.LVM_GETSELECTEDCOUNT, 0, 0);
+ return (int)/*64*/OS.SendMessage (handle, OS.LVM_GETSELECTEDCOUNT, 0, 0);
}
/**
@@ -2315,11 +2318,11 @@ public int getSelectionCount () {
*/
public int getSelectionIndex () {
checkWidget ();
- int focusIndex = OS.SendMessage (handle, OS.LVM_GETNEXTITEM, -1, OS.LVNI_FOCUSED);
- int selectedIndex = OS.SendMessage (handle, OS.LVM_GETNEXTITEM, -1, OS.LVNI_SELECTED);
+ int focusIndex = (int)/*64*/OS.SendMessage (handle, OS.LVM_GETNEXTITEM, -1, OS.LVNI_FOCUSED);
+ int selectedIndex = (int)/*64*/OS.SendMessage (handle, OS.LVM_GETNEXTITEM, -1, OS.LVNI_SELECTED);
if (focusIndex == selectedIndex) return selectedIndex;
int i = -1;
- while ((i = OS.SendMessage (handle, OS.LVM_GETNEXTITEM, i, OS.LVNI_SELECTED)) != -1) {
+ while ((i = (int)/*64*/OS.SendMessage (handle, OS.LVM_GETNEXTITEM, i, OS.LVNI_SELECTED)) != -1) {
if (i == focusIndex) return i;
}
return selectedIndex;
@@ -2343,9 +2346,9 @@ public int getSelectionIndex () {
*/
public int [] getSelectionIndices () {
checkWidget ();
- int i = -1, j = 0, count = OS.SendMessage (handle, OS.LVM_GETSELECTEDCOUNT, 0, 0);
+ int i = -1, j = 0, count = (int)/*64*/OS.SendMessage (handle, OS.LVM_GETSELECTEDCOUNT, 0, 0);
int [] result = new int [count];
- while ((i = OS.SendMessage (handle, OS.LVM_GETNEXTITEM, i, OS.LVNI_SELECTED)) != -1) {
+ while ((i = (int)/*64*/OS.SendMessage (handle, OS.LVM_GETNEXTITEM, i, OS.LVNI_SELECTED)) != -1) {
result [j++] = i;
}
return result;
@@ -2430,12 +2433,12 @@ public int getTopIndex () {
* is displaying blank lines at the top of the controls. The
* fix is to check for a negative number and return zero instead.
*/
- return Math.max (0, OS.SendMessage (handle, OS.LVM_GETTOPINDEX, 0, 0));
+ return Math.max (0, (int)/*64*/OS.SendMessage (handle, OS.LVM_GETTOPINDEX, 0, 0));
}
boolean hasChildren () {
- int hwndHeader = OS.SendMessage (handle, OS.LVM_GETHEADER, 0, 0);
- int hwndChild = OS.GetWindow (handle, OS.GW_CHILD);
+ int /*long*/ hwndHeader = OS.SendMessage (handle, OS.LVM_GETHEADER, 0, 0);
+ int /*long*/ hwndChild = OS.GetWindow (handle, OS.GW_CHILD);
while (hwndChild != 0) {
if (hwndChild != hwndHeader) return true;
hwndChild = OS.GetWindow (hwndChild, OS.GW_HWNDNEXT);
@@ -2455,7 +2458,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 hImageList = imageList.getHandle ();
+ int /*long*/ hImageList = imageList.getHandle ();
/*
* Bug in Windows. Making any change to an item that
* changes the item height of a table while the table
@@ -2472,8 +2475,8 @@ int imageIndex (Image image, int column) {
}
OS.SendMessage (handle, OS.LVM_SETIMAGELIST, OS.LVSIL_SMALL, hImageList);
if (headerImageList != null) {
- int hwndHeader = OS.SendMessage (handle, OS.LVM_GETHEADER, 0, 0);
- int hHeaderImageList = headerImageList.getHandle ();
+ int /*long*/ hwndHeader = OS.SendMessage (handle, OS.LVM_GETHEADER, 0, 0);
+ int /*long*/ hHeaderImageList = headerImageList.getHandle ();
OS.SendMessage (hwndHeader, OS.HDM_SETIMAGELIST, 0, hHeaderImageList);
}
fixCheckboxImageList (false);
@@ -2496,8 +2499,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 hImageList = headerImageList.getHandle ();
- int hwndHeader = OS.SendMessage (handle, OS.LVM_GETHEADER, 0, 0);
+ int /*long*/ hImageList = headerImageList.getHandle ();
+ int /*long*/ hwndHeader = OS.SendMessage (handle, OS.LVM_GETHEADER, 0, 0);
OS.SendMessage (hwndHeader, OS.HDM_SETIMAGELIST, 0, hImageList);
return index;
}
@@ -2552,7 +2555,7 @@ public int indexOf (TableColumn column) {
public int indexOf (TableItem item) {
checkWidget ();
if (item == null) error (SWT.ERROR_NULL_ARGUMENT);
- int count = OS.SendMessage (handle, OS.LVM_GETITEMCOUNT, 0, 0);
+ int count = (int)/*64*/OS.SendMessage (handle, OS.LVM_GETITEMCOUNT, 0, 0);
if (1 <= lastIndexOf && lastIndexOf < count - 1) {
if (items [lastIndexOf] == item) return lastIndexOf;
if (items [lastIndexOf + 1] == item) return ++lastIndexOf;
@@ -2589,19 +2592,19 @@ public boolean isSelected (int index) {
lvItem.mask = OS.LVIF_STATE;
lvItem.stateMask = OS.LVIS_SELECTED;
lvItem.iItem = index;
- int result = OS.SendMessage (handle, OS.LVM_GETITEM, 0, lvItem);
+ int /*long*/ result = OS.SendMessage (handle, OS.LVM_GETITEM, 0, lvItem);
return (result != 0) && ((lvItem.state & OS.LVIS_SELECTED) != 0);
}
void register () {
super.register ();
- int hwndHeader = OS.SendMessage (handle, OS.LVM_GETHEADER, 0, 0);
+ int /*long*/ hwndHeader = OS.SendMessage (handle, OS.LVM_GETHEADER, 0, 0);
if (hwndHeader != 0) display.addControl (hwndHeader, this);
}
void releaseChildren (boolean destroy) {
if (items != null) {
- int itemCount = OS.SendMessage (handle, OS.LVM_GETITEMCOUNT, 0, 0);
+ int itemCount = (int)/*64*/OS.SendMessage (handle, OS.LVM_GETITEMCOUNT, 0, 0);
/*
* Feature in Windows 98. When there are a large number
* of columns and items in a table (>1000) where each
@@ -2654,12 +2657,12 @@ void releaseWidget () {
display.releaseImageList (imageList);
}
if (headerImageList != null) {
- int hwndHeader = OS.SendMessage (handle, OS.LVM_GETHEADER, 0, 0);
+ int /*long*/ hwndHeader = OS.SendMessage (handle, OS.LVM_GETHEADER, 0, 0);
OS.SendMessage (hwndHeader, OS.HDM_SETIMAGELIST, 0, 0);
display.releaseImageList (headerImageList);
}
imageList = headerImageList = null;
- int hStateList = OS.SendMessage (handle, OS.LVM_GETIMAGELIST, OS.LVSIL_STATE, 0);
+ int /*long*/ 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);
@@ -2689,7 +2692,7 @@ public void remove (int [] indices) {
System.arraycopy (indices, 0, newIndices, 0, indices.length);
sort (newIndices);
int start = newIndices [newIndices.length - 1], end = newIndices [0];
- int count = OS.SendMessage (handle, OS.LVM_GETITEMCOUNT, 0, 0);
+ int count = (int)/*64*/OS.SendMessage (handle, OS.LVM_GETITEMCOUNT, 0, 0);
if (!(0 <= start && start <= end && end < count)) {
error (SWT.ERROR_INVALID_RANGE);
}
@@ -2701,7 +2704,7 @@ public void remove (int [] indices) {
TableItem item = items [index];
if (item != null && !item.isDisposed ()) item.release (false);
ignoreSelect = ignoreShrink = true;
- int code = OS.SendMessage (handle, OS.LVM_DELETEITEM, index, 0);
+ int /*long*/ code = OS.SendMessage (handle, OS.LVM_DELETEITEM, index, 0);
ignoreSelect = ignoreShrink = false;
if (code == 0) error (SWT.ERROR_ITEM_NOT_REMOVED);
System.arraycopy (items, index + 1, items, index, --count - index);
@@ -2729,13 +2732,13 @@ public void remove (int [] indices) {
*/
public void remove (int index) {
checkWidget ();
- int count = OS.SendMessage (handle, OS.LVM_GETITEMCOUNT, 0, 0);
+ int count = (int)/*64*/OS.SendMessage (handle, OS.LVM_GETITEMCOUNT, 0, 0);
if (!(0 <= index && index < count)) error (SWT.ERROR_INVALID_RANGE);
TableItem item = items [index];
if (item != null && !item.isDisposed ()) item.release (false);
setDeferResize (true);
ignoreSelect = ignoreShrink = true;
- int code = OS.SendMessage (handle, OS.LVM_DELETEITEM, index, 0);
+ int /*long*/ code = OS.SendMessage (handle, OS.LVM_DELETEITEM, index, 0);
ignoreSelect = ignoreShrink = false;
if (code == 0) error (SWT.ERROR_ITEM_NOT_REMOVED);
System.arraycopy (items, index + 1, items, index, --count - index);
@@ -2763,7 +2766,7 @@ public void remove (int index) {
public void remove (int start, int end) {
checkWidget ();
if (start > end) return;
- int count = OS.SendMessage (handle, OS.LVM_GETITEMCOUNT, 0, 0);
+ int count = (int)/*64*/OS.SendMessage (handle, OS.LVM_GETITEMCOUNT, 0, 0);
if (!(0 <= start && start <= end && end < count)) {
error (SWT.ERROR_INVALID_RANGE);
}
@@ -2776,7 +2779,7 @@ public void remove (int start, int end) {
TableItem item = items [index];
if (item != null && !item.isDisposed ()) item.release (false);
ignoreSelect = ignoreShrink = true;
- int code = OS.SendMessage (handle, OS.LVM_DELETEITEM, start, 0);
+ int /*long*/ code = OS.SendMessage (handle, OS.LVM_DELETEITEM, start, 0);
ignoreSelect = ignoreShrink = false;
if (code == 0) break;
index++;
@@ -2804,7 +2807,7 @@ public void remove (int start, int end) {
*/
public void removeAll () {
checkWidget ();
- int itemCount = OS.SendMessage (handle, OS.LVM_GETITEMCOUNT, 0, 0);
+ int itemCount = (int)/*64*/OS.SendMessage (handle, OS.LVM_GETITEMCOUNT, 0, 0);
for (int i=0; i<itemCount; i++) {
TableItem item = items [i];
if (item != null && !item.isDisposed ()) item.release (false);
@@ -2830,7 +2833,7 @@ public void removeAll () {
int index = itemCount - 1;
while (index >= 0) {
ignoreSelect = ignoreShrink = true;
- int code = OS.SendMessage (handle, OS.LVM_DELETEITEM, index, 0);
+ int /*long*/ code = OS.SendMessage (handle, OS.LVM_DELETEITEM, index, 0);
ignoreSelect = ignoreShrink = false;
if (code == 0) break;
--index;
@@ -2849,7 +2852,7 @@ public void removeAll () {
if (index != -1) error (SWT.ERROR_ITEM_NOT_REMOVED);
} else {
ignoreSelect = ignoreShrink = true;
- int code = OS.SendMessage (handle, OS.LVM_DELETEALLITEMS, 0, 0);
+ int /*long*/ code = OS.SendMessage (handle, OS.LVM_DELETEALLITEMS, 0, 0);
ignoreSelect = ignoreShrink = false;
if (code == 0) error (SWT.ERROR_ITEM_NOT_REMOVED);
}
@@ -2979,7 +2982,7 @@ public void select (int index) {
public void select (int start, int end) {
checkWidget ();
if (end < 0 || start > end || ((style & SWT.SINGLE) != 0 && start != end)) return;
- int count = OS.SendMessage (handle, OS.LVM_GETITEMCOUNT, 0, 0);
+ int count = (int)/*64*/OS.SendMessage (handle, OS.LVM_GETITEMCOUNT, 0, 0);
if (count == 0 || start >= count) return;
start = Math.max (0, start);
end = Math.min (end, count - 1);
@@ -3024,9 +3027,9 @@ public void selectAll () {
ignoreSelect = false;
}
-void sendEraseItemEvent (TableItem item, NMLVCUSTOMDRAW nmcd, int lParam) {
- int hDC = nmcd.hdc;
- int hFont = item.cellFont != null ? item.cellFont [nmcd.iSubItem] : -1;
+void sendEraseItemEvent (TableItem item, NMLVCUSTOMDRAW nmcd, int /*long*/ lParam) {
+ int /*long*/ hDC = nmcd.hdc;
+ int /*long*/ hFont = item.cellFont != null ? item.cellFont [nmcd.iSubItem] : -1;
if (hFont == -1) hFont = item.font;
int clrText = item.cellForeground != null ? item.cellForeground [nmcd.iSubItem] : -1;
if (clrText == -1) clrText = item.foreground;
@@ -3050,8 +3053,8 @@ void sendEraseItemEvent (TableItem item, NMLVCUSTOMDRAW nmcd, int lParam) {
LVITEM lvItem = new LVITEM ();
lvItem.mask = OS.LVIF_STATE;
lvItem.stateMask = OS.LVIS_SELECTED;
- lvItem.iItem = nmcd.dwItemSpec;
- int result = OS.SendMessage (handle, OS.LVM_GETITEM, 0, lvItem);
+ lvItem.iItem = (int)/*64*/nmcd.dwItemSpec;
+ int /*long*/ 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;
@@ -3097,10 +3100,10 @@ void sendEraseItemEvent (TableItem item, NMLVCUSTOMDRAW nmcd, int lParam) {
if (selected) clrSelectionBk = data.background;
}
data.hFont = hFont;
- data.uiState = OS.SendMessage (handle, OS.WM_QUERYUISTATE, 0, 0);
+ data.uiState = (int)/*64*/OS.SendMessage (handle, OS.WM_QUERYUISTATE, 0, 0);
int nSavedDC = OS.SaveDC (hDC);
GC gc = GC.win32_new (hDC, data);
- RECT cellRect = item.getBounds (nmcd.dwItemSpec, nmcd.iSubItem, true, true, true, true, hDC);
+ RECT cellRect = item.getBounds ((int)/*64*/nmcd.dwItemSpec, nmcd.iSubItem, true, true, true, true, hDC);
Event event = new Event ();
event.item = item;
event.gc = gc;
@@ -3110,7 +3113,7 @@ void sendEraseItemEvent (TableItem item, NMLVCUSTOMDRAW nmcd, int lParam) {
if (OS.SendMessage (handle, OS.LVM_GETNEXTITEM, -1, OS.LVNI_FOCUSED) == nmcd.dwItemSpec) {
if (nmcd.iSubItem == 0 || (style & SWT.FULL_SELECTION) != 0) {
if (handle == OS.GetFocus ()) {
- int uiState = OS.SendMessage (handle, OS.WM_QUERYUISTATE, 0, 0);
+ int uiState = (int)/*64*/OS.SendMessage (handle, OS.WM_QUERYUISTATE, 0, 0);
if ((uiState & OS.UISF_HIDEFOCUS) == 0) event.detail |= SWT.FOCUSED;
}
}
@@ -3157,11 +3160,11 @@ void sendEraseItemEvent (TableItem item, NMLVCUSTOMDRAW nmcd, int lParam) {
nmcd.uItemState &= ~OS.CDIS_FOCUS;
OS.MoveMemory (lParam, nmcd, NMLVCUSTOMDRAW.sizeof);
}
- int hwndHeader = OS.SendMessage (handle, OS.LVM_GETHEADER, 0, 0);
+ int /*long*/ hwndHeader = OS.SendMessage (handle, OS.LVM_GETHEADER, 0, 0);
boolean firstColumn = nmcd.iSubItem == OS.SendMessage (hwndHeader, OS.HDM_ORDERTOINDEX, 0, 0);
if (ignoreDrawForeground && ignoreDrawHot) {
if (!ignoreDrawBackground && drawBackground) {
- RECT backgroundRect = item.getBounds (nmcd.dwItemSpec, nmcd.iSubItem, true, false, true, false, hDC);
+ RECT backgroundRect = item.getBounds ((int)/*64*/nmcd.dwItemSpec, nmcd.iSubItem, true, false, true, false, hDC);
fillBackground (hDC, clrTextBk, backgroundRect);
}
}
@@ -3173,8 +3176,8 @@ void sendEraseItemEvent (TableItem item, NMLVCUSTOMDRAW nmcd, int lParam) {
RECT rect = new RECT ();
OS.SetRect (rect, nmcd.left, nmcd.top, nmcd.right, nmcd.bottom);
if ((style & SWT.FULL_SELECTION) != 0) {
- int count = OS.SendMessage (hwndHeader, OS.HDM_GETITEMCOUNT, 0, 0);
- int index = OS.SendMessage (hwndHeader, OS.HDM_ORDERTOINDEX, count - 1, 0);
+ int count = (int)/*64*/OS.SendMessage (hwndHeader, OS.HDM_GETITEMCOUNT, 0, 0);
+ int index = (int)/*64*/OS.SendMessage (hwndHeader, OS.HDM_ORDERTOINDEX, count - 1, 0);
RECT headerRect = new RECT ();
OS.SendMessage (hwndHeader, OS.HDM_GETITEMRECT, index, headerRect);
OS.MapWindowPoints (hwndHeader, handle, headerRect, 2);
@@ -3186,27 +3189,27 @@ void sendEraseItemEvent (TableItem item, NMLVCUSTOMDRAW nmcd, int lParam) {
rect.right += EXPLORER_EXTRA;
pClipRect.right += EXPLORER_EXTRA;
}
- int hTheme = OS.OpenThemeData (handle, Display.LISTVIEW);
+ int /*long*/ hTheme = OS.OpenThemeData (handle, Display.LISTVIEW);
int iStateId = selected ? OS.LISS_SELECTED : OS.LISS_HOT;
if (OS.GetFocus () != handle && selected && !hot) iStateId = OS.LISS_SELECTEDNOTFOCUS;
OS.DrawThemeBackground (hTheme, hDC, OS.LVP_LISTITEM, iStateId, rect, pClipRect);
OS.CloseThemeData (hTheme);
} else {
boolean fullText = ((style & SWT.FULL_SELECTION) != 0 || !firstColumn);
- RECT textRect = item.getBounds (nmcd.dwItemSpec, nmcd.iSubItem, true, false, fullText, false, hDC);
+ RECT textRect = item.getBounds ((int)/*64*/nmcd.dwItemSpec, nmcd.iSubItem, true, false, fullText, false, hDC);
fillBackground (hDC, clrSelectionBk, textRect);
}
}
if (ignoreDrawForeground) {
- RECT clipRect = item.getBounds (nmcd.dwItemSpec, nmcd.iSubItem, true, true, true, false, hDC);
+ RECT clipRect = item.getBounds ((int)/*64*/nmcd.dwItemSpec, nmcd.iSubItem, true, true, true, false, hDC);
OS.SaveDC (hDC);
OS.SelectClipRgn (hDC, 0);
OS.ExcludeClipRect (hDC, clipRect.left, clipRect.top, clipRect.right, clipRect.bottom);
}
}
-Event sendMeasureItemEvent (TableItem item, int row, int column, int hDC) {
- int hFont = item.cellFont != null ? item.cellFont [column] : -1;
+Event sendMeasureItemEvent (TableItem item, int row, int column, int /*long*/ hDC) {
+ int /*long*/ hFont = item.cellFont != null ? item.cellFont [column] : -1;
if (hFont == -1) hFont = item.font;
GCData data = new GCData ();
data.device = display;
@@ -3228,7 +3231,7 @@ Event sendMeasureItemEvent (TableItem item, int row, int column, int hDC) {
OS.RestoreDC (hDC, nSavedDC);
if (!isDisposed () && !item.isDisposed ()) {
if (columnCount == 0) {
- int width = OS.SendMessage (handle, OS.LVM_GETCOLUMNWIDTH, 0, 0);
+ int width = (int)/*64*/OS.SendMessage (handle, OS.LVM_GETCOLUMNWIDTH, 0, 0);
if (event.x + event.width > width) {
OS.SendMessage (handle, OS.LVM_SETCOLUMNWIDTH, 0, event.x + event.width);
}
@@ -3238,7 +3241,7 @@ Event sendMeasureItemEvent (TableItem item, int row, int column, int hDC) {
return event;
}
-LRESULT sendMouseDownEvent (int type, int button, int msg, int wParam, int lParam) {
+LRESULT sendMouseDownEvent (int type, int button, int msg, int /*long*/ wParam, int /*long*/ lParam) {
/*
* Feature in Windows. Inside WM_LBUTTONDOWN and WM_RBUTTONDOWN,
* the widget starts a modal loop to determine if the user wants
@@ -3300,7 +3303,7 @@ LRESULT sendMouseDownEvent (int type, int button, int msg, int wParam, int lPara
* it as selected.
*/
boolean forceSelect = false;
- int count = OS.SendMessage (handle, OS.LVM_GETSELECTEDCOUNT, 0, 0);
+ int count = (int)/*64*/OS.SendMessage (handle, OS.LVM_GETSELECTEDCOUNT, 0, 0);
if (count == 1 && pinfo.iItem != -1) {
LVITEM lvItem = new LVITEM ();
lvItem.mask = OS.LVIF_STATE;
@@ -3325,7 +3328,7 @@ LRESULT sendMouseDownEvent (int type, int button, int msg, int wParam, int lPara
dragDetect = pinfo.iItem == -1 || (pinfo.flags & flags) == 0;
}
if (!dragDetect) display.runDragDrop = false;
- int code = callWindowProc (handle, msg, wParam, lParam, forceSelect);
+ int /*long*/ code = callWindowProc (handle, msg, wParam, lParam, forceSelect);
if (!dragDetect) display.runDragDrop = true;
if (dragStarted || !dragDetect) {
if (!display.captureChanged && !isDisposed ()) {
@@ -3346,10 +3349,10 @@ LRESULT sendMouseDownEvent (int type, int button, int msg, int wParam, int lPara
}
void sendPaintItemEvent (TableItem item, NMLVCUSTOMDRAW nmcd) {
- int hDC = nmcd.hdc;
+ int /*long*/ hDC = nmcd.hdc;
GCData data = new GCData ();
data.device = display;
- int hFont = item.cellFont != null ? item.cellFont [nmcd.iSubItem] : -1;
+ int /*long*/ hFont = item.cellFont != null ? item.cellFont [nmcd.iSubItem] : -1;
if (hFont == -1) hFont = item.font;
data.hFont = hFont;
/*
@@ -3360,8 +3363,8 @@ void sendPaintItemEvent (TableItem item, NMLVCUSTOMDRAW nmcd) {
LVITEM lvItem = new LVITEM ();
lvItem.mask = OS.LVIF_STATE;
lvItem.stateMask = OS.LVIS_SELECTED;
- lvItem.iItem = nmcd.dwItemSpec;
- int result = OS.SendMessage (handle, OS.LVM_GETITEM, 0, lvItem);
+ lvItem.iItem = (int)/*64*/nmcd.dwItemSpec;
+ int /*long*/ 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) {
@@ -3412,10 +3415,10 @@ void sendPaintItemEvent (TableItem item, NMLVCUSTOMDRAW nmcd) {
data.foreground = OS.GetSysColor (OS.COLOR_GRAYTEXT);
data.background = OS.GetSysColor (OS.COLOR_3DFACE);
}
- data.uiState = OS.SendMessage (handle, OS.WM_QUERYUISTATE, 0, 0);
+ data.uiState = (int)/*64*/OS.SendMessage (handle, OS.WM_QUERYUISTATE, 0, 0);
int nSavedDC = OS.SaveDC (hDC);
GC gc = GC.win32_new (hDC, data);
- RECT itemRect = item.getBounds (nmcd.dwItemSpec, nmcd.iSubItem, true, true, false, false, hDC);
+ RECT itemRect = item.getBounds ((int)/*64*/nmcd.dwItemSpec, nmcd.iSubItem, true, true, false, false, hDC);
Event event = new Event ();
event.item = item;
event.gc = gc;
@@ -3425,7 +3428,7 @@ void sendPaintItemEvent (TableItem item, NMLVCUSTOMDRAW nmcd) {
if (OS.SendMessage (handle, OS.LVM_GETNEXTITEM, -1, OS.LVNI_FOCUSED) == nmcd.dwItemSpec) {
if (nmcd.iSubItem == 0 || (style & SWT.FULL_SELECTION) != 0) {
if (handle == OS.GetFocus ()) {
- int uiState = OS.SendMessage (handle, OS.WM_QUERYUISTATE, 0, 0);
+ int uiState = (int)/*64*/OS.SendMessage (handle, OS.WM_QUERYUISTATE, 0, 0);
if ((uiState & OS.UISF_HIDEFOCUS) == 0) event.detail |= SWT.FOCUSED;
}
}
@@ -3437,7 +3440,7 @@ void sendPaintItemEvent (TableItem item, NMLVCUSTOMDRAW nmcd) {
event.y = itemRect.top;
event.width = itemRect.right - itemRect.left;
event.height = itemRect.bottom - itemRect.top;
- RECT cellRect = item.getBounds (nmcd.dwItemSpec, nmcd.iSubItem, true, true, true, true, hDC);
+ RECT cellRect = item.getBounds ((int)/*64*/nmcd.dwItemSpec, nmcd.iSubItem, true, true, true, true, hDC);
int cellWidth = cellRect.right - cellRect.left;
int cellHeight = cellRect.bottom - cellRect.top;
gc.setClipping (cellRect.left, cellRect.top, cellWidth, cellHeight);
@@ -3447,7 +3450,7 @@ void sendPaintItemEvent (TableItem item, NMLVCUSTOMDRAW nmcd) {
OS.RestoreDC (hDC, nSavedDC);
}
-void setBackgroundImage (int hBitmap) {
+void setBackgroundImage (int /*long*/ hBitmap) {
super.setBackgroundImage (hBitmap);
if (!customDraw) setBackgroundTransparent (hBitmap != 0);
}
@@ -3456,7 +3459,7 @@ void setBackgroundPixel (int newPixel) {
if (!customDraw) {
if (findImageControl () != null) return;
if (newPixel == -1) newPixel = defaultBackground ();
- int oldPixel = OS.SendMessage (handle, OS.LVM_GETBKCOLOR, 0, 0);
+ int oldPixel = (int)/*64*/OS.SendMessage (handle, OS.LVM_GETBKCOLOR, 0, 0);
if (oldPixel != newPixel) {
OS.SendMessage (handle, OS.LVM_SETBKCOLOR, 0, newPixel);
OS.SendMessage (handle, OS.LVM_SETTEXTBKCOLOR, 0, newPixel);
@@ -3486,7 +3489,7 @@ void setBackgroundTransparent (boolean transparent) {
* other custom drawing. The fix is to clear the selected
* column.
*/
- int oldPixel = OS.SendMessage (handle, OS.LVM_GETBKCOLOR, 0, 0);
+ int oldPixel = (int)/*64*/OS.SendMessage (handle, OS.LVM_GETBKCOLOR, 0, 0);
if (transparent) {
if (oldPixel != OS.CLR_NONE) {
/*
@@ -3600,7 +3603,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 hwndHeader = OS.SendMessage (handle, OS.LVM_GETHEADER, 0, 0);
+ int /*long*/ hwndHeader = OS.SendMessage (handle, OS.LVM_GETHEADER, 0, 0);
if (columnCount == 0) {
if (order.length != 0) error (SWT.ERROR_INVALID_ARGUMENT);
return;
@@ -3670,7 +3673,7 @@ void setDeferResize (boolean defer) {
if (--drawCount == 0 /*&& OS.IsWindowVisible (handle)*/) {
OS.DefWindowProc (handle, OS.WM_SETREDRAW, 1, 0);
if (OS.IsWinCE) {
- int hwndHeader = OS.SendMessage (handle, OS.LVM_GETHEADER, 0, 0);
+ int /*long*/ hwndHeader = OS.SendMessage (handle, OS.LVM_GETHEADER, 0, 0);
if (hwndHeader != 0) OS.InvalidateRect (hwndHeader, null, true);
OS.InvalidateRect (handle, null, true);
} else {
@@ -3700,7 +3703,7 @@ void setCheckboxImageList (int width, int height, boolean fixScroll) {
if (OS.IsWinCE) {
flags |= OS.ILC_COLOR;
} else {
- int hDC = OS.GetDC (handle);
+ int /*long*/ hDC = OS.GetDC (handle);
int bits = OS.GetDeviceCaps (hDC, OS.BITSPIXEL);
int planes = OS.GetDeviceCaps (hDC, OS.PLANES);
OS.ReleaseDC (handle, hDC);
@@ -3716,11 +3719,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 hStateList = OS.ImageList_Create (width, height, flags, count, count);
- int hDC = OS.GetDC (handle);
- int memDC = OS.CreateCompatibleDC (hDC);
- int hBitmap = OS.CreateCompatibleBitmap (hDC, width * count, height);
- int hOldBitmap = OS.SelectObject (memDC, hBitmap);
+ 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);
RECT rect = new RECT ();
OS.SetRect (rect, 0, 0, width * count, height);
int clrBackground;
@@ -3734,10 +3737,10 @@ void setCheckboxImageList (int width, int height, boolean fixScroll) {
clrBackground = 0x0200FF00;
}
}
- int hBrush = OS.CreateSolidBrush (clrBackground);
+ int /*long*/ hBrush = OS.CreateSolidBrush (clrBackground);
OS.FillRect (memDC, rect, hBrush);
OS.DeleteObject (hBrush);
- int oldFont = OS.SelectObject (hDC, defaultFont ());
+ int /*long*/ oldFont = OS.SelectObject (hDC, defaultFont ());
TEXTMETRIC tm = OS.IsUnicode ? (TEXTMETRIC) new TEXTMETRICW () : new TEXTMETRICA ();
OS.GetTextMetrics (hDC, tm);
OS.SelectObject (hDC, oldFont);
@@ -3746,7 +3749,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 hTheme = display.hButtonTheme ();
+ int /*long*/ 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);
@@ -3786,7 +3789,7 @@ void setCheckboxImageList (int width, int height, boolean fixScroll) {
setRedraw (false);
setTopIndex (0);
}
- int hOldStateList = OS.SendMessage (handle, OS.LVM_GETIMAGELIST, OS.LVSIL_STATE, 0);
+ int /*long*/ 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);
/*
@@ -3796,7 +3799,7 @@ void setCheckboxImageList (int width, int height, boolean fixScroll) {
* LVSIL_SMALL image list.
*/
if (!OS.IsWinCE && OS.WIN32_VERSION >= OS.VERSION (6, 0)) {
- int hImageList = OS.SendMessage (handle, OS.LVM_GETIMAGELIST, OS.LVSIL_SMALL, 0);
+ int /*long*/ 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) {
@@ -3857,7 +3860,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 hwndHeader = OS.SendMessage (handle, OS.LVM_GETHEADER, 0, 0);
+ int /*long*/ hwndHeader = OS.SendMessage (handle, OS.LVM_GETHEADER, 0, 0);
OS.InvalidateRect (hwndHeader, null, true);
}
@@ -3923,7 +3926,7 @@ public void setHeaderVisible (boolean show) {
setTopIndex (0);
}
if (show) {
- int bits = OS.SendMessage (handle, OS.LVM_GETEXTENDEDLISTVIEWSTYLE, 0, 0);
+ int bits = (int)/*64*/OS.SendMessage (handle, OS.LVM_GETEXTENDEDLISTVIEWSTYLE, 0, 0);
if ((bits & OS.LVS_EX_GRIDLINES) != 0) fixItemHeight (false);
}
setTopIndex (oldIndex);
@@ -3948,7 +3951,7 @@ public void setHeaderVisible (boolean show) {
public void setItemCount (int count) {
checkWidget ();
count = Math.max (0, count);
- int itemCount = OS.SendMessage (handle, OS.LVM_GETITEMCOUNT, 0, 0);
+ int itemCount = (int)/*64*/OS.SendMessage (handle, OS.LVM_GETITEMCOUNT, 0, 0);
if (count == itemCount) return;
setDeferResize (true);
boolean isVirtual = (style & SWT.VIRTUAL) != 0;
@@ -3959,7 +3962,7 @@ public void setItemCount (int count) {
if (item != null && !item.isDisposed ()) item.release (false);
if (!isVirtual) {
ignoreSelect = ignoreShrink = true;
- int code = OS.SendMessage (handle, OS.LVM_DELETEITEM, count, 0);
+ int /*long*/ code = OS.SendMessage (handle, OS.LVM_DELETEITEM, count, 0);
ignoreSelect = ignoreShrink = false;
if (code == 0) break;
}
@@ -4015,7 +4018,7 @@ void setItemHeight (boolean fixScroll) {
* WM_SETFONT which recomputes and assigns the default item
* height.
*/
- int hFont = OS.SendMessage (handle, OS.WM_GETFONT, 0, 0);
+ int /*long*/ hFont = OS.SendMessage (handle, OS.WM_GETFONT, 0, 0);
OS.SendMessage (handle, OS.WM_SETFONT, hFont, 0);
} else {
/*
@@ -4135,7 +4138,7 @@ public void setRedraw (boolean redraw) {
*/
setDeferResize (true);
OS.SendMessage (handle, OS.WM_SETREDRAW, 1, 0);
- int hwndHeader = OS.SendMessage (handle, OS.LVM_GETHEADER, 0, 0);
+ int /*long*/ 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;
@@ -4156,7 +4159,7 @@ public void setRedraw (boolean redraw) {
} else {
if (drawCount++ == 0) {
OS.SendMessage (handle, OS.WM_SETREDRAW, 0, 0);
- int hwndHeader = OS.SendMessage (handle, OS.LVM_GETHEADER, 0, 0);
+ int /*long*/ hwndHeader = OS.SendMessage (handle, OS.LVM_GETHEADER, 0, 0);
if (hwndHeader != 0) OS.SendMessage (hwndHeader, OS.WM_SETREDRAW, 0, 0);
/*
@@ -4193,10 +4196,10 @@ boolean setScrollWidth (TableItem item, boolean force) {
*/
if (columnCount == 0) {
int newWidth = 0, imageIndent = 0, index = 0;
- int itemCount = OS.SendMessage (handle, OS.LVM_GETITEMCOUNT, 0, 0);
+ int itemCount = (int)/*64*/OS.SendMessage (handle, OS.LVM_GETITEMCOUNT, 0, 0);
while (index < itemCount) {
String string = null;
- int font = -1;
+ int /*long*/ font = -1;
if (item != null) {
string = item.text;
imageIndent = Math.max (imageIndent, item.imageIndent);
@@ -4213,8 +4216,8 @@ boolean setScrollWidth (TableItem item, boolean force) {
}
if (string != null && string.length () != 0) {
if (font != -1) {
- int hDC = OS.GetDC (handle);
- int oldFont = OS.SelectObject (hDC, font);
+ int /*long*/ hDC = OS.GetDC (handle);
+ int /*long*/ oldFont = OS.SelectObject (hDC, font);
int flags = OS.DT_CALCRECT | OS.DT_SINGLELINE | OS.DT_NOPREFIX;
TCHAR buffer = new TCHAR (getCodePage (), string, false);
RECT rect = new RECT ();
@@ -4224,7 +4227,7 @@ boolean setScrollWidth (TableItem item, boolean force) {
newWidth = Math.max (newWidth, rect.right - rect.left);
} else {
TCHAR buffer = new TCHAR (getCodePage (), string, true);
- newWidth = Math.max (newWidth, OS.SendMessage (handle, OS.LVM_GETSTRINGWIDTH, 0, buffer));
+ newWidth = Math.max (newWidth, (int)/*64*/OS.SendMessage (handle, OS.LVM_GETSTRINGWIDTH, 0, buffer));
}
}
if (item != null) break;
@@ -4242,15 +4245,15 @@ boolean setScrollWidth (TableItem item, boolean force) {
*/
if (newWidth == 0) {
TCHAR buffer = new TCHAR (getCodePage (), " ", true);
- newWidth = Math.max (newWidth, OS.SendMessage (handle, OS.LVM_GETSTRINGWIDTH, 0, buffer));
+ newWidth = Math.max (newWidth, (int)/*64*/OS.SendMessage (handle, OS.LVM_GETSTRINGWIDTH, 0, buffer));
}
- int hStateList = OS.SendMessage (handle, OS.LVM_GETIMAGELIST, OS.LVSIL_STATE, 0);
+ int /*long*/ 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 hImageList = OS.SendMessage (handle, OS.LVM_GETIMAGELIST, OS.LVSIL_SMALL, 0);
+ int /*long*/ 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);
@@ -4269,7 +4272,7 @@ boolean setScrollWidth (TableItem item, boolean force) {
newWidth++;
}
newWidth += INSET * 2;
- int oldWidth = OS.SendMessage (handle, OS.LVM_GETCOLUMNWIDTH, 0, 0);
+ int oldWidth = (int)/*64*/OS.SendMessage (handle, OS.LVM_GETCOLUMNWIDTH, 0, 0);
if (!OS.IsWinCE && OS.WIN32_VERSION >= OS.VERSION (6, 0)) {
newWidth += VISTA_EXTRA;
}
@@ -4289,7 +4292,7 @@ boolean setScrollWidth (TableItem item, boolean force) {
if (redraw) {
OS.DefWindowProc (handle, OS.WM_SETREDRAW, 1, 0);
if (OS.IsWinCE) {
- int hwndHeader = OS.SendMessage (handle, OS.LVM_GETHEADER, 0, 0);
+ int /*long*/ hwndHeader = OS.SendMessage (handle, OS.LVM_GETHEADER, 0, 0);
if (hwndHeader != 0) OS.InvalidateRect (hwndHeader, null, true);
OS.InvalidateRect (handle, null, true);
} else {
@@ -4452,7 +4455,7 @@ public void setSelection (int start, int end) {
checkWidget ();
deselectAll ();
if (end < 0 || start > end || ((style & SWT.SINGLE) != 0 && start != end)) return;
- int count = OS.SendMessage (handle, OS.LVM_GETITEMCOUNT, 0, 0);
+ int count = (int)/*64*/OS.SendMessage (handle, OS.LVM_GETITEMCOUNT, 0, 0);
if (count == 0 || start >= count) return;
start = Math.max (0, start);
end = Math.min (end, count - 1);
@@ -4513,7 +4516,7 @@ public void setSortDirection (int direction) {
}
void setSubImagesVisible (boolean visible) {
- int dwExStyle = OS.SendMessage (handle, OS.LVM_GETEXTENDEDLISTVIEWSTYLE, 0, 0);
+ int dwExStyle = (int)/*64*/OS.SendMessage (handle, OS.LVM_GETEXTENDEDLISTVIEWSTYLE, 0, 0);
if ((dwExStyle & OS.LVS_EX_SUBITEMIMAGES) != 0 == visible) return;
int bits = visible ? OS.LVS_EX_SUBITEMIMAGES : 0;
OS.SendMessage (handle, OS.LVM_SETEXTENDEDLISTVIEWSTYLE, OS.LVS_EX_SUBITEMIMAGES, bits);
@@ -4530,12 +4533,12 @@ void setTableEmpty () {
* Windows to reserve the smallest possible space when an image
* list is removed.
*/
- int hImageList = OS.ImageList_Create (1, 1, 0, 0, 0);
+ int /*long*/ 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 hHeaderImageList = headerImageList.getHandle ();
- int hwndHeader = OS.SendMessage (handle, OS.LVM_GETHEADER, 0, 0);
+ int /*long*/ hHeaderImageList = headerImageList.getHandle ();
+ int /*long*/ hwndHeader = OS.SendMessage (handle, OS.LVM_GETHEADER, 0, 0);
OS.SendMessage (hwndHeader, OS.HDM_SETIMAGELIST, 0, hHeaderImageList);
}
OS.ImageList_Destroy (hImageList);
@@ -4573,7 +4576,7 @@ void setTableEmpty () {
*/
public void setTopIndex (int index) {
checkWidget ();
- int topIndex = OS.SendMessage (handle, OS.LVM_GETTOPINDEX, 0, 0);
+ int topIndex = (int)/*64*/OS.SendMessage (handle, OS.LVM_GETTOPINDEX, 0, 0);
if (index == topIndex) return;
/*
@@ -4667,7 +4670,7 @@ public void showColumn (TableColumn column) {
OS.SendMessage (handle, OS.LVM_GETSUBITEMRECT, -1, itemRect);
ignoreCustomDraw = false;
itemRect.right = itemRect.left;
- int width = OS.SendMessage (handle, OS.LVM_GETCOLUMNWIDTH, 0, 0);
+ int width = (int)/*64*/OS.SendMessage (handle, OS.LVM_GETCOLUMNWIDTH, 0, 0);
itemRect.left = itemRect.right - width;
} else {
itemRect.top = index;
@@ -4683,7 +4686,7 @@ public void showColumn (TableColumn column) {
* get the new scroll position and redraw the new area.
*/
int oldPos = 0;
- int bits = OS.SendMessage (handle, OS.LVM_GETEXTENDEDLISTVIEWSTYLE, 0, 0);
+ int bits = (int)/*64*/OS.SendMessage (handle, OS.LVM_GETEXTENDEDLISTVIEWSTYLE, 0, 0);
if ((bits & OS.LVS_EX_GRIDLINES) != 0) {
SCROLLINFO info = new SCROLLINFO ();
info.cbSize = SCROLLINFO.sizeof;
@@ -4792,7 +4795,7 @@ public void showItem (TableItem item) {
*/
public void showSelection () {
checkWidget ();
- int index = OS.SendMessage (handle, OS.LVM_GETNEXTITEM, -1, OS.LVNI_SELECTED);
+ int index = (int)/*64*/OS.SendMessage (handle, OS.LVM_GETNEXTITEM, -1, OS.LVNI_SELECTED);
if (index != -1) showItem (index);
}
@@ -4819,13 +4822,13 @@ public void showSelection () {
void subclass () {
super.subclass ();
if (HeaderProc != 0) {
- int hwndHeader = OS.SendMessage (handle, OS.LVM_GETHEADER, 0, 0);
- OS.SetWindowLong (hwndHeader, OS.GWL_WNDPROC, display.windowProc);
+ int /*long*/ hwndHeader = OS.SendMessage (handle, OS.LVM_GETHEADER, 0, 0);
+ OS.SetWindowLongPtr (hwndHeader, OS.GWLP_WNDPROC, display.windowProc);
}
}
String toolTipText (NMTTDISPINFO hdr) {
- int hwndToolTip = OS.SendMessage (handle, OS.LVM_GETTOOLTIPS, 0, 0);
+ int /*long*/ 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++) {
@@ -4839,8 +4842,8 @@ String toolTipText (NMTTDISPINFO hdr) {
void unsubclass () {
super.unsubclass ();
if (HeaderProc != 0) {
- int hwndHeader = OS.SendMessage (handle, OS.LVM_GETHEADER, 0, 0);
- OS.SetWindowLong (hwndHeader, OS.GWL_WNDPROC, HeaderProc);
+ int /*long*/ hwndHeader = OS.SendMessage (handle, OS.LVM_GETHEADER, 0, 0);
+ OS.SetWindowLongPtr (hwndHeader, OS.GWLP_WNDPROC, HeaderProc);
}
}
@@ -4857,23 +4860,23 @@ 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 oldHeaderProc = 0, oldTableProc = 0;
- int hwndHeader = OS.SendMessage (handle, OS.LVM_GETHEADER, 0, 0);
+ int /*long*/ oldHeaderProc = 0, oldTableProc = 0;
+ int /*long*/ hwndHeader = OS.SendMessage (handle, OS.LVM_GETHEADER, 0, 0);
boolean fixSubclass = !hasChildren () && !hooks (SWT.Paint) && !filters (SWT.Paint);
if (fixSubclass) {
- oldTableProc = OS.SetWindowLong (handle, OS.GWL_WNDPROC, TableProc);
- oldHeaderProc = OS.SetWindowLong (hwndHeader, OS.GWL_WNDPROC, HeaderProc);
+ oldTableProc = OS.SetWindowLongPtr (handle, OS.GWLP_WNDPROC, TableProc);
+ oldHeaderProc = OS.SetWindowLongPtr (hwndHeader, OS.GWLP_WNDPROC, HeaderProc);
}
super.update (all);
if (fixSubclass) {
- OS.SetWindowLong (handle, OS.GWL_WNDPROC, oldTableProc);
- OS.SetWindowLong (hwndHeader, OS.GWL_WNDPROC, oldHeaderProc);
+ OS.SetWindowLongPtr (handle, OS.GWLP_WNDPROC, oldTableProc);
+ OS.SetWindowLongPtr (hwndHeader, OS.GWLP_WNDPROC, oldHeaderProc);
}
}
void updateHeaderToolTips () {
if (headerToolTipHandle == 0) return;
- int hwndHeader = OS.SendMessage (handle, OS.LVM_GETHEADER, 0, 0);
+ int /*long*/ hwndHeader = OS.SendMessage (handle, OS.LVM_GETHEADER, 0, 0);
RECT rect = new RECT ();
TOOLINFO lpti = new TOOLINFO ();
lpti.cbSize = TOOLINFO.sizeof;
@@ -4935,11 +4938,11 @@ TCHAR windowClass () {
return TableClass;
}
-int windowProc () {
+int /*long*/ windowProc () {
return TableProc;
}
-int windowProc (int hwnd, int msg, int wParam, int lParam) {
+int /*long*/ windowProc (int /*long*/ hwnd, int msg, int /*long*/ wParam, int /*long*/ lParam) {
if (handle == 0) return 0;
if (hwnd != handle) {
switch (msg) {
@@ -4965,7 +4968,7 @@ int windowProc (int hwnd, int msg, int wParam, int lParam) {
*/
if (OS.COMCTL32_MAJOR < 6) {
if (lParam != 0) {
- int hwndHeader = OS.SendMessage (handle, OS.LVM_GETHEADER, 0, 0);
+ int /*long*/ hwndHeader = OS.SendMessage (handle, OS.LVM_GETHEADER, 0, 0);
if (lParam != hwndHeader) OS.InvalidateRect (hwndHeader, null, true);
}
}
@@ -5006,8 +5009,8 @@ int windowProc (int hwnd, int msg, int wParam, int lParam) {
OS.ScreenToClient (hwnd, pt);
pinfo.x = pt.x;
pinfo.y = pt.y;
- int hwndHeader = OS.SendMessage (handle, OS.LVM_GETHEADER, 0, 0);
- int index = OS.SendMessage (hwndHeader, OS.HDM_HITTEST, 0, pinfo);
+ int /*long*/ 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) {
OS.SetCursor (OS.LoadCursor (0, OS.IDC_ARROW));
@@ -5024,13 +5027,13 @@ int windowProc (int hwnd, int msg, int wParam, int lParam) {
return super.windowProc (hwnd, msg, wParam, lParam);
}
-LRESULT WM_CHAR (int wParam, int lParam) {
+LRESULT WM_CHAR (int /*long*/ wParam, int /*long*/ lParam) {
LRESULT result = super.WM_CHAR (wParam, lParam);
if (result != null) return result;
- switch (wParam) {
+ switch ((int)/*64*/wParam) {
case ' ':
if ((style & SWT.CHECK) != 0) {
- int index = OS.SendMessage (handle, OS.LVM_GETNEXTITEM, -1, OS.LVNI_FOCUSED);
+ int index = (int)/*64*/OS.SendMessage (handle, OS.LVM_GETNEXTITEM, -1, OS.LVNI_FOCUSED);
if (index != -1) {
TableItem item = _getItem (index);
item.setChecked (!item.getChecked (), true);
@@ -5045,7 +5048,7 @@ LRESULT WM_CHAR (int wParam, int lParam) {
* This allows the application to cancel an operation that is normally
* performed in WM_KEYDOWN from WM_CHAR.
*/
- int code = callWindowProc (handle, OS.WM_KEYDOWN, wParam, lParam);
+ int /*long*/ code = callWindowProc (handle, OS.WM_KEYDOWN, wParam, lParam);
return new LRESULT (code);
case SWT.CR:
/*
@@ -5055,7 +5058,7 @@ LRESULT WM_CHAR (int wParam, int lParam) {
* event will fail. The fix is to ignore LVN_ITEMACTIVATE when it is
* caused by WM_KEYDOWN and send SWT.DefaultSelection from WM_CHAR.
*/
- int index = OS.SendMessage (handle, OS.LVM_GETNEXTITEM, -1, OS.LVNI_FOCUSED);
+ int index = (int)/*64*/OS.SendMessage (handle, OS.LVM_GETNEXTITEM, -1, OS.LVNI_FOCUSED);
if (index != -1) {
Event event = new Event ();
event.item = _getItem (index);
@@ -5066,7 +5069,7 @@ LRESULT WM_CHAR (int wParam, int lParam) {
return result;
}
-LRESULT WM_CONTEXTMENU (int wParam, int lParam) {
+LRESULT WM_CONTEXTMENU (int /*long*/ wParam, int /*long*/ lParam) {
/*
* Feature in Windows. For some reason, when the right
* mouse button is pressed over an item, Windows sends
@@ -5083,19 +5086,19 @@ LRESULT WM_CONTEXTMENU (int wParam, int lParam) {
return super.WM_CONTEXTMENU (wParam, lParam);
}
-LRESULT WM_ERASEBKGND (int wParam, int lParam) {
+LRESULT WM_ERASEBKGND (int /*long*/ wParam, int /*long*/ lParam) {
LRESULT result = super.WM_ERASEBKGND (wParam, lParam);
if (findImageControl () != null) return LRESULT.ONE;
if (OS.COMCTL32_MAJOR < 6) {
if ((style & SWT.DOUBLE_BUFFERED) != 0) {
- int bits = OS.SendMessage (handle, OS.LVM_GETEXTENDEDLISTVIEWSTYLE, 0, 0);
+ int bits = (int)/*64*/OS.SendMessage (handle, OS.LVM_GETEXTENDEDLISTVIEWSTYLE, 0, 0);
if ((bits & OS.LVS_EX_DOUBLEBUFFER) == 0) return LRESULT.ONE;
}
}
return result;
}
-LRESULT WM_GETOBJECT (int wParam, int lParam) {
+LRESULT WM_GETOBJECT (int /*long*/ wParam, int /*long*/ lParam) {
/*
* Ensure that there is an accessible object created for this
* control because support for checked item accessibility is
@@ -5107,10 +5110,10 @@ LRESULT WM_GETOBJECT (int wParam, int lParam) {
return super.WM_GETOBJECT (wParam, lParam);
}
-LRESULT WM_KEYDOWN (int wParam, int lParam) {
+LRESULT WM_KEYDOWN (int /*long*/ wParam, int /*long*/ lParam) {
LRESULT result = super.WM_KEYDOWN (wParam, lParam);
if (result != null) return result;
- switch (wParam) {
+ switch ((int)/*64*/wParam) {
case OS.VK_SPACE:
/*
* Ensure that the window proc does not process VK_SPACE
@@ -5153,18 +5156,18 @@ LRESULT WM_KEYDOWN (int wParam, int lParam) {
* NOTE: The header tooltip can subclass the header proc so the
* current proc must be restored or header tooltips stop working.
*/
- int oldHeaderProc = 0, oldTableProc = 0;
- int hwndHeader = OS.SendMessage (handle, OS.LVM_GETHEADER, 0, 0);
+ int /*long*/ oldHeaderProc = 0, oldTableProc = 0;
+ int /*long*/ hwndHeader = OS.SendMessage (handle, OS.LVM_GETHEADER, 0, 0);
boolean fixSubclass = !hasChildren () && !hooks (SWT.Paint) && !filters (SWT.Paint);
if (fixSubclass) {
- oldTableProc = OS.SetWindowLong (handle, OS.GWL_WNDPROC, TableProc);
- oldHeaderProc = OS.SetWindowLong (hwndHeader, OS.GWL_WNDPROC, HeaderProc);
+ oldTableProc = OS.SetWindowLongPtr (handle, OS.GWLP_WNDPROC, TableProc);
+ oldHeaderProc = OS.SetWindowLongPtr (hwndHeader, OS.GWLP_WNDPROC, HeaderProc);
}
- int code = callWindowProc (handle, OS.WM_KEYDOWN, wParam, lParam);
+ int /*long*/ code = callWindowProc (handle, OS.WM_KEYDOWN, wParam, lParam);
result = code == 0 ? LRESULT.ZERO : new LRESULT (code);
if (fixSubclass) {
- OS.SetWindowLong (handle, OS.GWL_WNDPROC, oldTableProc);
- OS.SetWindowLong (hwndHeader, OS.GWL_WNDPROC, oldHeaderProc);
+ OS.SetWindowLongPtr (handle, OS.GWLP_WNDPROC, oldTableProc);
+ OS.SetWindowLongPtr (hwndHeader, OS.GWLP_WNDPROC, oldHeaderProc);
}
//FALL THROUGH
case OS.VK_UP:
@@ -5175,7 +5178,7 @@ LRESULT WM_KEYDOWN (int wParam, int lParam) {
return result;
}
-LRESULT WM_KILLFOCUS (int wParam, int lParam) {
+LRESULT WM_KILLFOCUS (int /*long*/ wParam, int /*long*/ lParam) {
LRESULT result = super.WM_KILLFOCUS (wParam, lParam);
/*
* Bug in Windows. When focus is lost, Windows does not
@@ -5189,7 +5192,7 @@ LRESULT WM_KILLFOCUS (int wParam, int lParam) {
return result;
}
-LRESULT WM_LBUTTONDBLCLK (int wParam, int lParam) {
+LRESULT WM_LBUTTONDBLCLK (int /*long*/ wParam, int /*long*/ lParam) {
/*
* Feature in Windows. When the user selects outside of
@@ -5201,7 +5204,7 @@ LRESULT WM_LBUTTONDBLCLK (int wParam, int lParam) {
LVHITTESTINFO pinfo = new LVHITTESTINFO ();
pinfo.x = OS.GET_X_LPARAM (lParam);
pinfo.y = OS.GET_Y_LPARAM (lParam);
- int index = OS.SendMessage (handle, OS.LVM_HITTEST, 0, pinfo);
+ int index = (int)/*64*/OS.SendMessage (handle, OS.LVM_HITTEST, 0, pinfo);
Display display = this.display;
display.captureChanged = false;
sendMouseEvent (SWT.MouseDown, 1, handle, OS.WM_LBUTTONDOWN, wParam, lParam);
@@ -5237,7 +5240,7 @@ LRESULT WM_LBUTTONDBLCLK (int wParam, int lParam) {
return LRESULT.ZERO;
}
-LRESULT WM_LBUTTONDOWN (int wParam, int lParam) {
+LRESULT WM_LBUTTONDOWN (int /*long*/ wParam, int /*long*/ lParam) {
/*
* Feature in Windows. For some reason, capturing
* the mouse after processing the mouse event for the
@@ -5261,7 +5264,7 @@ LRESULT WM_LBUTTONDOWN (int wParam, int lParam) {
* the correct way to determine that the user has selected
* the check box, equality is needed.
*/
- int index = OS.SendMessage (handle, OS.LVM_HITTEST, 0, pinfo);
+ int index = (int)/*64*/OS.SendMessage (handle, OS.LVM_HITTEST, 0, pinfo);
if (index != -1 && pinfo.flags == OS.LVHT_ONITEMSTATEICON) {
TableItem item = _getItem (index);
item.setChecked (!item.getChecked (), true);
@@ -5273,7 +5276,7 @@ LRESULT WM_LBUTTONDOWN (int wParam, int lParam) {
return result;
}
-LRESULT WM_MOUSEHOVER (int wParam, int lParam) {
+LRESULT WM_MOUSEHOVER (int /*long*/ wParam, int /*long*/ lParam) {
/*
* Feature in Windows. Despite the fact that hot
* tracking is not enabled, the hot tracking code
@@ -5282,16 +5285,16 @@ LRESULT WM_MOUSEHOVER (int wParam, int lParam) {
* avoid calling the window proc.
*/
LRESULT result = super.WM_MOUSEHOVER (wParam, lParam);
- int bits = OS.SendMessage (handle, OS.LVM_GETEXTENDEDLISTVIEWSTYLE, 0, 0);
+ int bits = (int)/*64*/OS.SendMessage (handle, OS.LVM_GETEXTENDEDLISTVIEWSTYLE, 0, 0);
int mask = OS.LVS_EX_ONECLICKACTIVATE | OS.LVS_EX_TRACKSELECT | OS.LVS_EX_TWOCLICKACTIVATE;
if ((bits & mask) != 0) return result;
return LRESULT.ZERO;
}
-LRESULT WM_PAINT (int wParam, int lParam) {
+LRESULT WM_PAINT (int /*long*/ wParam, int /*long*/ lParam) {
if (!ignoreShrink) {
/* Resize the item array to match the item count */
- int count = OS.SendMessage (handle, OS.LVM_GETITEMCOUNT, 0, 0);
+ int count = (int)/*64*/OS.SendMessage (handle, OS.LVM_GETITEMCOUNT, 0, 0);
if (items.length > 4 && items.length - count > 3) {
int length = Math.max (4, (count + 3) / 4 * 4);
TableItem [] newItems = new TableItem [length];
@@ -5302,10 +5305,10 @@ LRESULT WM_PAINT (int wParam, int lParam) {
if (fixScrollWidth) setScrollWidth (null, true);
if (OS.COMCTL32_MAJOR < 6) {
if ((style & SWT.DOUBLE_BUFFERED) != 0 || findImageControl () != null) {
- int bits = OS.SendMessage (handle, OS.LVM_GETEXTENDEDLISTVIEWSTYLE, 0, 0);
+ int bits = (int)/*64*/OS.SendMessage (handle, OS.LVM_GETEXTENDEDLISTVIEWSTYLE, 0, 0);
if ((bits & OS.LVS_EX_DOUBLEBUFFER) == 0) {
GC gc = null;
- int paintDC = 0;
+ int /*long*/ paintDC = 0;
PAINTSTRUCT ps = new PAINTSTRUCT ();
boolean hooksPaint = hooks (SWT.Paint);
if (hooksPaint) {
@@ -5320,12 +5323,12 @@ LRESULT WM_PAINT (int wParam, int lParam) {
int width = ps.right - ps.left;
int height = ps.bottom - ps.top;
if (width != 0 && height != 0) {
- int hDC = OS.CreateCompatibleDC (paintDC);
+ int /*long*/ 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 hBitmap = OS.CreateCompatibleBitmap (paintDC, width, height);
- int hOldBitmap = OS.SelectObject (hDC, hBitmap);
+ int /*long*/ hBitmap = OS.CreateCompatibleBitmap (paintDC, width, height);
+ int /*long*/ hOldBitmap = OS.SelectObject (hDC, hBitmap);
if (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);
@@ -5362,7 +5365,7 @@ LRESULT WM_PAINT (int wParam, int lParam) {
return super.WM_PAINT (wParam, lParam);
}
-LRESULT WM_RBUTTONDBLCLK (int wParam, int lParam) {
+LRESULT WM_RBUTTONDBLCLK (int /*long*/ wParam, int /*long*/ lParam) {
/*
* Feature in Windows. When the user selects outside of
* a table item, Windows deselects all the items, even
@@ -5386,7 +5389,7 @@ LRESULT WM_RBUTTONDBLCLK (int wParam, int lParam) {
return LRESULT.ZERO;
}
-LRESULT WM_RBUTTONDOWN (int wParam, int lParam) {
+LRESULT WM_RBUTTONDOWN (int /*long*/ wParam, int /*long*/ lParam) {
/*
* Feature in Windows. For some reason, capturing
* the mouse after processing the mouse event for the
@@ -5397,7 +5400,7 @@ LRESULT WM_RBUTTONDOWN (int wParam, int lParam) {
return sendMouseDownEvent (SWT.MouseDown, 3, OS.WM_RBUTTONDOWN, wParam, lParam);
}
-LRESULT WM_SETFOCUS (int wParam, int lParam) {
+LRESULT WM_SETFOCUS (int /*long*/ wParam, int /*long*/ lParam) {
LRESULT result = super.WM_SETFOCUS (wParam, lParam);
/*
* Bug in Windows. When focus is gained after the
@@ -5418,9 +5421,9 @@ LRESULT WM_SETFOCUS (int wParam, int lParam) {
* no selected item. The fix to make the first item
* be the focus item.
*/
- int count = OS.SendMessage (handle, OS.LVM_GETITEMCOUNT, 0, 0);
+ int count = (int)/*64*/OS.SendMessage (handle, OS.LVM_GETITEMCOUNT, 0, 0);
if (count == 0) return result;
- int index = OS.SendMessage (handle, OS.LVM_GETNEXTITEM, -1, OS.LVNI_FOCUSED);
+ int index = (int)/*64*/OS.SendMessage (handle, OS.LVM_GETNEXTITEM, -1, OS.LVNI_FOCUSED);
if (index == -1) {
LVITEM lvItem = new LVITEM ();
lvItem.state = OS.LVIS_FOCUSED;
@@ -5432,7 +5435,7 @@ LRESULT WM_SETFOCUS (int wParam, int lParam) {
return result;
}
-LRESULT WM_SETFONT (int wParam, int lParam) {
+LRESULT WM_SETFONT (int /*long*/ wParam, int /*long*/ lParam) {
LRESULT result = super.WM_SETFONT (wParam, lParam);
if (result != null) return result;
@@ -5447,7 +5450,7 @@ LRESULT WM_SETFONT (int wParam, int lParam) {
* the header so that all that is necessary here is to
* set the default first.
*/
- int hwndHeader = OS.SendMessage (handle, OS.LVM_GETHEADER, 0, 0);
+ int /*long*/ hwndHeader = OS.SendMessage (handle, OS.LVM_GETHEADER, 0, 0);
OS.SendMessage (hwndHeader, OS.WM_SETFONT, 0, lParam);
if (headerToolTipHandle != 0) {
@@ -5456,7 +5459,7 @@ LRESULT WM_SETFONT (int wParam, int lParam) {
return result;
}
-LRESULT WM_SIZE (int wParam, int lParam) {
+LRESULT WM_SIZE (int /*long*/ wParam, int /*long*/ lParam) {
if (ignoreResize) return null;
if (hooks (SWT.EraseItem) || hooks (SWT.PaintItem)) {
OS.InvalidateRect (handle, null, true);
@@ -5468,7 +5471,7 @@ LRESULT WM_SIZE (int wParam, int lParam) {
return super.WM_SIZE (wParam, lParam);
}
-LRESULT WM_SYSCOLORCHANGE (int wParam, int lParam) {
+LRESULT WM_SYSCOLORCHANGE (int /*long*/ wParam, int /*long*/ lParam) {
LRESULT result = super.WM_SYSCOLORCHANGE (wParam, lParam);
if (result != null) return result;
if (findBackgroundControl () == null) {
@@ -5481,7 +5484,7 @@ LRESULT WM_SYSCOLORCHANGE (int wParam, int lParam) {
return result;
}
-LRESULT WM_HSCROLL (int wParam, int lParam) {
+LRESULT WM_HSCROLL (int /*long*/ wParam, int /*long*/ lParam) {
/*
* Bug in Windows. When a table that is drawing grid lines
* is slowly scrolled horizontally to the left, the table does
@@ -5490,7 +5493,7 @@ LRESULT WM_HSCROLL (int wParam, int lParam) {
* get the new scroll position and redraw the new area.
*/
int oldPos = 0;
- int bits = OS.SendMessage (handle, OS.LVM_GETEXTENDEDLISTVIEWSTYLE, 0, 0);
+ int bits = (int)/*64*/OS.SendMessage (handle, OS.LVM_GETEXTENDEDLISTVIEWSTYLE, 0, 0);
if ((bits & OS.LVS_EX_GRIDLINES) != 0) {
SCROLLINFO info = new SCROLLINFO ();
info.cbSize = SCROLLINFO.sizeof;
@@ -5510,17 +5513,17 @@ LRESULT WM_HSCROLL (int wParam, int lParam) {
* NOTE: The header tooltip can subclass the header proc so the
* current proc must be restored or header tooltips stop working.
*/
- int oldHeaderProc = 0, oldTableProc = 0;
- int hwndHeader = OS.SendMessage (handle, OS.LVM_GETHEADER, 0, 0);
+ int /*long*/ oldHeaderProc = 0, oldTableProc = 0;
+ int /*long*/ hwndHeader = OS.SendMessage (handle, OS.LVM_GETHEADER, 0, 0);
boolean fixSubclass = !hasChildren () && !hooks (SWT.Paint) && !filters (SWT.Paint);
if (fixSubclass) {
- oldTableProc = OS.SetWindowLong (handle, OS.GWL_WNDPROC, TableProc);
- oldHeaderProc = OS.SetWindowLong (hwndHeader, OS.GWL_WNDPROC, HeaderProc);
+ oldTableProc = OS.SetWindowLongPtr (handle, OS.GWLP_WNDPROC, TableProc);
+ oldHeaderProc = OS.SetWindowLongPtr (hwndHeader, OS.GWLP_WNDPROC, HeaderProc);
}
LRESULT result = super.WM_HSCROLL (wParam, lParam);
if (fixSubclass) {
- OS.SetWindowLong (handle, OS.GWL_WNDPROC, oldTableProc);
- OS.SetWindowLong (hwndHeader, OS.GWL_WNDPROC, oldHeaderProc);
+ OS.SetWindowLongPtr (handle, OS.GWLP_WNDPROC, oldTableProc);
+ OS.SetWindowLongPtr (hwndHeader, OS.GWLP_WNDPROC, oldHeaderProc);
}
/*
@@ -5546,7 +5549,7 @@ LRESULT WM_HSCROLL (int wParam, int lParam) {
return result;
}
-LRESULT WM_VSCROLL (int wParam, int lParam) {
+LRESULT WM_VSCROLL (int /*long*/ wParam, int /*long*/ lParam) {
/*
* When there are many columns in a table, scrolling performance
* can be improved by temporarily unsubclassing the window proc
@@ -5558,17 +5561,17 @@ LRESULT WM_VSCROLL (int wParam, int lParam) {
* NOTE: The header tooltip can subclass the header proc so the
* current proc must be restored or header tooltips stop working.
*/
- int oldHeaderProc = 0, oldTableProc = 0;
- int hwndHeader = OS.SendMessage (handle, OS.LVM_GETHEADER, 0, 0);
+ int /*long*/ oldHeaderProc = 0, oldTableProc = 0;
+ int /*long*/ hwndHeader = OS.SendMessage (handle, OS.LVM_GETHEADER, 0, 0);
boolean fixSubclass = !hasChildren () && !hooks (SWT.Paint) && !filters (SWT.Paint);
if (fixSubclass) {
- oldTableProc = OS.SetWindowLong (handle, OS.GWL_WNDPROC, TableProc);
- oldHeaderProc = OS.SetWindowLong (hwndHeader, OS.GWL_WNDPROC, HeaderProc);
+ oldTableProc = OS.SetWindowLongPtr (handle, OS.GWLP_WNDPROC, TableProc);
+ oldHeaderProc = OS.SetWindowLongPtr (hwndHeader, OS.GWLP_WNDPROC, HeaderProc);
}
LRESULT result = super.WM_VSCROLL (wParam, lParam);
if (fixSubclass) {
- OS.SetWindowLong (handle, OS.GWL_WNDPROC, oldTableProc);
- OS.SetWindowLong (hwndHeader, OS.GWL_WNDPROC, oldHeaderProc);
+ OS.SetWindowLongPtr (handle, OS.GWLP_WNDPROC, oldTableProc);
+ OS.SetWindowLongPtr (hwndHeader, OS.GWLP_WNDPROC, oldHeaderProc);
}
/*
@@ -5577,7 +5580,7 @@ LRESULT WM_VSCROLL (int wParam, int lParam) {
* table does not redraw the grid lines for newly exposed items.
* The fix is to invalidate the items.
*/
- int bits = OS.SendMessage (handle, OS.LVM_GETEXTENDEDLISTVIEWSTYLE, 0, 0);
+ int bits = (int)/*64*/OS.SendMessage (handle, OS.LVM_GETEXTENDEDLISTVIEWSTYLE, 0, 0);
if ((bits & OS.LVS_EX_GRIDLINES) != 0) {
int code = OS.LOWORD (wParam);
switch (code) {
@@ -5595,8 +5598,8 @@ LRESULT WM_VSCROLL (int wParam, int lParam) {
RECT clientRect = new RECT ();
OS.GetClientRect (handle, clientRect);
clientRect.top += headerHeight;
- int empty = OS.SendMessage (handle, OS.LVM_APPROXIMATEVIEWRECT, 0, 0);
- int oneItem = OS.SendMessage (handle, OS.LVM_APPROXIMATEVIEWRECT, 1, 0);
+ int /*long*/ empty = OS.SendMessage (handle, OS.LVM_APPROXIMATEVIEWRECT, 0, 0);
+ int /*long*/ 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;
@@ -5614,12 +5617,12 @@ LRESULT WM_VSCROLL (int wParam, int lParam) {
return result;
}
-LRESULT wmMeasureChild (int wParam, int lParam) {
+LRESULT wmMeasureChild (int /*long*/ wParam, int /*long*/ lParam) {
MEASUREITEMSTRUCT struct = new MEASUREITEMSTRUCT ();
OS.MoveMemory (struct, lParam, MEASUREITEMSTRUCT.sizeof);
if (itemHeight == -1) {
- int empty = OS.SendMessage (handle, OS.LVM_APPROXIMATEVIEWRECT, 0, 0);
- int oneItem = OS.SendMessage (handle, OS.LVM_APPROXIMATEVIEWRECT, 1, 0);
+ int /*long*/ empty = OS.SendMessage (handle, OS.LVM_APPROXIMATEVIEWRECT, 0, 0);
+ int /*long*/ oneItem = OS.SendMessage (handle, OS.LVM_APPROXIMATEVIEWRECT, 1, 0);
struct.itemHeight = OS.HIWORD (oneItem) - OS.HIWORD (empty);
} else {
struct.itemHeight = itemHeight;
@@ -5628,8 +5631,8 @@ LRESULT wmMeasureChild (int wParam, int lParam) {
return null;
}
-LRESULT wmNotify (NMHDR hdr, int wParam, int lParam) {
- int hwndHeader = OS.SendMessage (handle, OS.LVM_GETHEADER, 0, 0);
+LRESULT wmNotify (NMHDR hdr, int /*long*/ wParam, int /*long*/ lParam) {
+ int /*long*/ hwndHeader = OS.SendMessage (handle, OS.LVM_GETHEADER, 0, 0);
if (hdr.hwndFrom == hwndHeader) {
/*
* Feature in Windows. On NT, the automatically created
@@ -5688,7 +5691,7 @@ LRESULT wmNotify (NMHDR hdr, int wParam, int lParam) {
}
case OS.HDN_BEGINDRAG: {
if (ignoreColumnMove) return LRESULT.ONE;
- int bits = OS.SendMessage (handle, OS.LVM_GETEXTENDEDLISTVIEWSTYLE, 0, 0);
+ int bits = (int)/*64*/OS.SendMessage (handle, OS.LVM_GETEXTENDEDLISTVIEWSTYLE, 0, 0);
if ((bits & OS.LVS_EX_HEADERDRAGDROP) == 0) break;
if (columnCount == 0) return LRESULT.ONE;
NMHEADER phdn = new NMHEADER ();
@@ -5703,7 +5706,7 @@ LRESULT wmNotify (NMHDR hdr, int wParam, int lParam) {
break;
}
case OS.HDN_ENDDRAG: {
- int bits = OS.SendMessage (handle, OS.LVM_GETEXTENDEDLISTVIEWSTYLE, 0, 0);
+ int bits = (int)/*64*/OS.SendMessage (handle, OS.LVM_GETEXTENDEDLISTVIEWSTYLE, 0, 0);
if ((bits & OS.LVS_EX_HEADERDRAGDROP) == 0) break;
NMHEADER phdn = new NMHEADER ();
OS.MoveMemory (phdn, lParam, NMHEADER.sizeof);
@@ -5744,9 +5747,9 @@ LRESULT wmNotify (NMHDR hdr, int wParam, int lParam) {
* lines are not redrawn. The fix is to detect the case and force
* a redraw of the first column.
*/
- int width = OS.SendMessage (handle, OS.LVM_GETCOLUMNWIDTH, 0, 0);
+ int width = (int)/*64*/OS.SendMessage (handle, OS.LVM_GETCOLUMNWIDTH, 0, 0);
if (lastWidth == 0 && width > 0) {
- int bits = OS.SendMessage (handle, OS.LVM_GETEXTENDEDLISTVIEWSTYLE, 0, 0);
+ int bits = (int)/*64*/OS.SendMessage (handle, OS.LVM_GETEXTENDEDLISTVIEWSTYLE, 0, 0);
if ((bits & OS.LVS_EX_GRIDLINES) != 0) {
RECT rect = new RECT ();
OS.GetClientRect (handle, rect);
@@ -5810,7 +5813,7 @@ LRESULT wmNotify (NMHDR hdr, int wParam, int lParam) {
case OS.TTN_GETDISPINFOA:
case OS.TTN_GETDISPINFOW: {
tipRequested = true;
- int code = callWindowProc (handle, OS.WM_NOTIFY, wParam, lParam);
+ int /*long*/ code = callWindowProc (handle, OS.WM_NOTIFY, wParam, lParam);
tipRequested = false;
return new LRESULT (code);
}
@@ -5818,7 +5821,7 @@ LRESULT wmNotify (NMHDR hdr, int wParam, int lParam) {
return result;
}
-LRESULT wmNotifyChild (NMHDR hdr, int wParam, int lParam) {
+LRESULT wmNotifyChild (NMHDR hdr, int /*long*/ wParam, int /*long*/ lParam) {
switch (hdr.code) {
case OS.LVN_ODFINDITEMA:
case OS.LVN_ODFINDITEMW: {
@@ -5964,7 +5967,7 @@ LRESULT wmNotifyChild (NMHDR hdr, int wParam, int lParam) {
break;
}
case OS.NM_CUSTOMDRAW: {
- int hwndHeader = OS.SendMessage (handle, OS.LVM_GETHEADER, 0, 0);
+ int /*long*/ hwndHeader = OS.SendMessage (handle, OS.LVM_GETHEADER, 0, 0);
if (hdr.hwndFrom == hwndHeader) break;
if (!customDraw && findImageControl () == null) {
/*
@@ -6048,8 +6051,8 @@ LRESULT wmNotifyChild (NMHDR hdr, int wParam, int lParam) {
}
}
if (hooks (SWT.EraseItem) || hooks (SWT.PaintItem)) {
- int hwndHeader = OS.SendMessage (handle, OS.LVM_GETHEADER, 0, 0);
- int count = OS.SendMessage (hwndHeader, OS.HDM_GETITEMCOUNT, 0, 0);
+ int /*long*/ 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 ();
RECT rect = new RECT ();
@@ -6063,7 +6066,7 @@ LRESULT wmNotifyChild (NMHDR hdr, int wParam, int lParam) {
OS.SendMessage (handle, OS. LVM_GETITEMRECT, pnmlv.iItem, itemRect);
ignoreCustomDraw = false;
RECT headerRect = new RECT ();
- int index = OS.SendMessage (hwndHeader, OS.HDM_ORDERTOINDEX, count - 1, 0);
+ int index = (int)/*64*/OS.SendMessage (hwndHeader, OS.HDM_ORDERTOINDEX, count - 1, 0);
OS.SendMessage (hwndHeader, OS.HDM_GETITEMRECT, index, headerRect);
OS.MapWindowPoints (hwndHeader, handle, headerRect, 2);
rect.left = headerRect.right;
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 2b04c97919..e476918410 100755
--- 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
@@ -301,8 +301,8 @@ public int getWidth () {
checkWidget ();
int index = parent.indexOf (this);
if (index == -1) return 0;
- int hwnd = parent.handle;
- return OS.SendMessage (hwnd, OS.LVM_GETCOLUMNWIDTH, index, 0);
+ int /*long*/ hwnd = parent.handle;
+ return (int)/*64*/OS.SendMessage (hwnd, OS.LVM_GETCOLUMNWIDTH, index, 0);
}
/**
@@ -320,10 +320,10 @@ public void pack () {
checkWidget ();
int index = parent.indexOf (this);
if (index == -1) return;
- int hwnd = parent.handle;
- int oldWidth = OS.SendMessage (hwnd, OS.LVM_GETCOLUMNWIDTH, index, 0);
+ int /*long*/ 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 = OS.SendMessage (hwnd, OS.LVM_GETSTRINGWIDTH, 0, buffer) + Table.HEADER_MARGIN;
+ int headerWidth = (int)/*64*/OS.SendMessage (hwnd, OS.LVM_GETSTRINGWIDTH, 0, buffer) + Table.HEADER_MARGIN;
if (OS.COMCTL32_MAJOR >= 6 && OS.IsAppThemed ()) headerWidth += Table.HEADER_EXTRA;
boolean hasHeaderImage = false;
if (image != null || parent.sortColumn == this) {
@@ -344,8 +344,8 @@ public void pack () {
}
int margin = 0;
if (OS.COMCTL32_VERSION >= OS.VERSION (5, 80)) {
- int hwndHeader = OS.SendMessage (hwnd, OS.LVM_GETHEADER, 0, 0);
- margin = OS.SendMessage (hwndHeader, OS.HDM_GETBITMAPMARGIN, 0, 0);
+ int /*long*/ 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 () {
*/
if ((index == 0 && !parent.firstColumnImage) || parent.hooks (SWT.MeasureItem)) {
RECT headerRect = new RECT ();
- int hwndHeader = OS.SendMessage (hwnd, OS.LVM_GETHEADER, 0, 0);
+ int /*long*/ hwndHeader = OS.SendMessage (hwnd, OS.LVM_GETHEADER, 0, 0);
OS.SendMessage (hwndHeader, OS.HDM_GETITEMRECT, index, headerRect);
OS.MapWindowPoints (hwndHeader, hwnd, headerRect, 2);
- int hDC = OS.GetDC (hwnd);
- int oldFont = 0, newFont = OS.SendMessage (hwnd, OS.WM_GETFONT, 0, 0);
+ int /*long*/ hDC = OS.GetDC (hwnd);
+ int /*long*/ oldFont = 0, newFont = OS.SendMessage (hwnd, OS.WM_GETFONT, 0, 0);
if (newFont != 0) oldFont = OS.SelectObject (hDC, newFont);
- int count = OS.SendMessage (hwnd, OS.LVM_GETITEMCOUNT, 0, 0);
+ int count = (int)/*64*/OS.SendMessage (hwnd, OS.LVM_GETITEMCOUNT, 0, 0);
for (int i=0; i<count; i++) {
TableItem item = parent.items [i];
if (item != null) {
- int hFont = item.cellFont != null ? item.cellFont [index] : -1;
+ int /*long*/ hFont = item.cellFont != null ? item.cellFont [index] : -1;
if (hFont == -1) hFont = item.font;
if (hFont != -1) hFont = OS.SelectObject (hDC, hFont);
Event event = parent.sendMeasureItemEvent (item, i, index, hDC);
@@ -386,7 +386,7 @@ public void pack () {
OS.SendMessage (hwnd, OS.LVM_SETCOLUMNWIDTH, index, columnWidth);
} else {
OS.SendMessage (hwnd, OS.LVM_SETCOLUMNWIDTH, index, OS.LVSCW_AUTOSIZE);
- columnWidth = OS.SendMessage (hwnd, OS.LVM_GETCOLUMNWIDTH, index, 0);
+ columnWidth = (int)/*64*/OS.SendMessage (hwnd, OS.LVM_GETCOLUMNWIDTH, index, 0);
if (index == 0) {
/*
* Bug in Windows. When LVM_SETCOLUMNWIDTH is used with LVSCW_AUTOSIZE
@@ -403,7 +403,7 @@ public void pack () {
* width by the width of the image list.
*/
if ((parent.style & SWT.CHECK) != 0) {
- int hStateList = OS.SendMessage (hwnd, OS.LVM_GETIMAGELIST, OS.LVSIL_STATE, 0);
+ int /*long*/ 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);
@@ -444,7 +444,7 @@ public void pack () {
}
}
parent.ignoreColumnResize = false;
- int newWidth = OS.SendMessage (hwnd, OS.LVM_GETCOLUMNWIDTH, index, 0);
+ int newWidth = (int)/*64*/OS.SendMessage (hwnd, OS.LVM_GETCOLUMNWIDTH, index, 0);
if (oldWidth != newWidth) {
updateToolTip (index);
sendEvent (SWT.Resize);
@@ -544,7 +544,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 hwnd = parent.handle;
+ int /*long*/ hwnd = parent.handle;
LVCOLUMN lvColumn = new LVCOLUMN ();
lvColumn.mask = OS.LVCF_FMT | OS.LVCF_IMAGE;
OS.SendMessage (hwnd, OS.LVM_GETCOLUMN, index, lvColumn);
@@ -565,7 +565,7 @@ public void setAlignment (int alignment) {
parent.forceResize ();
RECT rect = new RECT (), headerRect = new RECT ();
OS.GetClientRect (hwnd, rect);
- int hwndHeader = OS.SendMessage (hwnd, OS.LVM_GETHEADER, 0, 0);
+ int /*long*/ 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;
@@ -588,9 +588,9 @@ public void setImage (Image image) {
void setImage (Image image, boolean sort, boolean right) {
int index = parent.indexOf (this);
if (index == -1) return;
- int hwnd = parent.handle;
+ int /*long*/ hwnd = parent.handle;
if (OS.COMCTL32_MAJOR < 6) {
- int hwndHeader = OS.SendMessage (hwnd, OS.LVM_GETHEADER, 0, 0);
+ int /*long*/ 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);
@@ -678,8 +678,8 @@ void setSortDirection (int direction) {
if (OS.COMCTL32_MAJOR >= 6) {
int index = parent.indexOf (this);
if (index == -1) return;
- int hwnd = parent.handle;
- int hwndHeader = OS.SendMessage (hwnd, OS.LVM_GETHEADER, 0, 0);
+ int /*long*/ hwnd = parent.handle;
+ int /*long*/ 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);
@@ -721,7 +721,7 @@ void setSortDirection (int direction) {
RECT rect = new RECT ();
OS.GetClientRect (hwnd, rect);
if (OS.SendMessage (hwnd, OS.LVM_GETBKCOLOR, 0, 0) != OS.CLR_NONE) {
- int oldColumn = OS.SendMessage (hwnd, OS.LVM_GETSELECTEDCOLUMN, 0, 0);
+ int oldColumn = (int)/*64*/OS.SendMessage (hwnd, OS.LVM_GETSELECTEDCOLUMN, 0, 0);
int newColumn = direction == SWT.NONE ? -1 : index;
OS.SendMessage (hwnd, OS.LVM_SETSELECTEDCOLUMN, newColumn, 0);
RECT headerRect = new RECT ();
@@ -769,7 +769,7 @@ public void setText (String string) {
* text does not draw. The fix is to query and then
* set the alignment.
*/
- int hwnd = parent.handle;
+ int /*long*/ hwnd = parent.handle;
LVCOLUMN lvColumn = new LVCOLUMN ();
lvColumn.mask = OS.LVCF_FMT;
OS.SendMessage (hwnd, OS.LVM_GETCOLUMN, index, lvColumn);
@@ -782,14 +782,14 @@ public void setText (String string) {
* mnemonic characters and replace doubled mnemonics
* with spaces.
*/
- int hHeap = OS.GetProcessHeap ();
+ int /*long*/ hHeap = OS.GetProcessHeap ();
TCHAR buffer = new TCHAR (parent.getCodePage (), fixMnemonic (string), true);
int byteCount = buffer.length () * TCHAR.sizeof;
- int pszText = OS.HeapAlloc (hHeap, OS.HEAP_ZERO_MEMORY, byteCount);
+ int /*long*/ pszText = OS.HeapAlloc (hHeap, OS.HEAP_ZERO_MEMORY, byteCount);
OS.MoveMemory (pszText, buffer, byteCount);
lvColumn.mask |= OS.LVCF_TEXT;
lvColumn.pszText = pszText;
- int result = OS.SendMessage (hwnd, OS.LVM_SETCOLUMN, index, lvColumn);
+ int /*long*/ 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);
}
@@ -810,7 +810,7 @@ public void setText (String string) {
public void setToolTipText (String string) {
checkWidget();
toolTipText = string;
- int hwndHeaderToolTip = parent.headerToolTipHandle;
+ int /*long*/ hwndHeaderToolTip = parent.headerToolTipHandle;
if (hwndHeaderToolTip == 0) {
parent.createHeaderToolTips ();
parent.updateHeaderToolTips ();
@@ -832,15 +832,15 @@ public void setWidth (int width) {
if (width < 0) return;
int index = parent.indexOf (this);
if (index == -1) return;
- int hwnd = parent.handle;
+ int /*long*/ hwnd = parent.handle;
OS.SendMessage (hwnd, OS.LVM_SETCOLUMNWIDTH, index, width);
}
void updateToolTip (int index) {
- int hwndHeaderToolTip = parent.headerToolTipHandle;
+ int /*long*/ hwndHeaderToolTip = parent.headerToolTipHandle;
if (hwndHeaderToolTip != 0) {
- int hwnd = parent.handle;
- int hwndHeader = OS.SendMessage (hwnd, OS.LVM_GETHEADER, 0, 0);
+ int /*long*/ hwnd = parent.handle;
+ int /*long*/ 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 8b23dd8131..caa793d73f 100755
--- 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
@@ -34,8 +34,10 @@ public class TableItem extends Item {
String [] strings;
Image [] images;
boolean checked, grayed, cached;
- int imageIndent, background = -1, foreground = -1, font = -1;
- int [] cellBackground, cellForeground, cellFont;
+ int imageIndent, background = -1, foreground = -1;
+ int /*long*/ font = -1;
+ int [] cellBackground, cellForeground;
+ int /*long*/[] cellFont;
/**
* Constructs a new instance of this class given its parent
@@ -129,8 +131,10 @@ void clear () {
images = null;
imageIndent = 0;
checked = grayed = false;
- background = foreground = font = -1;
- cellBackground = cellForeground = cellFont = null;
+ font = -1;
+ background = foreground = -1;
+ cellFont = null;
+ cellBackground = cellForeground = null;
if ((parent.style & SWT.VIRTUAL) != 0) cached = false;
}
@@ -229,7 +233,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 hDC) {
+RECT getBounds (int row, int column, boolean getText, boolean getImage, boolean fullText, boolean fullImage, int /*long*/ hDC) {
if (!getText && !getImage) return new RECT ();
int columnCount = parent.getColumnCount ();
if (!(0 <= column && column < Math.max (1, columnCount))) {
@@ -237,25 +241,25 @@ RECT getBounds (int row, int column, boolean getText, boolean getImage, boolean
}
if (parent.fixScrollWidth) parent.setScrollWidth (null, true);
RECT rect = new RECT ();
- int hwnd = parent.handle;
- int bits = OS.SendMessage (hwnd, OS.LVM_GETEXTENDEDLISTVIEWSTYLE, 0, 0);
+ int /*long*/ 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 code = OS.SendMessage (hwnd, OS. LVM_GETITEMRECT, row, rect);
+ int /*long*/ code = OS.SendMessage (hwnd, OS. LVM_GETITEMRECT, row, rect);
parent.ignoreCustomDraw = false;
if (code == 0) return new RECT ();
if (getText) {
int width = 0;
- int hFont = cellFont != null ? cellFont [column] : -1;
+ int /*long*/ hFont = cellFont != null ? cellFont [column] : -1;
if (hFont == -1) hFont = font;
if (hFont == -1 && hDC == 0) {
TCHAR buffer = new TCHAR (parent.getCodePage (), text, true);
- width = OS.SendMessage (hwnd, OS.LVM_GETSTRINGWIDTH, 0, buffer);
+ width = (int)/*64*/OS.SendMessage (hwnd, OS.LVM_GETSTRINGWIDTH, 0, buffer);
} else {
TCHAR buffer = new TCHAR (parent.getCodePage (), text, false);
- int textDC = hDC != 0 ? hDC : OS.GetDC (hwnd), oldFont = -1;
+ int /*long*/ 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);
@@ -276,7 +280,7 @@ RECT getBounds (int row, int column, boolean getText, boolean getImage, boolean
if (getText) {
rect.left = OS.LVIR_SELECTBOUNDS;
parent.ignoreCustomDraw = true;
- int code = OS.SendMessage (hwnd, OS.LVM_GETITEMRECT, row, rect);
+ int /*long*/ code = OS.SendMessage (hwnd, OS.LVM_GETITEMRECT, row, rect);
parent.ignoreCustomDraw = false;
if (code == 0) return new RECT ();
if (!getImage) {
@@ -290,14 +294,14 @@ RECT getBounds (int row, int column, boolean getText, boolean getImage, boolean
} else {
rect.left = OS.LVIR_ICON;
parent.ignoreCustomDraw = true;
- int code = OS.SendMessage (hwnd, OS.LVM_GETITEMRECT, row, rect);
+ int /*long*/ 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 hwndHeader = OS.SendMessage (hwnd, OS.LVM_GETHEADER, 0, 0);
+ int /*long*/ 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;
@@ -321,7 +325,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 code = OS.SendMessage (hwnd, OS. LVM_GETSUBITEMRECT, row, rect);
+ int /*long*/ code = OS.SendMessage (hwnd, OS. LVM_GETSUBITEMRECT, row, rect);
parent.ignoreCustomDraw = false;
if (code == 0) return new RECT ();
/*
@@ -355,7 +359,7 @@ RECT getBounds (int row, int column, boolean getText, boolean getImage, boolean
}
if (column == 0 && fullImage) {
RECT headerRect = new RECT ();
- int hwndHeader = OS.SendMessage (hwnd, OS.LVM_GETHEADER, 0, 0);
+ int /*long*/ 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;
@@ -363,7 +367,7 @@ RECT getBounds (int row, int column, boolean getText, boolean getImage, boolean
} else {
rect.left = OS.LVIR_ICON;
parent.ignoreCustomDraw = true;
- int code = OS.SendMessage (hwnd, OS. LVM_GETSUBITEMRECT, row, rect);
+ int /*long*/ code = OS.SendMessage (hwnd, OS. LVM_GETSUBITEMRECT, row, rect);
parent.ignoreCustomDraw = false;
if (code == 0) return new RECT ();
if (!hasImage) rect.right = rect.left;
@@ -450,7 +454,7 @@ public Font getFont (int index) {
if (!parent.checkData (this, true)) error (SWT.ERROR_WIDGET_DISPOSED);
int count = Math.max (1, parent.getColumnCount ());
if (0 > index || index > count -1) return getFont ();
- int hFont = (cellFont != null) ? cellFont [index] : font;
+ int /*long*/ hFont = (cellFont != null) ? cellFont [index] : font;
return hFont == -1 ? getFont () : Font.win32_new (display, hFont);
}
@@ -669,7 +673,7 @@ public Rectangle getTextBounds (int index) {
void redraw () {
if (parent.currentItem == this || parent.drawCount != 0) return;
- int hwnd = parent.handle;
+ int /*long*/ hwnd = parent.handle;
if (!OS.IsWindowVisible (hwnd)) return;
int index = parent.indexOf (this);
if (index == -1) return;
@@ -678,7 +682,7 @@ void redraw () {
void redraw (int column, boolean drawText, boolean drawImage) {
if (parent.currentItem == this || parent.drawCount != 0) return;
- int hwnd = parent.handle;
+ int /*long*/ hwnd = parent.handle;
if (!OS.IsWindowVisible (hwnd)) return;
int index = parent.indexOf (this);
if (index == -1) return;
@@ -695,7 +699,8 @@ void releaseWidget () {
super.releaseWidget ();
strings = null;
images = null;
- cellBackground = cellForeground = cellFont = null;
+ cellFont = null;
+ cellBackground = cellForeground = null;
}
/**
@@ -825,7 +830,7 @@ public void setFont (Font font){
if (font != null && font.isDisposed ()) {
SWT.error (SWT.ERROR_INVALID_ARGUMENT);
}
- int hFont = -1;
+ int /*long*/ hFont = -1;
if (font != null) {
parent.setCustomDraw (true);
hFont = font.handle;
@@ -847,7 +852,7 @@ public void setFont (Font font){
if ((parent.style & SWT.VIRTUAL) == 0 && cached) {
int itemIndex = parent.indexOf (this);
if (itemIndex != -1) {
- int hwnd = parent.handle;
+ int /*long*/ hwnd = parent.handle;
LVITEM lvItem = new LVITEM ();
lvItem.mask = OS.LVIF_TEXT;
lvItem.iItem = itemIndex;
@@ -886,13 +891,13 @@ public void setFont (int index, Font font) {
}
int count = Math.max (1, parent.getColumnCount ());
if (0 > index || index > count - 1) return;
- int hFont = -1;
+ int /*long*/ hFont = -1;
if (font != null) {
parent.setCustomDraw (true);
hFont = font.handle;
}
if (cellFont == null) {
- cellFont = new int [count];
+ cellFont = new int /*long*/ [count];
for (int i = 0; i < count; i++) {
cellFont [i] = -1;
}
@@ -915,7 +920,7 @@ public void setFont (int index, Font font) {
if ((parent.style & SWT.VIRTUAL) == 0 && cached) {
int itemIndex = parent.indexOf (this);
if (itemIndex != -1) {
- int hwnd = parent.handle;
+ int /*long*/ hwnd = parent.handle;
LVITEM lvItem = new LVITEM ();
lvItem.mask = OS.LVIF_TEXT;
lvItem.iItem = itemIndex;
@@ -1124,7 +1129,7 @@ public void setImageIndent (int indent) {
} else {
int index = parent.indexOf (this);
if (index != -1) {
- int hwnd = parent.handle;
+ int /*long*/ hwnd = parent.handle;
LVITEM lvItem = new LVITEM ();
lvItem.mask = OS.LVIF_INDENT;
lvItem.iItem = index;
@@ -1205,7 +1210,7 @@ public void setText (int index, String string) {
if ((parent.style & SWT.VIRTUAL) == 0 && cached) {
int itemIndex = parent.indexOf (this);
if (itemIndex != -1) {
- int hwnd = parent.handle;
+ int /*long*/ 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/Text.java b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Text.java
index a30387bc2b..cf25949200 100755
--- 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
@@ -70,7 +70,7 @@ public class Text extends Scrollable {
DELIMITER = "\r\n";
}
- static final int EditProc;
+ static final int /*long*/ EditProc;
static final TCHAR EditClass = new TCHAR (0, "EDIT", true);
static {
WNDCLASS lpWndClass = new WNDCLASS ();
@@ -79,7 +79,7 @@ public class Text extends Scrollable {
/*
* This code is intentionally commented.
*/
-// int hwndText = OS.CreateWindowEx (0,
+// int /*long*/ hwndText = OS.CreateWindowEx (0,
// EditClass,
// null,
// OS.WS_OVERLAPPED | OS.ES_PASSWORD,
@@ -128,7 +128,7 @@ public Text (Composite parent, int style) {
super (parent, checkStyle (style));
}
-int callWindowProc (int hwnd, int msg, int wParam, int lParam) {
+int /*long*/ callWindowProc (int /*long*/ hwnd, int msg, int /*long*/ wParam, int /*long*/ lParam) {
if (handle == 0) return 0;
return OS.CallWindowProc (EditProc, hwnd, msg, wParam, lParam);
}
@@ -325,13 +325,13 @@ public Point computeSize (int wHint, int hHint, boolean changed) {
checkWidget ();
int height = 0, width = 0;
if (wHint == SWT.DEFAULT || hHint == SWT.DEFAULT) {
- int newFont, oldFont = 0;
- int hDC = OS.GetDC (handle);
+ int /*long*/ newFont, oldFont = 0;
+ int /*long*/ 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 ();
OS.GetTextMetrics (hDC, tm);
- int count = (style & SWT.SINGLE) != 0 ? 1 : OS.SendMessage (handle, OS.EM_GETLINECOUNT, 0, 0);
+ int count = (style & SWT.SINGLE) != 0 ? 1 : (int)/*64*/OS.SendMessage (handle, OS.EM_GETLINECOUNT, 0, 0);
height = count * tm.tmHeight;
RECT rect = new RECT ();
int flags = OS.DT_CALCRECT | OS.DT_EDITCONTROL | OS.DT_NOPREFIX;
@@ -384,7 +384,7 @@ public Rectangle computeTrim (int x, int y, int width, int height) {
* the single-line text widget in an editable combo
* box.
*/
- int margins = OS.SendMessage(handle, OS.EM_GETMARGINS, 0, 0);
+ int /*long*/ 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++;
@@ -444,12 +444,12 @@ int defaultBackground () {
return OS.GetSysColor ((bits & OS.ES_READONLY) != 0 ? OS.COLOR_3DFACE : OS.COLOR_WINDOW);
}
-boolean dragDetect (int hwnd, int x, int y, boolean filter, boolean [] detect, boolean [] consume) {
+boolean dragDetect (int /*long*/ 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 lParam = OS.MAKELPARAM (x, y);
+ int /*long*/ 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)) {
@@ -545,7 +545,7 @@ public int getBorderWidth () {
*/
public int getCaretLineNumber () {
checkWidget ();
- return OS.SendMessage (handle, OS.EM_LINEFROMCHAR, -1, 0);
+ return (int)/*64*/OS.SendMessage (handle, OS.EM_LINEFROMCHAR, -1, 0);
}
/**
@@ -576,7 +576,7 @@ public Point getCaretLocation () {
* pixel coordinates (0,0).
*/
int position = getCaretPosition ();
- int caretPos = OS.SendMessage (handle, OS.EM_POSFROMCHAR, position, 0);
+ int /*long*/ caretPos = OS.SendMessage (handle, OS.EM_POSFROMCHAR, position, 0);
if (caretPos == -1) {
caretPos = 0;
if (position >= OS.GetWindowTextLength (handle)) {
@@ -637,8 +637,8 @@ public int getCaretPosition () {
*/
int caret = start [0];
if (start [0] != end [0]) {
- int startLine = OS.SendMessage (handle, OS.EM_LINEFROMCHAR, start [0], 0);
- int endLine = OS.SendMessage (handle, OS.EM_LINEFROMCHAR, end [0], 0);
+ int startLine = (int)/*64*/OS.SendMessage (handle, OS.EM_LINEFROMCHAR, start [0], 0);
+ int endLine = (int)/*64*/OS.SendMessage (handle, OS.EM_LINEFROMCHAR, end [0], 0);
if (startLine == endLine) {
if (!OS.IsWinCE) {
int idThread = OS.GetWindowThreadProcessId (handle, null);
@@ -648,9 +648,9 @@ public int getCaretPosition () {
if (lpgui.hwndCaret == handle || lpgui.hwndCaret == 0) {
POINT ptCurrentPos = new POINT ();
if (OS.GetCaretPos (ptCurrentPos)) {
- int endPos = OS.SendMessage (handle, OS.EM_POSFROMCHAR, end [0], 0);
+ int /*long*/ endPos = OS.SendMessage (handle, OS.EM_POSFROMCHAR, end [0], 0);
if (endPos == -1) {
- int startPos = OS.SendMessage (handle, OS.EM_POSFROMCHAR, start [0], 0);
+ int /*long*/ 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 {
@@ -662,8 +662,8 @@ public int getCaretPosition () {
}
}
} else {
- int caretPos = OS.SendMessage (handle, OS.EM_LINEINDEX, -1, 0);
- int caretLine = OS.SendMessage (handle, OS.EM_LINEFROMCHAR, caretPos, 0);
+ int caretPos = (int)/*64*/OS.SendMessage (handle, OS.EM_LINEINDEX, -1, 0);
+ int caretLine = (int)/*64*/OS.SendMessage (handle, OS.EM_LINEFROMCHAR, caretPos, 0);
if (caretLine == endLine) caret = end [0];
}
}
@@ -760,7 +760,7 @@ public boolean getEditable () {
*/
public int getLineCount () {
checkWidget ();
- return OS.SendMessage (handle, OS.EM_GETLINECOUNT, 0, 0);
+ return (int)/*64*/OS.SendMessage (handle, OS.EM_GETLINECOUNT, 0, 0);
}
/**
@@ -792,8 +792,8 @@ public String getLineDelimiter () {
*/
public int getLineHeight () {
checkWidget ();
- int newFont, oldFont = 0;
- int hDC = OS.GetDC (handle);
+ int /*long*/ newFont, oldFont = 0;
+ int /*long*/ 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 ();
@@ -866,7 +866,7 @@ public String getMessage () {
/*public*/ int getPosition (Point point) {
checkWidget();
if (point == null) error (SWT.ERROR_NULL_ARGUMENT);
- int lParam = OS.MAKELPARAM (point.x, point.y);
+ int /*long*/ 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 position;
@@ -960,10 +960,10 @@ public int getTabs () {
}
int getTabWidth (int tabs) {
- int oldFont = 0;
+ int /*long*/ oldFont = 0;
RECT rect = new RECT ();
- int hDC = OS.GetDC (handle);
- int newFont = OS.SendMessage (handle, OS.WM_GETFONT, 0, 0);
+ int /*long*/ hDC = OS.GetDC (handle);
+ int /*long*/ 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);
@@ -1047,7 +1047,7 @@ public String getText (int start, int end) {
*/
public int getTextLimit () {
checkWidget ();
- return OS.SendMessage (handle, OS.EM_GETLIMITTEXT, 0, 0) & 0x7FFFFFFF;
+ return (int)/*64*/OS.SendMessage (handle, OS.EM_GETLIMITTEXT, 0, 0) & 0x7FFFFFFF;
}
/**
@@ -1067,7 +1067,7 @@ public int getTextLimit () {
public int getTopIndex () {
checkWidget ();
if ((style & SWT.SINGLE) != 0) return 0;
- return OS.SendMessage (handle, OS.EM_GETFIRSTVISIBLELINE, 0, 0);
+ return (int)/*64*/OS.SendMessage (handle, OS.EM_GETFIRSTVISIBLELINE, 0, 0);
}
/**
@@ -1098,7 +1098,7 @@ public int getTopPixel () {
* of Rich Edit return zero.
*/
int [] buffer = new int [2];
- int code = OS.SendMessage (handle, OS.EM_GETSCROLLPOS, 0, buffer);
+ int /*long*/ code = OS.SendMessage (handle, OS.EM_GETSCROLLPOS, 0, buffer);
if (code == 1) return buffer [1];
return getTopIndex () * getLineHeight ();
}
@@ -1154,11 +1154,11 @@ int mbcsToWcsPos (int mbcsPos) {
byte [] buffer = new byte [128];
String delimiter = getLineDelimiter();
int delimiterSize = delimiter.length ();
- int count = OS.SendMessageA (handle, OS.EM_GETLINECOUNT, 0, 0);
+ int count = (int)/*64*/OS.SendMessageA (handle, OS.EM_GETLINECOUNT, 0, 0);
for (int line=0; line<count; line++) {
int wcsSize = 0;
- int linePos = OS.SendMessageA (handle, OS.EM_LINEINDEX, line, 0);
- int mbcsSize = OS.SendMessageA (handle, OS.EM_LINELENGTH, linePos, 0);
+ int linePos = (int)/*64*/OS.SendMessageA (handle, OS.EM_LINEINDEX, line, 0);
+ int mbcsSize = (int)/*64*/OS.SendMessageA (handle, OS.EM_LINELENGTH, linePos, 0);
if (mbcsSize != 0) {
if (mbcsSize + delimiterSize > buffer.length) {
buffer = new byte [mbcsSize + delimiterSize];
@@ -1166,7 +1166,7 @@ int mbcsToWcsPos (int mbcsPos) {
//ENDIAN
buffer [0] = (byte) (mbcsSize & 0xFF);
buffer [1] = (byte) (mbcsSize >> 8);
- mbcsSize = OS.SendMessageA (handle, OS.EM_GETLINE, line, buffer);
+ mbcsSize = (int)/*64*/OS.SendMessageA (handle, OS.EM_GETLINE, line, buffer);
wcsSize = OS.MultiByteToWideChar (cp, OS.MB_PRECOMPOSED, buffer, mbcsSize, null, 0);
}
if (line - 1 != count) {
@@ -1295,7 +1295,7 @@ public void selectAll () {
OS.SendMessage (handle, OS.EM_SETSEL, 0, -1);
}
-boolean sendKeyEvent (int type, int msg, int wParam, int lParam, Event event) {
+boolean sendKeyEvent (int type, int msg, int /*long*/ wParam, int /*long*/ lParam, Event event) {
if (!super.sendKeyEvent (type, msg, wParam, lParam, event)) {
return false;
}
@@ -1342,7 +1342,7 @@ boolean sendKeyEvent (int type, int msg, int wParam, int lParam, Event event) {
case 0x08: /* Bs */
if (start [0] == end [0]) {
if (start [0] == 0) return true;
- int lineStart = OS.SendMessage (handle, OS.EM_LINEINDEX, -1, 0);
+ int lineStart = (int)/*64*/OS.SendMessage (handle, OS.EM_LINEINDEX, -1, 0);
if (start [0] == lineStart) {
start [0] = start [0] - DELIMITER.length ();
} else {
@@ -1361,8 +1361,8 @@ boolean sendKeyEvent (int type, int msg, int wParam, int lParam, Event event) {
if (start [0] == end [0]) {
int length = OS.GetWindowTextLength (handle);
if (start [0] == length) return true;
- int line = OS.SendMessage (handle, OS.EM_LINEFROMCHAR, end [0], 0);
- int lineStart = OS.SendMessage (handle, OS.EM_LINEINDEX, line + 1, 0);
+ int line = (int)/*64*/OS.SendMessage (handle, OS.EM_LINEFROMCHAR, end [0], 0);
+ int lineStart = (int)/*64*/OS.SendMessage (handle, OS.EM_LINEINDEX, line + 1, 0);
if (end [0] == lineStart - DELIMITER.length ()) {
end [0] = end [0] + DELIMITER.length ();
} else {
@@ -1428,7 +1428,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 margins = OS.SendMessage (handle, OS.EM_GETMARGINS, 0, 0);
+ int /*long*/ 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];
@@ -1798,7 +1798,7 @@ public void setText (String string) {
string = verifyText (string, 0, length, null);
if (string == null) return;
}
- int limit = OS.SendMessage (handle, OS.EM_GETLIMITTEXT, 0, 0) & 0x7FFFFFFF;
+ int limit = (int)/*64*/OS.SendMessage (handle, OS.EM_GETLIMITTEXT, 0, 0) & 0x7FFFFFFF;
if (string.length () > limit) string = string.substring (0, limit);
TCHAR buffer = new TCHAR (getCodePage (), string, true);
OS.SetWindowText (handle, buffer);
@@ -1861,9 +1861,9 @@ public void setTextLimit (int limit) {
public void setTopIndex (int index) {
checkWidget ();
if ((style & SWT.SINGLE) != 0) return;
- int count = OS.SendMessage (handle, OS.EM_GETLINECOUNT, 0, 0);
+ int count = (int)/*64*/OS.SendMessage (handle, OS.EM_GETLINECOUNT, 0, 0);
index = Math.min (Math.max (index, 0), count - 1);
- int topIndex = OS.SendMessage (handle, OS.EM_GETFIRSTVISIBLELINE, 0, 0);
+ int topIndex = (int)/*64*/OS.SendMessage (handle, OS.EM_GETFIRSTVISIBLELINE, 0, 0);
OS.SendMessage (handle, OS.EM_LINESCROLL, 0, index - topIndex);
}
@@ -1919,11 +1919,11 @@ int wcsToMbcsPos (int wcsPos) {
byte [] buffer = new byte [128];
String delimiter = getLineDelimiter ();
int delimiterSize = delimiter.length ();
- int count = OS.SendMessageA (handle, OS.EM_GETLINECOUNT, 0, 0);
+ int count = (int)/*64*/OS.SendMessageA (handle, OS.EM_GETLINECOUNT, 0, 0);
for (int line=0; line<count; line++) {
int wcsSize = 0;
- int linePos = OS.SendMessageA (handle, OS.EM_LINEINDEX, line, 0);
- int mbcsSize = OS.SendMessageA (handle, OS.EM_LINELENGTH, linePos, 0);
+ int linePos = (int)/*64*/OS.SendMessageA (handle, OS.EM_LINEINDEX, line, 0);
+ int mbcsSize = (int)/*64*/OS.SendMessageA (handle, OS.EM_LINELENGTH, linePos, 0);
if (mbcsSize != 0) {
if (mbcsSize + delimiterSize > buffer.length) {
buffer = new byte [mbcsSize + delimiterSize];
@@ -1931,7 +1931,7 @@ int wcsToMbcsPos (int wcsPos) {
//ENDIAN
buffer [0] = (byte) (mbcsSize & 0xFF);
buffer [1] = (byte) (mbcsSize >> 8);
- mbcsSize = OS.SendMessageA (handle, OS.EM_GETLINE, line, buffer);
+ mbcsSize = (int)/*64*/OS.SendMessageA (handle, OS.EM_GETLINE, line, buffer);
wcsSize = OS.MultiByteToWideChar (cp, OS.MB_PRECOMPOSED, buffer, mbcsSize, null, 0);
}
if (line - 1 != count) {
@@ -1992,11 +1992,11 @@ TCHAR windowClass () {
return EditClass;
}
-int windowProc () {
+int /*long*/ windowProc () {
return EditProc;
}
-int windowProc (int hwnd, int msg, int wParam, int lParam) {
+int /*long*/ windowProc (int /*long*/ hwnd, int msg, int /*long*/ wParam, int /*long*/ lParam) {
if (msg == OS.EM_UNDO) {
int bits = OS.GetWindowLong (handle, OS.GWL_STYLE);
if ((bits & OS.ES_MULTILINE) == 0) {
@@ -2013,7 +2013,7 @@ int windowProc (int hwnd, int msg, int wParam, int lParam) {
return super.windowProc (hwnd, msg, wParam, lParam);
}
-LRESULT WM_CHAR (int wParam, int lParam) {
+LRESULT WM_CHAR (int /*long*/ wParam, int /*long*/ lParam) {
if (ignoreCharacter) return null;
LRESULT result = super.WM_CHAR (wParam, lParam);
if (result != null) return result;
@@ -2025,7 +2025,7 @@ LRESULT WM_CHAR (int wParam, int lParam) {
* is inserted into the control. The fix is to detect
* this case and not call the window proc.
*/
- switch (wParam) {
+ switch ((int)/*64*/wParam) {
case SWT.DEL:
if (OS.GetKeyState (OS.VK_CONTROL) < 0) {
return LRESULT.ZERO;
@@ -2040,7 +2040,7 @@ LRESULT WM_CHAR (int wParam, int lParam) {
* the window proc.
*/
if ((style & SWT.SINGLE) != 0) {
- switch (wParam) {
+ switch ((int)/*64*/wParam) {
case SWT.CR:
postEvent (SWT.DefaultSelection);
// FALL THROUGH
@@ -2051,19 +2051,19 @@ LRESULT WM_CHAR (int wParam, int lParam) {
return result;
}
-LRESULT WM_CLEAR (int wParam, int lParam) {
+LRESULT WM_CLEAR (int /*long*/ wParam, int /*long*/ lParam) {
LRESULT result = super.WM_CLEAR (wParam, lParam);
if (result != null) return result;
return wmClipboard (OS.WM_CLEAR, wParam, lParam);
}
-LRESULT WM_CUT (int wParam, int lParam) {
+LRESULT WM_CUT (int /*long*/ wParam, int /*long*/ lParam) {
LRESULT result = super.WM_CUT (wParam, lParam);
if (result != null) return result;
return wmClipboard (OS.WM_CUT, wParam, lParam);
}
-LRESULT WM_ERASEBKGND (int wParam, int lParam) {
+LRESULT WM_ERASEBKGND (int /*long*/ wParam, int /*long*/ 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) {
@@ -2089,7 +2089,7 @@ LRESULT WM_ERASEBKGND (int wParam, int lParam) {
return result;
}
-LRESULT WM_GETDLGCODE (int wParam, int lParam) {
+LRESULT WM_GETDLGCODE (int /*long*/ wParam, int /*long*/ lParam) {
LRESULT result = super.WM_GETDLGCODE (wParam, lParam);
if (result != null) return result;
@@ -2115,19 +2115,19 @@ LRESULT WM_GETDLGCODE (int wParam, int lParam) {
* so DLGC_WANTARROWS should not be cleared.
*/
if ((style & SWT.READ_ONLY) != 0) {
- int code = callWindowProc (handle, OS.WM_GETDLGCODE, wParam, lParam);
+ int /*long*/ code = callWindowProc (handle, OS.WM_GETDLGCODE, wParam, lParam);
code &= ~(OS.DLGC_WANTALLKEYS | OS.DLGC_WANTTAB);
return new LRESULT (code);
}
return null;
}
-LRESULT WM_IME_CHAR (int wParam, int lParam) {
+LRESULT WM_IME_CHAR (int /*long*/ wParam, int /*long*/ lParam) {
/* Process a DBCS character */
Display display = this.display;
display.lastKey = 0;
- display.lastAscii = wParam;
+ display.lastAscii = (int)/*64*/wParam;
display.lastVirtual = display.lastNull = display.lastDead = false;
if (!sendKeyEvent (SWT.KeyDown, OS.WM_IME_CHAR, wParam, lParam)) {
return LRESULT.ZERO;
@@ -2141,7 +2141,7 @@ LRESULT WM_IME_CHAR (int wParam, int lParam) {
* them to the application.
*/
ignoreCharacter = true;
- int result = callWindowProc (handle, OS.WM_IME_CHAR, wParam, lParam);
+ int /*long*/ 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)) {
@@ -2156,7 +2156,7 @@ LRESULT WM_IME_CHAR (int wParam, int lParam) {
return new LRESULT (result);
}
-LRESULT WM_LBUTTONDBLCLK (int wParam, int lParam) {
+LRESULT WM_LBUTTONDBLCLK (int /*long*/ wParam, int /*long*/ lParam) {
/*
* Prevent Windows from processing WM_LBUTTONDBLCLK
* when double clicking behavior is disabled by not
@@ -2187,14 +2187,14 @@ LRESULT WM_LBUTTONDBLCLK (int wParam, int lParam) {
if (start [0] == end [0]) {
int length = OS.GetWindowTextLength (handle);
if (length == start [0]) {
- int code = OS.SendMessage (handle, OS.EM_LINELENGTH, length, 0);
+ int code = (int)/*64*/OS.SendMessage (handle, OS.EM_LINELENGTH, length, 0);
if (code == 0) return LRESULT.ZERO;
}
}
return result;
}
-LRESULT WM_LBUTTONDOWN (int wParam, int lParam) {
+LRESULT WM_LBUTTONDOWN (int /*long*/ wParam, int /*long*/ lParam) {
if (OS.IsPPC) {
LRESULT result = null;
Display display = this.display;
@@ -2238,19 +2238,19 @@ LRESULT WM_LBUTTONDOWN (int wParam, int lParam) {
return super.WM_LBUTTONDOWN (wParam, lParam);
}
-LRESULT WM_PASTE (int wParam, int lParam) {
+LRESULT WM_PASTE (int /*long*/ wParam, int /*long*/ lParam) {
LRESULT result = super.WM_PASTE (wParam, lParam);
if (result != null) return result;
return wmClipboard (OS.WM_PASTE, wParam, lParam);
}
-LRESULT WM_UNDO (int wParam, int lParam) {
+LRESULT WM_UNDO (int /*long*/ wParam, int /*long*/ 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 wParam, int lParam) {
+LRESULT wmClipboard (int msg, int /*long*/ wParam, int /*long*/ lParam) {
if ((style & SWT.READ_ONLY) != 0) return null;
if (!hooks (SWT.Verify) && !filters (SWT.Verify)) return null;
boolean call = false;
@@ -2326,7 +2326,7 @@ LRESULT wmClipboard (int msg, int wParam, int lParam) {
return null;
}
-LRESULT wmColorChild (int wParam, int lParam) {
+LRESULT wmColorChild (int /*long*/ wParam, int /*long*/ 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);
@@ -2351,7 +2351,7 @@ LRESULT wmColorChild (int wParam, int lParam) {
return super.wmColorChild (wParam, lParam);
}
-LRESULT wmCommandChild (int wParam, int lParam) {
+LRESULT wmCommandChild (int /*long*/ wParam, int /*long*/ lParam) {
int code = OS.HIWORD (wParam);
switch (code) {
case OS.EN_CHANGE:
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 4683a999c4..1501beb0bf 100755
--- 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
@@ -44,7 +44,7 @@ public class ToolBar extends Composite {
ToolItem [] items;
boolean ignoreResize, ignoreMouse;
ImageList imageList, disabledImageList, hotImageList;
- static final int ToolBarProc;
+ static final int /*long*/ ToolBarProc;
static final TCHAR ToolBarClass = new TCHAR (0, OS.TOOLBARCLASSNAME, true);
static {
WNDCLASS lpWndClass = new WNDCLASS ();
@@ -133,7 +133,7 @@ public ToolBar (Composite parent, int style) {
}
}
-int callWindowProc (int hwnd, int msg, int wParam, int lParam) {
+int /*long*/ callWindowProc (int /*long*/ hwnd, int msg, int /*long*/ wParam, int /*long*/ lParam) {
if (handle == 0) return 0;
/*
* Bug in Windows. For some reason, during the processing
@@ -185,7 +185,7 @@ public Point computeSize (int wHint, int hHint, boolean changed) {
if ((style & SWT.VERTICAL) != 0) {
RECT rect = new RECT ();
TBBUTTON lpButton = new TBBUTTON ();
- int count = OS.SendMessage (handle, OS.TB_BUTTONCOUNT, 0, 0);
+ int count = (int)/*64*/OS.SendMessage (handle, OS.TB_BUTTONCOUNT, 0, 0);
for (int i=0; i<count; i++) {
OS.SendMessage (handle, OS.TB_GETITEMRECT, i, rect);
height = Math.max (height, rect.bottom);
@@ -213,7 +213,7 @@ public Point computeSize (int wHint, int hHint, boolean changed) {
if (redraw) OS.UpdateWindow (handle);
int flags = OS.SWP_NOACTIVATE | OS.SWP_NOMOVE | OS.SWP_NOREDRAW | OS.SWP_NOZORDER;
SetWindowPos (handle, 0, 0, 0, newWidth, newHeight, flags);
- int count = OS.SendMessage (handle, OS.TB_BUTTONCOUNT, 0, 0);
+ int count = (int)/*64*/OS.SendMessage (handle, OS.TB_BUTTONCOUNT, 0, 0);
if (count != 0) {
RECT rect = new RECT ();
OS.SendMessage (handle, OS.TB_GETITEMRECT, count - 1, rect);
@@ -283,7 +283,7 @@ void createHandle () {
* bar currently sets this value to 300 so it is not
* necessary to set TTM_SETMAXTIPWIDTH.
*/
-// int hwndToolTip = OS.SendMessage (handle, OS.TB_GETTOOLTIPS, 0, 0);
+// int /*long*/ hwndToolTip = OS.SendMessage (handle, OS.TB_GETTOOLTIPS, 0, 0);
// OS.SendMessage (hwndToolTip, OS.TTM_SETMAXTIPWIDTH, 0, 0x7FFF);
/*
@@ -298,7 +298,7 @@ void createHandle () {
* The control will not destroy a font that it did not
* create.
*/
- int hFont = OS.GetStockObject (OS.SYSTEM_FONT);
+ int /*long*/ hFont = OS.GetStockObject (OS.SYSTEM_FONT);
OS.SendMessage (handle, OS.WM_SETFONT, hFont, 0);
/* Set the button struct, bitmap and button sizes */
@@ -313,7 +313,7 @@ void createHandle () {
}
void createItem (ToolItem item, int index) {
- int count = OS.SendMessage (handle, OS.TB_BUTTONCOUNT, 0, 0);
+ int count = (int)/*64*/OS.SendMessage (handle, OS.TB_BUTTONCOUNT, 0, 0);
if (!(0 <= index && index <= count)) error (SWT.ERROR_INVALID_RANGE);
int id = 0;
while (id < items.length && items [id] != null) id++;
@@ -364,7 +364,7 @@ void destroyItem (ToolItem item) {
TBBUTTONINFO info = new TBBUTTONINFO ();
info.cbSize = TBBUTTONINFO.sizeof;
info.dwMask = OS.TBIF_IMAGE | OS.TBIF_STYLE;
- int index = OS.SendMessage (handle, OS.TB_GETBUTTONINFO, item.id, info);
+ int index = (int)/*64*/OS.SendMessage (handle, OS.TB_GETBUTTONINFO, item.id, info);
/*
* Feature in Windows. For some reason, a tool item that has
* the style BTNS_SEP does not return I_IMAGENONE when queried
@@ -384,7 +384,7 @@ void destroyItem (ToolItem item) {
if (item.id == lastFocusId) lastFocusId = -1;
items [item.id] = null;
item.id = -1;
- int count = OS.SendMessage (handle, OS.TB_BUTTONCOUNT, 0, 0);
+ int count = (int)/*64*/OS.SendMessage (handle, OS.TB_BUTTONCOUNT, 0, 0);
if (count == 0) {
if (imageList != null) {
OS.SendMessage (handle, OS.TB_SETIMAGELIST, 0, 0);
@@ -458,10 +458,10 @@ ImageList getImageList () {
*/
public ToolItem getItem (int index) {
checkWidget ();
- int count = OS.SendMessage (handle, OS.TB_BUTTONCOUNT, 0, 0);
+ 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 result = OS.SendMessage (handle, OS.TB_GETBUTTON, index, lpButton);
+ int /*long*/ result = OS.SendMessage (handle, OS.TB_GETBUTTON, index, lpButton);
if (result == 0) error (SWT.ERROR_CANNOT_GET_ITEM);
return items [lpButton.idCommand];
}
@@ -505,7 +505,7 @@ public ToolItem getItem (Point point) {
*/
public int getItemCount () {
checkWidget ();
- return OS.SendMessage (handle, OS.TB_BUTTONCOUNT, 0, 0);
+ return (int)/*64*/OS.SendMessage (handle, OS.TB_BUTTONCOUNT, 0, 0);
}
/**
@@ -526,7 +526,7 @@ public int getItemCount () {
*/
public ToolItem [] getItems () {
checkWidget ();
- int count = OS.SendMessage (handle, OS.TB_BUTTONCOUNT, 0, 0);
+ int count = (int)/*64*/OS.SendMessage (handle, OS.TB_BUTTONCOUNT, 0, 0);
TBBUTTON lpButton = new TBBUTTON ();
ToolItem [] result = new ToolItem [count];
for (int i=0; i<count; i++) {
@@ -552,9 +552,9 @@ public ToolItem [] getItems () {
public int getRowCount () {
checkWidget ();
if ((style & SWT.VERTICAL) != 0) {
- return OS.SendMessage (handle, OS.TB_BUTTONCOUNT, 0, 0);
+ return (int)/*64*/OS.SendMessage (handle, OS.TB_BUTTONCOUNT, 0, 0);
}
- return OS.SendMessage (handle, OS.TB_GETROWS, 0, 0);
+ return (int)/*64*/OS.SendMessage (handle, OS.TB_GETROWS, 0, 0);
}
/**
@@ -579,7 +579,7 @@ public int indexOf (ToolItem item) {
checkWidget ();
if (item == null) error (SWT.ERROR_NULL_ARGUMENT);
if (item.isDisposed()) error(SWT.ERROR_INVALID_ARGUMENT);
- return OS.SendMessage (handle, OS.TB_COMMANDTOINDEX, item.id, 0);
+ return (int)/*64*/OS.SendMessage (handle, OS.TB_COMMANDTOINDEX, item.id, 0);
}
void layoutItems () {
@@ -622,7 +622,7 @@ void layoutItems () {
* the tool items. The fix is to use WM_SETFONT to force
* the tool bar to redraw and lay out.
*/
- int hFont = OS.SendMessage (handle, OS.WM_GETFONT, 0, 0);
+ int /*long*/ hFont = OS.SendMessage (handle, OS.WM_GETFONT, 0, 0);
OS.SendMessage (handle, OS.WM_SETFONT, hFont, 0);
setDropDownItems (true);
}
@@ -642,7 +642,7 @@ void layoutItems () {
TBBUTTONINFO info = new TBBUTTONINFO ();
info.cbSize = TBBUTTONINFO.sizeof;
info.dwMask = OS.TBIF_SIZE;
- int size = OS.SendMessage (handle, OS.TB_GETBUTTONSIZE, 0, 0);
+ int /*long*/ size = OS.SendMessage (handle, OS.TB_GETBUTTONSIZE, 0, 0);
info.cx = (short) OS.LOWORD (size);
int index = 0;
while (index < items.length) {
@@ -651,7 +651,7 @@ void layoutItems () {
index++;
}
if (index < items.length) {
- int padding = OS.SendMessage (handle, OS.TB_GETPADDING, 0, 0);
+ int /*long*/ padding = OS.SendMessage (handle, OS.TB_GETPADDING, 0, 0);
info.cx += OS.LOWORD (padding) * 2;
}
for (int i=0; i<items.length; i++) {
@@ -674,7 +674,7 @@ boolean mnemonicHit (char ch) {
return false;
}
if ((style & SWT.FLAT) != 0 && !setTabGroupFocus ()) return false;
- int index = OS.SendMessage (handle, OS.TB_COMMANDTOINDEX, id [0], 0);
+ int index = (int)/*64*/OS.SendMessage (handle, OS.TB_COMMANDTOINDEX, id [0], 0);
if (index == -1) return false;
OS.SendMessage (handle, OS.TB_SETHOTITEM, index, 0);
items [id [0]].click (false);
@@ -693,7 +693,7 @@ boolean mnemonicMatch (char ch) {
* undocumented and unwanted. The fix is to ensure that the tool item
* contains a mnemonic when TB_MAPACCELERATOR returns true.
*/
- int index = OS.SendMessage (handle, OS.TB_COMMANDTOINDEX, id [0], 0);
+ int index = (int)/*64*/OS.SendMessage (handle, OS.TB_COMMANDTOINDEX, id [0], 0);
if (index == -1) return false;
return findMnemonic (items [id [0]].text) != '\0';
}
@@ -738,7 +738,7 @@ void removeControl (Control control) {
}
}
-void setBackgroundImage (int hBitmap) {
+void setBackgroundImage (int /*long*/ hBitmap) {
super.setBackgroundImage (hBitmap);
setBackgroundTransparent (hBitmap != 0);
}
@@ -842,7 +842,7 @@ void setDropDownItems (boolean set) {
void setDisabledImageList (ImageList imageList) {
if (disabledImageList == imageList) return;
- int hImageList = 0;
+ int /*long*/ hImageList = 0;
if ((disabledImageList = imageList) != null) {
hImageList = disabledImageList.getHandle ();
}
@@ -878,7 +878,7 @@ public void setFont (Font font) {
void setHotImageList (ImageList imageList) {
if (hotImageList == imageList) return;
- int hImageList = 0;
+ int /*long*/ hImageList = 0;
if ((hotImageList = imageList) != null) {
hImageList = hotImageList.getHandle ();
}
@@ -889,7 +889,7 @@ void setHotImageList (ImageList imageList) {
void setImageList (ImageList imageList) {
if (this.imageList == imageList) return;
- int hImageList = 0;
+ int /*long*/ hImageList = 0;
if ((this.imageList = imageList) != null) {
hImageList = imageList.getHandle ();
}
@@ -972,8 +972,8 @@ String toolTipText (NMTTDISPINFO hdr) {
* provide the string, causing no tool tip to be displayed.
*/
if (!hasCursor ()) return ""; //$NON-NLS-1$
- int index = hdr.idFrom;
- int hwndToolTip = OS.SendMessage (handle, OS.TB_GETTOOLTIPS, 0, 0);
+ int index = (int)/*64*/hdr.idFrom;
+ int /*long*/ hwndToolTip = OS.SendMessage (handle, OS.TB_GETTOOLTIPS, 0, 0);
if (hwndToolTip == hdr.hwndFrom) {
if (toolTipText != null) return ""; //$NON-NLS-1$
if (0 <= index && index < items.length) {
@@ -1013,11 +1013,11 @@ TCHAR windowClass () {
return ToolBarClass;
}
-int windowProc () {
+int /*long*/ windowProc () {
return ToolBarProc;
}
-LRESULT WM_CAPTURECHANGED (int wParam, int lParam) {
+LRESULT WM_CAPTURECHANGED (int /*long*/ wParam, int /*long*/ lParam) {
LRESULT result = super.WM_CAPTURECHANGED (wParam, lParam);
if (result != null) return result;
/*
@@ -1028,7 +1028,7 @@ LRESULT WM_CAPTURECHANGED (int wParam, int lParam) {
for (int i=0; i<items.length; i++) {
ToolItem item = items [i];
if (item != null) {
- int fsState = OS.SendMessage (handle, OS.TB_GETSTATE, item.id, 0);
+ int fsState = (int)/*64*/OS.SendMessage (handle, OS.TB_GETSTATE, item.id, 0);
if ((fsState & OS.TBSTATE_PRESSED) != 0) {
fsState &= ~OS.TBSTATE_PRESSED;
OS.SendMessage (handle, OS.TB_SETSTATE, item.id, fsState);
@@ -1038,15 +1038,15 @@ LRESULT WM_CAPTURECHANGED (int wParam, int lParam) {
return result;
}
-LRESULT WM_CHAR (int wParam, int lParam) {
+LRESULT WM_CHAR (int /*long*/ wParam, int /*long*/ lParam) {
LRESULT result = super.WM_CHAR (wParam, lParam);
if (result != null) return result;
- switch (wParam) {
+ switch ((int)/*64*/wParam) {
case ' ':
- int index = OS.SendMessage (handle, OS.TB_GETHOTITEM, 0, 0);
+ int index = (int)/*64*/OS.SendMessage (handle, OS.TB_GETHOTITEM, 0, 0);
if (index != -1) {
TBBUTTON lpButton = new TBBUTTON ();
- int code = OS.SendMessage (handle, OS.TB_GETBUTTON, index, lpButton);
+ int /*long*/ code = OS.SendMessage (handle, OS.TB_GETBUTTON, index, lpButton);
if (code != 0) {
items [lpButton.idCommand].click (false);
return LRESULT.ZERO;
@@ -1056,7 +1056,7 @@ LRESULT WM_CHAR (int wParam, int lParam) {
return result;
}
-LRESULT WM_COMMAND (int wParam, int lParam) {
+LRESULT WM_COMMAND (int /*long*/ wParam, int /*long*/ lParam) {
/*
* Feature in Windows. When the toolbar window
* proc processes WM_COMMAND, it forwards this
@@ -1080,7 +1080,7 @@ LRESULT WM_COMMAND (int wParam, int lParam) {
return LRESULT.ZERO;
}
-LRESULT WM_ERASEBKGND (int wParam, int lParam) {
+LRESULT WM_ERASEBKGND (int /*long*/ wParam, int /*long*/ lParam) {
LRESULT result = super.WM_ERASEBKGND (wParam, lParam);
/*
* Bug in Windows. For some reason, NM_CUSTOMDRAW with
@@ -1097,7 +1097,7 @@ LRESULT WM_ERASEBKGND (int wParam, int lParam) {
return result;
}
-LRESULT WM_GETDLGCODE (int wParam, int lParam) {
+LRESULT WM_GETDLGCODE (int /*long*/ wParam, int /*long*/ lParam) {
LRESULT result = super.WM_GETDLGCODE (wParam, lParam);
/*
* Return DLGC_BUTTON so that mnemonics will be
@@ -1108,10 +1108,10 @@ LRESULT WM_GETDLGCODE (int wParam, int lParam) {
return new LRESULT (OS.DLGC_BUTTON);
}
-LRESULT WM_KEYDOWN (int wParam, int lParam) {
+LRESULT WM_KEYDOWN (int /*long*/ wParam, int /*long*/ lParam) {
LRESULT result = super.WM_KEYDOWN (wParam, lParam);
if (result != null) return result;
- switch (wParam) {
+ switch ((int)/*64*/wParam) {
case OS.VK_SPACE:
/*
* Ensure that the window proc does not process VK_SPACE
@@ -1123,25 +1123,25 @@ LRESULT WM_KEYDOWN (int wParam, int lParam) {
return result;
}
-LRESULT WM_KILLFOCUS (int wParam, int lParam) {
- int index = OS.SendMessage (handle, OS.TB_GETHOTITEM, 0, 0);
+LRESULT WM_KILLFOCUS (int /*long*/ wParam, int /*long*/ lParam) {
+ int index = (int)/*64*/OS.SendMessage (handle, OS.TB_GETHOTITEM, 0, 0);
TBBUTTON lpButton = new TBBUTTON ();
- int code = OS.SendMessage (handle, OS.TB_GETBUTTON, index, lpButton);
+ int /*long*/ 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 wParam, int lParam) {
+LRESULT WM_LBUTTONDOWN (int /*long*/ wParam, int /*long*/ lParam) {
if (ignoreMouse) return null;
return super.WM_LBUTTONDOWN (wParam, lParam);
}
-LRESULT WM_LBUTTONUP (int wParam, int lParam) {
+LRESULT WM_LBUTTONUP (int /*long*/ wParam, int /*long*/ lParam) {
if (ignoreMouse) return null;
return super.WM_LBUTTONUP (wParam, lParam);
}
-LRESULT WM_MOUSELEAVE (int wParam, int lParam) {
+LRESULT WM_MOUSELEAVE (int /*long*/ wParam, int /*long*/ lParam) {
LRESULT result = super.WM_MOUSELEAVE (wParam, lParam);
if (result != null) return result;
/*
@@ -1158,7 +1158,7 @@ LRESULT WM_MOUSELEAVE (int wParam, int lParam) {
if (OS.COMCTL32_MAJOR >= 6) {
TOOLINFO lpti = new TOOLINFO ();
lpti.cbSize = TOOLINFO.sizeof;
- int hwndToolTip = OS.SendMessage (handle, OS.TB_GETTOOLTIPS, 0, 0);
+ int /*long*/ 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);
@@ -1169,7 +1169,7 @@ LRESULT WM_MOUSELEAVE (int wParam, int lParam) {
return result;
}
-LRESULT WM_NOTIFY (int wParam, int lParam) {
+LRESULT WM_NOTIFY (int /*long*/ wParam, int /*long*/ lParam) {
/*
* Feature in Windows. When the toolbar window
* proc processes WM_NOTIFY, it forwards this
@@ -1193,18 +1193,18 @@ LRESULT WM_NOTIFY (int wParam, int lParam) {
return LRESULT.ZERO;
}
-LRESULT WM_SETFOCUS (int wParam, int lParam) {
+LRESULT WM_SETFOCUS (int /*long*/ wParam, int /*long*/ lParam) {
LRESULT result = super.WM_SETFOCUS (wParam, lParam);
if (lastFocusId != -1 && handle == OS.GetFocus ()) {
- int index = OS.SendMessage (handle, OS.TB_COMMANDTOINDEX, lastFocusId, 0);
+ int index = (int)/*64*/OS.SendMessage (handle, OS.TB_COMMANDTOINDEX, lastFocusId, 0);
OS.SendMessage (handle, OS.TB_SETHOTITEM, index, 0);
}
return result;
}
-LRESULT WM_SIZE (int wParam, int lParam) {
+LRESULT WM_SIZE (int /*long*/ wParam, int /*long*/ lParam) {
if (ignoreResize) {
- int code = callWindowProc (handle, OS.WM_SIZE, wParam, lParam);
+ int /*long*/ code = callWindowProc (handle, OS.WM_SIZE, wParam, lParam);
if (code == 0) return LRESULT.ZERO;
return new LRESULT (code);
}
@@ -1225,14 +1225,14 @@ LRESULT WM_SIZE (int wParam, int lParam) {
OS.GetWindowRect (handle, windowRect);
int index = 0, border = getBorderWidth () * 2;
RECT rect = new RECT ();
- int count = OS.SendMessage (handle, OS.TB_BUTTONCOUNT, 0, 0);
+ int count = (int)/*64*/OS.SendMessage (handle, OS.TB_BUTTONCOUNT, 0, 0);
while (index < count) {
OS.SendMessage (handle, OS.TB_GETITEMRECT, index, rect);
OS.MapWindowPoints (handle, 0, rect, 2);
if (rect.right > windowRect.right - border * 2) break;
index++;
}
- int bits = OS.SendMessage (handle, OS.TB_GETEXTENDEDSTYLE, 0, 0);
+ int bits = (int)/*64*/OS.SendMessage (handle, OS.TB_GETEXTENDEDSTYLE, 0, 0);
if (index == count) {
bits |= OS.TBSTYLE_EX_HIDECLIPPEDBUTTONS;
} else {
@@ -1244,7 +1244,7 @@ LRESULT WM_SIZE (int wParam, int lParam) {
return result;
}
-LRESULT WM_WINDOWPOSCHANGING (int wParam, int lParam) {
+LRESULT WM_WINDOWPOSCHANGING (int /*long*/ wParam, int /*long*/ lParam) {
LRESULT result = super.WM_WINDOWPOSCHANGING (wParam, lParam);
if (result != null) return result;
if (ignoreResize) return result;
@@ -1286,13 +1286,13 @@ LRESULT WM_WINDOWPOSCHANGING (int wParam, int lParam) {
return result;
}
-LRESULT wmCommandChild (int wParam, int lParam) {
+LRESULT wmCommandChild (int /*long*/ wParam, int /*long*/ lParam) {
ToolItem child = items [OS.LOWORD (wParam)];
if (child == null) return null;
return child.wmCommandChild (wParam, lParam);
}
-LRESULT wmNotifyChild (NMHDR hdr, int wParam, int lParam) {
+LRESULT wmNotifyChild (NMHDR hdr, int /*long*/ wParam, int /*long*/ lParam) {
switch (hdr.code) {
case OS.TBN_DROPDOWN:
NMTOOLBAR lpnmtb = new NMTOOLBAR ();
@@ -1301,7 +1301,7 @@ LRESULT wmNotifyChild (NMHDR hdr, int wParam, int lParam) {
if (child != null) {
Event event = new Event ();
event.detail = SWT.ARROW;
- int index = OS.SendMessage (handle, OS.TB_COMMANDTOINDEX, lpnmtb.iItem, 0);
+ int index = (int)/*64*/OS.SendMessage (handle, OS.TB_COMMANDTOINDEX, lpnmtb.iItem, 0);
RECT rect = new RECT ();
OS.SendMessage (handle, OS.TB_GETITEMRECT, index, rect);
event.x = rect.left;
@@ -1349,7 +1349,7 @@ LRESULT wmNotifyChild (NMHDR hdr, int wParam, int lParam) {
case OS.HICF_ARROWKEYS:
RECT client = new RECT ();
OS.GetClientRect (handle, client);
- int index = OS.SendMessage (handle, OS.TB_COMMANDTOINDEX, lpnmhi.idNew, 0);
+ int index = (int)/*64*/OS.SendMessage (handle, OS.TB_COMMANDTOINDEX, lpnmhi.idNew, 0);
RECT rect = new RECT ();
OS.SendMessage (handle, OS.TB_GETITEMRECT, index, rect);
if (rect.right > client.right || rect.bottom > client.bottom) {
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 f80579d9c3..7276b32709 100755
--- 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
@@ -165,12 +165,12 @@ protected void checkSubclass () {
}
void click (boolean dropDown) {
- int hwnd = parent.handle;
+ int /*long*/ hwnd = parent.handle;
if (OS.GetKeyState (OS.VK_LBUTTON) < 0) return;
- int index = OS.SendMessage (hwnd, OS.TB_COMMANDTOINDEX, id, 0);
+ int index = (int)/*64*/OS.SendMessage (hwnd, OS.TB_COMMANDTOINDEX, id, 0);
RECT rect = new RECT ();
OS.SendMessage (hwnd, OS.TB_GETITEMRECT, index, rect);
- int hotIndex = OS.SendMessage (hwnd, OS.TB_GETHOTITEM, 0, 0);
+ int hotIndex = (int)/*64*/OS.SendMessage (hwnd, OS.TB_GETHOTITEM, 0, 0);
/*
* In order to emulate all the processing that
@@ -180,7 +180,7 @@ void click (boolean dropDown) {
* properly.
*/
int y = rect.top + (rect.bottom - rect.top) / 2;
- int lParam = OS.MAKELPARAM (dropDown ? rect.right - 1 : rect.left, y);
+ int /*long*/ 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);
@@ -209,8 +209,8 @@ void destroyWidget () {
*/
public Rectangle getBounds () {
checkWidget();
- int hwnd = parent.handle;
- int index = OS.SendMessage (hwnd, OS.TB_COMMANDTOINDEX, id, 0);
+ int /*long*/ 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);
int width = rect.right - rect.left;
@@ -273,8 +273,8 @@ public boolean getEnabled () {
if ((style & SWT.SEPARATOR) != 0) {
return (state & DISABLED) == 0;
}
- int hwnd = parent.handle;
- int fsState = OS.SendMessage (hwnd, OS.TB_GETSTATE, id, 0);
+ int /*long*/ hwnd = parent.handle;
+ int /*long*/ fsState = OS.SendMessage (hwnd, OS.TB_GETSTATE, id, 0);
return (fsState & OS.TBSTATE_ENABLED) != 0;
}
@@ -332,8 +332,8 @@ public ToolBar getParent () {
public boolean getSelection () {
checkWidget();
if ((style & (SWT.CHECK | SWT.RADIO)) == 0) return false;
- int hwnd = parent.handle;
- int fsState = OS.SendMessage (hwnd, OS.TB_GETSTATE, id, 0);
+ int /*long*/ hwnd = parent.handle;
+ int /*long*/ fsState = OS.SendMessage (hwnd, OS.TB_GETSTATE, id, 0);
return (fsState & OS.TBSTATE_CHECKED) != 0;
}
@@ -364,8 +364,8 @@ public String getToolTipText () {
*/
public int getWidth () {
checkWidget();
- int hwnd = parent.handle;
- int index = OS.SendMessage (hwnd, OS.TB_COMMANDTOINDEX, id, 0);
+ int /*long*/ 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);
return rect.right - rect.left;
@@ -411,7 +411,7 @@ void releaseImages () {
TBBUTTONINFO info = new TBBUTTONINFO ();
info.cbSize = TBBUTTONINFO.sizeof;
info.dwMask = OS.TBIF_IMAGE | OS.TBIF_STYLE;
- int hwnd = parent.handle;
+ int /*long*/ hwnd = parent.handle;
OS.SendMessage (hwnd, OS.TB_GETBUTTONINFO, id, info);
/*
* Feature in Windows. For some reason, a tool item that has
@@ -527,7 +527,7 @@ public void setControl (Control control) {
*/
if ((parent.style & (SWT.WRAP | SWT.VERTICAL)) != 0) {
boolean changed = false;
- int hwnd = parent.handle;
+ int /*long*/ hwnd = parent.handle;
TBBUTTONINFO info = new TBBUTTONINFO ();
info.cbSize = TBBUTTONINFO.sizeof;
info.dwMask = OS.TBIF_STYLE | OS.TBIF_STATE;
@@ -590,8 +590,8 @@ public void setControl (Control control) {
*/
public void setEnabled (boolean enabled) {
checkWidget();
- int hwnd = parent.handle;
- int fsState = OS.SendMessage (hwnd, OS.TB_GETSTATE, id, 0);
+ int /*long*/ 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
* state of a tool item, the item redraws even when the state
@@ -697,8 +697,8 @@ boolean setRadioSelection (boolean value) {
public void setSelection (boolean selected) {
checkWidget();
if ((style & (SWT.CHECK | SWT.RADIO)) == 0) return;
- int hwnd = parent.handle;
- int fsState = OS.SendMessage (hwnd, OS.TB_GETSTATE, id, 0);
+ int /*long*/ 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
* state of a tool item, the item redraws even when the state
@@ -761,12 +761,12 @@ public void setText (String string) {
if ((style & SWT.SEPARATOR) != 0) return;
if (string.equals (text)) return;
super.setText (string);
- int hwnd = parent.handle;
+ int /*long*/ 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 hHeap = OS.GetProcessHeap (), pszText = 0;
+ int /*long*/ hHeap = OS.GetProcessHeap (), pszText = 0;
if (string.length () != 0) {
info.fsStyle |= OS.BTNS_SHOWTEXT;
TCHAR buffer = new TCHAR (parent.getCodePage (), string, true);
@@ -787,7 +787,7 @@ public void setText (String string) {
* the tool bar to redraw and layout.
*/
parent.setDropDownItems (false);
- int hFont = OS.SendMessage (hwnd, OS.WM_GETFONT, 0, 0);
+ int /*long*/ hFont = OS.SendMessage (hwnd, OS.WM_GETFONT, 0, 0);
OS.SendMessage (hwnd, OS.WM_SETFONT, hFont, 0);
parent.setDropDownItems (true);
parent.layoutItems ();
@@ -823,7 +823,7 @@ public void setWidth (int width) {
checkWidget();
if ((style & SWT.SEPARATOR) == 0) return;
if (width < 0) return;
- int hwnd = parent.handle;
+ int /*long*/ hwnd = parent.handle;
TBBUTTONINFO info = new TBBUTTONINFO ();
info.cbSize = TBBUTTONINFO.sizeof;
info.dwMask = OS.TBIF_SIZE;
@@ -834,7 +834,7 @@ public void setWidth (int width) {
void updateImages (boolean enabled) {
if ((style & SWT.SEPARATOR) != 0) return;
- int hwnd = parent.handle;
+ int /*long*/ hwnd = parent.handle;
TBBUTTONINFO info = new TBBUTTONINFO ();
info.cbSize = TBBUTTONINFO.sizeof;
info.dwMask = OS.TBIF_IMAGE;
@@ -943,7 +943,7 @@ int widgetStyle () {
return OS.BTNS_BUTTON;
}
-LRESULT wmCommandChild (int wParam, int lParam) {
+LRESULT wmCommandChild (int /*long*/ wParam, int /*long*/ 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 fc1f0db49b..7551cba125 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
@@ -210,7 +210,7 @@ public boolean getVisible () {
checkWidget();
if (OS.IsWinCE) return false;
if (item != null) return visible;
- int hwndToolTip = hwndToolTip ();
+ int /*long*/ hwndToolTip = hwndToolTip ();
if (OS.SendMessage (hwndToolTip, OS.TTM_GETCURRENTTOOL, 0, 0) != 0) {
TOOLINFO lpti = new TOOLINFO ();
lpti.cbSize = TOOLINFO.sizeof;
@@ -221,7 +221,7 @@ public boolean getVisible () {
return false;
}
-int hwndToolTip () {
+int /*long*/ hwndToolTip () {
return (style & SWT.BALLOON) != 0 ? parent.balloonTipHandle () : parent.toolTipHandle ();
}
@@ -256,7 +256,7 @@ void releaseWidget () {
super.releaseWidget ();
if (item == null) {
if (autoHide) {
- int hwndToolTip = hwndToolTip ();
+ int /*long*/ hwndToolTip = hwndToolTip ();
if (OS.SendMessage (hwndToolTip, OS.TTM_GETCURRENTTOOL, 0, 0) != 0) {
TOOLINFO lpti = new TOOLINFO ();
lpti.cbSize = TOOLINFO.sizeof;
@@ -438,12 +438,12 @@ public void setVisible (boolean visible) {
if (OS.IsWinCE) return;
if (visible == getVisible ()) return;
if (item == null) {
- int hwnd = parent.handle;
+ int /*long*/ hwnd = parent.handle;
TOOLINFO lpti = new TOOLINFO ();
lpti.cbSize = TOOLINFO.sizeof;
lpti.uId = id;
lpti.hwnd = hwnd;
- int hwndToolTip = hwndToolTip ();
+ int /*long*/ hwndToolTip = hwndToolTip ();
Shell shell = parent.getShell ();
if (text.length () != 0) {
int icon = OS.TTI_NONE;
@@ -460,7 +460,7 @@ public void setVisible (boolean visible) {
OS.SystemParametersInfo (OS.SPI_GETWORKAREA, 0, rect, 0);
maxWidth = (rect.right - rect.left) / 4;
} else {
- int hmonitor = OS.MonitorFromWindow (hwnd, OS.MONITOR_DEFAULTTONEAREST);
+ int /*long*/ hmonitor = OS.MonitorFromWindow (hwnd, OS.MONITOR_DEFAULTTONEAREST);
MONITORINFO lpmi = new MONITORINFO ();
lpmi.cbSize = MONITORINFO.sizeof;
OS.GetMonitorInfo (hmonitor, lpmi);
@@ -476,7 +476,7 @@ public void setVisible (boolean visible) {
nY = pt.y;
}
}
- int lParam = OS.MAKELPARAM (nX, nY);
+ int /*long*/ lParam = OS.MAKELPARAM (nX, nY);
OS.SendMessage (hwndToolTip, OS.TTM_TRACKPOSITION, 0, lParam);
/*
@@ -492,7 +492,7 @@ public void setVisible (boolean visible) {
OS.GetClientRect (hwnd, rect);
OS.MapWindowPoints (hwnd, 0, rect, 2);
if (!OS.PtInRect (rect, pt)) {
- int hCursor = OS.GetCursor ();
+ int /*long*/ hCursor = OS.GetCursor ();
OS.SetCursor (0);
OS.SetCursorPos (rect.left, rect.top);
OS.SendMessage (hwndToolTip, OS.TTM_TRACKACTIVATE, 1, lpti);
@@ -502,7 +502,7 @@ public void setVisible (boolean visible) {
OS.SendMessage (hwndToolTip, OS.TTM_TRACKACTIVATE, 1, lpti);
}
- int time = OS.SendMessage (hwndToolTip, OS.TTM_GETDELAYTIME, OS.TTDT_AUTOPOP, 0);
+ int time = (int)/*64*/OS.SendMessage (hwndToolTip, OS.TTM_GETDELAYTIME, OS.TTDT_AUTOPOP, 0);
OS.SetTimer (hwndToolTip, TIMER_ID, time, 0);
} else {
OS.SendMessage (hwndToolTip, OS.TTM_TRACKACTIVATE, 0, 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 ae4709daad..1b4da1e80c 100755
--- 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
@@ -41,9 +41,11 @@ public class Tracker extends Widget {
boolean tracking, cancelled, stippled;
Rectangle [] rectangles = new Rectangle [0], proportions = rectangles;
Rectangle bounds;
- int resizeCursor, clientCursor, cursorOrientation = SWT.NONE;
+ int /*long*/ resizeCursor, clientCursor;
+ int cursorOrientation = SWT.NONE;
boolean inEvent = false;
- int hwndTransparent, oldProc, oldX, oldY;
+ int /*long*/ hwndTransparent, oldProc;
+ int oldX, oldY;
/*
* The following values mirror step sizes on Windows
@@ -237,7 +239,7 @@ Point adjustResizeCursor () {
* the appropriate resize cursor.
*/
if (clientCursor == 0) {
- int newCursor = 0;
+ int /*long*/ newCursor = 0;
switch (cursorOrientation) {
case SWT.UP:
newCursor = OS.LoadCursor (0, OS.IDC_SIZENS);
@@ -359,10 +361,10 @@ void drawRectangles (Rectangle [] rects, boolean stippled) {
return;
}
int bandWidth = 1;
- int hwndTrack = OS.GetDesktopWindow ();
+ int /*long*/ hwndTrack = OS.GetDesktopWindow ();
if (parent != null) hwndTrack = parent.handle;
- int hDC = OS.GetDCEx (hwndTrack, 0, OS.DCX_CACHE);
- int hBitmap = 0, hBrush = 0, oldBrush = 0;
+ int /*long*/ hDC = OS.GetDCEx (hwndTrack, 0, OS.DCX_CACHE);
+ int /*long*/ 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};
@@ -489,11 +491,11 @@ public boolean open () {
0,
OS.GetModuleHandle (null),
null);
- oldProc = OS.GetWindowLong (hwndTransparent, OS.GWL_WNDPROC);
+ oldProc = OS.GetWindowLongPtr (hwndTransparent, OS.GWLP_WNDPROC);
newProc = new Callback (this, "transparentProc", 4); //$NON-NLS-1$
- int newProcAddress = newProc.getAddress ();
+ int /*long*/ newProcAddress = newProc.getAddress ();
if (newProcAddress == 0) SWT.error (SWT.ERROR_NO_MORE_CALLBACKS);
- OS.SetWindowLong (hwndTransparent, OS.GWL_WNDPROC, newProcAddress);
+ OS.SetWindowLongPtr (hwndTransparent, OS.GWLP_WNDPROC, newProcAddress);
if (isVista) {
OS.SetLayeredWindowAttributes (hwndTransparent, 0xFFFFFF, (byte)0xFF, OS.LWA_COLORKEY | OS.LWA_ALPHA);
}
@@ -815,8 +817,8 @@ public void setStippled (boolean stippled) {
this.stippled = stippled;
}
-int transparentProc (int hwnd, int msg, int wParam, int lParam) {
- switch (msg) {
+int /*long*/ transparentProc (int /*long*/ hwnd, int /*long*/ msg, int /*long*/ wParam, int /*long*/ lParam) {
+ switch ((int)/*64*/msg) {
/*
* We typically do not want to answer that the transparent window is
* transparent to hits since doing so negates the effect of having it
@@ -842,9 +844,9 @@ int transparentProc (int hwnd, int msg, int wParam, int lParam) {
case OS.WM_PAINT:
if (parent == null && !OS.IsWinCE && OS.WIN32_VERSION >= OS.VERSION (6, 0)) {
PAINTSTRUCT ps = new PAINTSTRUCT();
- int hDC = OS.BeginPaint (hwnd, ps);
- int hBitmap = 0, hBrush = 0, oldBrush = 0;
- int transparentBrush = OS.CreateSolidBrush(0xFFFFFF);
+ int /*long*/ hDC = OS.BeginPaint (hwnd, ps);
+ int /*long*/ hBitmap = 0, hBrush = 0, oldBrush = 0;
+ int /*long*/ 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);
@@ -877,7 +879,7 @@ int transparentProc (int hwnd, int msg, int wParam, int lParam) {
return 0;
}
}
- return OS.CallWindowProc (oldProc, hwnd, msg, wParam, lParam);
+ return OS.CallWindowProc (oldProc, hwnd, (int)/*64*/msg, wParam, lParam);
}
void update () {
@@ -891,13 +893,13 @@ void update () {
}
}
-LRESULT wmKeyDown (int hwnd, int wParam, int lParam) {
+LRESULT wmKeyDown (int /*long*/ hwnd, int /*long*/ wParam, int /*long*/ lParam) {
LRESULT result = super.wmKeyDown (hwnd, wParam, lParam);
if (result != null) return result;
boolean isMirrored = parent != null && (parent.style & SWT.MIRRORED) != 0;
int stepSize = OS.GetKeyState (OS.VK_CONTROL) < 0 ? STEPSIZE_SMALL : STEPSIZE_LARGE;
int xChange = 0, yChange = 0;
- switch (wParam) {
+ switch ((int)/*64*/wParam) {
case OS.VK_ESCAPE:
cancelled = true;
tracking = false;
@@ -1025,7 +1027,7 @@ LRESULT wmKeyDown (int hwnd, int wParam, int lParam) {
return result;
}
-LRESULT wmSysKeyDown (int hwnd, int wParam, int lParam) {
+LRESULT wmSysKeyDown (int /*long*/ hwnd, int /*long*/ wParam, int /*long*/ lParam) {
LRESULT result = super.wmSysKeyDown (hwnd, wParam, lParam);
if (result != null) return result;
cancelled = true;
@@ -1033,7 +1035,7 @@ LRESULT wmSysKeyDown (int hwnd, int wParam, int lParam) {
return result;
}
-LRESULT wmMouse (int message, int wParam, int lParam) {
+LRESULT wmMouse (int message, int /*long*/ wParam, int /*long*/ 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 0dbd29e70a..4cdd400817 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
@@ -223,7 +223,7 @@ public boolean getVisible () {
return visible;
}
-int messageProc (int hwnd, int msg, int wParam, int lParam) {
+int /*long*/ messageProc (int /*long*/ hwnd, int msg, int /*long*/ wParam, int /*long*/ lParam) {
/*
* Feature in Windows. When the user clicks on the tray
* icon, another application may be the foreground window.
@@ -235,7 +235,7 @@ int messageProc (int hwnd, int msg, int wParam, int lParam) {
* menu is not hidden. The fix is to force the tray icon
* message window to the foreground when sending an event.
*/
- switch (lParam) {
+ switch ((int)/*64*/lParam) {
case OS.WM_LBUTTONDOWN:
if (hooks (SWT.Selection)) {
OS.SetForegroundWindow (hwnd);
@@ -395,7 +395,7 @@ public void setImage (Image image) {
super.setImage (image);
if (image2 != null) image2.dispose ();
image2 = null;
- int hIcon = 0;
+ int /*long*/ 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 fdf20ba6b4..54f005f489 100755
--- 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
@@ -75,15 +75,18 @@ public class Tree extends Composite {
ImageList imageList, headerImageList;
TreeItem currentItem;
TreeColumn sortColumn;
- int hwndParent, hwndHeader, hAnchor, hInsert, lastID, hSelect;
- int hFirstIndexOf, hLastIndexOf, lastIndexOf, itemCount, sortDirection;
+ int /*long*/ hwndParent, hwndHeader, hAnchor, hInsert, hSelect;
+ int lastID;
+ int /*long*/ hFirstIndexOf, hLastIndexOf;
+ int lastIndexOf, itemCount, sortDirection;
boolean dragStarted, gestureCompleted, insertAfter, shrink, ignoreShrink;
boolean ignoreSelect, ignoreExpand, ignoreDeselect, ignoreResize;
boolean lockSelection, oldSelected, newSelected, ignoreColumnMove;
boolean linesVisible, customDraw, printClient, painted, ignoreItemHeight;
boolean ignoreCustomDraw, ignoreDrawForeground, ignoreDrawBackground, ignoreDrawFocus;
boolean ignoreDrawSelection, ignoreDrawHot, ignoreFullSelection, explorerTheme;
- int scrollWidth, itemToolTipHandle, headerToolTipHandle, selectionForeground;
+ int scrollWidth, selectionForeground;
+ int /*long*/ headerToolTipHandle, itemToolTipHandle;
static final int INSET = 3;
static final int GRID_WIDTH = 1;
static final int SORT_WIDTH = 10;
@@ -92,9 +95,9 @@ public class Tree extends Composite {
static final int INCREMENT = 5;
static final int EXPLORER_EXTRA = 2;
static final boolean EXPLORER_THEME = true;
- static final int TreeProc;
+ static final int /*long*/ TreeProc;
static final TCHAR TreeClass = new TCHAR (0, OS.WC_TREEVIEW, true);
- static final int HeaderProc;
+ static final int /*long*/ HeaderProc;
static final TCHAR HeaderClass = new TCHAR (0, OS.WC_HEADER, true);
static {
WNDCLASS lpWndClass = new WNDCLASS ();
@@ -193,7 +196,7 @@ void _addListener (int eventType, Listener listener) {
* scroll bar. The fix is to check for this case and
* explicitly hide the scroll bar.
*/
- int count = OS.SendMessage (handle, OS.TVM_GETCOUNT, 0, 0);
+ int count = (int)/*64*/OS.SendMessage (handle, OS.TVM_GETCOUNT, 0, 0);
if (count != 0 && (bits & OS.TVS_NOHSCROLL) != 0) {
if (!OS.IsWinCE) OS.ShowScrollBar (handle, OS.SB_HORZ, false);
}
@@ -203,7 +206,7 @@ void _addListener (int eventType, Listener listener) {
}
}
-TreeItem _getItem (int hItem) {
+TreeItem _getItem (int /*long*/ hItem) {
TVITEM tvItem = new TVITEM ();
tvItem.mask = OS.TVIF_HANDLE | OS.TVIF_PARAM;
tvItem.hItem = hItem;
@@ -213,13 +216,15 @@ TreeItem _getItem (int hItem) {
return null;
}
-TreeItem _getItem (int hItem, int id) {
+//TODO - should ids be long
+TreeItem _getItem (int /*long*/ hItem, int /*long*/ _id) {
+ int id = (int)/*64*/_id;
if ((style & SWT.VIRTUAL) == 0) return items [id];
return id != -1 ? items [id] : new TreeItem (this, SWT.NONE, -1, -1, hItem);
}
void _setBackgroundPixel (int newPixel) {
- int oldPixel = OS.SendMessage (handle, OS.TVM_GETBKCOLOR, 0, 0);
+ int oldPixel = (int)/*64*/OS.SendMessage (handle, OS.TVM_GETBKCOLOR, 0, 0);
if (oldPixel != newPixel) {
/*
* Bug in Windows. When TVM_SETBKCOLOR is used more
@@ -242,7 +247,7 @@ void _setBackgroundPixel (int newPixel) {
* animation draws badly. The fix is to clear the effect.
*/
if (explorerTheme) {
- int bits2 = OS.SendMessage (handle, OS.TVM_GETEXTENDEDSTYLE, 0, 0);
+ int bits2 = (int)/*64*/OS.SendMessage (handle, OS.TVM_GETEXTENDEDSTYLE, 0, 0);
if (newPixel == -1 && findImageControl () == null) {
bits2 |= OS.TVS_EX_FADEINOUTEXPANDOS;
} else {
@@ -318,14 +323,14 @@ public void addTreeListener(TreeListener listener) {
addListener (SWT.Collapse, typedListener);
}
-int borderHandle () {
+int /*long*/ borderHandle () {
return hwndParent != 0 ? hwndParent : handle;
}
-LRESULT CDDS_ITEMPOSTPAINT (NMTVCUSTOMDRAW nmcd, int wParam, int lParam) {
+LRESULT CDDS_ITEMPOSTPAINT (NMTVCUSTOMDRAW nmcd, int /*long*/ wParam, int /*long*/ lParam) {
if (ignoreCustomDraw) return null;
if (nmcd.left == nmcd.right) return new LRESULT (OS.CDRF_DODEFAULT);
- int hDC = nmcd.hdc;
+ int /*long*/ hDC = nmcd.hdc;
OS.RestoreDC (hDC, -1);
TreeItem item = getItem (nmcd);
@@ -377,7 +382,7 @@ LRESULT CDDS_ITEMPOSTPAINT (NMTVCUSTOMDRAW nmcd, int wParam, int lParam) {
OS.GetClientRect (scrolledHandle (), clientRect);
if (hwndHeader != 0) {
OS.MapWindowPoints (hwndParent, handle, clientRect, 2);
- count = OS.SendMessage (hwndHeader, OS.HDM_GETITEMCOUNT, 0, 0);
+ count = (int)/*64*/OS.SendMessage (hwndHeader, OS.HDM_GETITEMCOUNT, 0, 0);
if (count != 0) {
order = new int [count];
OS.SendMessage (hwndHeader, OS.HDM_GETORDERARRAY, count, order);
@@ -442,7 +447,7 @@ LRESULT CDDS_ITEMPOSTPAINT (NMTVCUSTOMDRAW nmcd, int wParam, int lParam) {
}
}
draw = false;
- int hTheme = OS.OpenThemeData (handle, Display.TREEVIEW);
+ int /*long*/ 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);
@@ -459,7 +464,7 @@ LRESULT CDDS_ITEMPOSTPAINT (NMTVCUSTOMDRAW nmcd, int wParam, int lParam) {
pRect.right += EXPLORER_EXTRA;
pClipRect.left -= EXPLORER_EXTRA;
pClipRect.right += EXPLORER_EXTRA;
- int hTheme = OS.OpenThemeData (handle, Display.TREEVIEW);
+ int /*long*/ 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);
@@ -528,7 +533,7 @@ LRESULT CDDS_ITEMPOSTPAINT (NMTVCUSTOMDRAW nmcd, int wParam, int lParam) {
backgroundRect = rect;
}
int clrText = -1, clrTextBk = -1;
- int hFont = item.cellFont != null ? item.cellFont [index] : -1;
+ int /*long*/ hFont = item.cellFont != null ? item.cellFont [index] : -1;
if (hFont == -1) hFont = item.font;
if (selectionForeground != -1) clrText = selectionForeground;
if (OS.IsWindowEnabled (handle)) {
@@ -605,7 +610,7 @@ LRESULT CDDS_ITEMPOSTPAINT (NMTVCUSTOMDRAW nmcd, int wParam, int lParam) {
if (clrTextBk != -1) data.background = clrTextBk;
}
data.hFont = hFont;
- data.uiState = OS.SendMessage (handle, OS.WM_QUERYUISTATE, 0, 0);
+ data.uiState = (int)/*64*/OS.SendMessage (handle, OS.WM_QUERYUISTATE, 0, 0);
GC gc = GC.win32_new (hDC, data);
Event event = new Event ();
event.item = item;
@@ -620,7 +625,7 @@ LRESULT CDDS_ITEMPOSTPAINT (NMTVCUSTOMDRAW nmcd, int wParam, int lParam) {
//if ((nmcd.uItemState & OS.CDIS_FOCUS) != 0) {
if (OS.SendMessage (handle, OS.TVM_GETNEXTITEM, OS.TVGN_CARET, 0) == nmcd.dwItemSpec) {
if (handle == OS.GetFocus ()) {
- int uiState = OS.SendMessage (handle, OS.WM_QUERYUISTATE, 0, 0);
+ int uiState = (int)/*64*/OS.SendMessage (handle, OS.WM_QUERYUISTATE, 0, 0);
if ((uiState & OS.UISF_HIDEFOCUS) == 0) event.detail |= SWT.FOCUSED;
}
}
@@ -692,7 +697,7 @@ LRESULT CDDS_ITEMPOSTPAINT (NMTVCUSTOMDRAW nmcd, int wParam, int lParam) {
backgroundRect = selectionRect;
}
}
- int hTheme = OS.OpenThemeData (handle, Display.TREEVIEW);
+ int /*long*/ 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);
@@ -821,7 +826,7 @@ LRESULT CDDS_ITEMPOSTPAINT (NMTVCUSTOMDRAW nmcd, int wParam, int lParam) {
if (clrText != -1) data.foreground = clrText;
if (clrTextBk != -1) data.background = clrTextBk;
}
- data.uiState = OS.SendMessage (handle, OS.WM_QUERYUISTATE, 0, 0);
+ data.uiState = (int)/*64*/OS.SendMessage (handle, OS.WM_QUERYUISTATE, 0, 0);
GC gc = GC.win32_new (hDC, data);
Event event = new Event ();
event.item = item;
@@ -838,7 +843,7 @@ LRESULT CDDS_ITEMPOSTPAINT (NMTVCUSTOMDRAW nmcd, int wParam, int lParam) {
if (OS.SendMessage (handle, OS.TVM_GETNEXTITEM, OS.TVGN_CARET, 0) == nmcd.dwItemSpec) {
if (i == 0 /*nmcd.iSubItem == 0*/ || (style & SWT.FULL_SELECTION) != 0) {
if (handle == OS.GetFocus ()) {
- int uiState = OS.SendMessage (handle, OS.WM_QUERYUISTATE, 0, 0);
+ int uiState = (int)/*64*/OS.SendMessage (handle, OS.WM_QUERYUISTATE, 0, 0);
if ((uiState & OS.UISF_HIDEFOCUS) == 0) event.detail |= SWT.FOCUSED;
}
}
@@ -881,9 +886,9 @@ LRESULT CDDS_ITEMPOSTPAINT (NMTVCUSTOMDRAW nmcd, int wParam, int lParam) {
}
if (!explorerTheme) {
if (handle == OS.GetFocus ()) {
- int uiState = OS.SendMessage (handle, OS.WM_QUERYUISTATE, 0, 0);
+ int uiState = (int)/*64*/OS.SendMessage (handle, OS.WM_QUERYUISTATE, 0, 0);
if ((uiState & OS.UISF_HIDEFOCUS) == 0) {
- int hItem = OS.SendMessage (handle, OS.TVM_GETNEXTITEM, OS.TVGN_CARET, 0);
+ int /*long*/ 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) {
@@ -904,7 +909,7 @@ LRESULT CDDS_ITEMPOSTPAINT (NMTVCUSTOMDRAW nmcd, int wParam, int lParam) {
}
OS.DrawFocusRect (hDC, focusRect);
} else {
- int index = OS.SendMessage (hwndHeader, OS.HDM_ORDERTOINDEX, 0, 0);
+ int index = (int)/*64*/OS.SendMessage (hwndHeader, OS.HDM_ORDERTOINDEX, 0, 0);
RECT focusRect = item.getBounds (index, true, false, false, false, false, hDC);
RECT clipRect = item.getBounds (index, true, false, false, false, true, hDC);
OS.IntersectClipRect (hDC, clipRect.left, clipRect.top, clipRect.right, clipRect.bottom);
@@ -919,7 +924,7 @@ LRESULT CDDS_ITEMPOSTPAINT (NMTVCUSTOMDRAW nmcd, int wParam, int lParam) {
return new LRESULT (OS.CDRF_DODEFAULT);
}
-LRESULT CDDS_ITEMPREPAINT (NMTVCUSTOMDRAW nmcd, int wParam, int lParam) {
+LRESULT CDDS_ITEMPREPAINT (NMTVCUSTOMDRAW nmcd, int /*long*/ wParam, int /*long*/ lParam) {
/*
* Even when custom draw is being ignored, the font needs
* to be selected into the HDC so that the item bounds are
@@ -937,9 +942,9 @@ LRESULT CDDS_ITEMPREPAINT (NMTVCUSTOMDRAW nmcd, int wParam, int lParam) {
* COMCTL32.DLL,
*/
if (item == null) return null;
- int hDC = nmcd.hdc;
- int index = hwndHeader != 0 ? OS.SendMessage (hwndHeader, OS.HDM_ORDERTOINDEX, 0, 0) : 0;
- int hFont = item.cellFont != null ? item.cellFont [index] : -1;
+ int /*long*/ hDC = nmcd.hdc;
+ int index = hwndHeader != 0 ? (int)/*64*/OS.SendMessage (hwndHeader, OS.HDM_ORDERTOINDEX, 0, 0) : 0;
+ int /*long*/ hFont = item.cellFont != null ? item.cellFont [index] : -1;
if (hFont == -1) hFont = item.font;
if (hFont != -1) OS.SelectObject (hDC, hFont);
if (ignoreCustomDraw || nmcd.left == nmcd.right) {
@@ -948,7 +953,7 @@ LRESULT CDDS_ITEMPREPAINT (NMTVCUSTOMDRAW nmcd, int wParam, int lParam) {
int count = 0;
RECT clipRect = null;
if (hwndHeader != 0) {
- count = OS.SendMessage (hwndHeader, OS.HDM_GETITEMCOUNT, 0, 0);
+ count = (int)/*64*/OS.SendMessage (hwndHeader, OS.HDM_GETITEMCOUNT, 0, 0);
if (count != 0) {
boolean clip = !printClient;
if (!OS.IsWinCE && OS.WIN32_VERSION >= OS.VERSION (6, 0)) {
@@ -1048,7 +1053,7 @@ LRESULT CDDS_ITEMPREPAINT (NMTVCUSTOMDRAW nmcd, int wParam, int lParam) {
if (clrText != -1) data.foreground = clrText;
if (clrTextBk != -1) data.background = clrTextBk;
}
- data.uiState = OS.SendMessage (handle, OS.WM_QUERYUISTATE, 0, 0);
+ data.uiState = (int)/*64*/OS.SendMessage (handle, OS.WM_QUERYUISTATE, 0, 0);
if (hFont != -1) data.hFont = hFont;
GC gc = GC.win32_new (hDC, data);
Event event = new Event ();
@@ -1063,7 +1068,7 @@ LRESULT CDDS_ITEMPREPAINT (NMTVCUSTOMDRAW nmcd, int wParam, int lParam) {
//if ((nmcd.uItemState & OS.CDIS_FOCUS) != 0) {
if (OS.SendMessage (handle, OS.TVM_GETNEXTITEM, OS.TVGN_CARET, 0) == nmcd.dwItemSpec) {
if (handle == OS.GetFocus ()) {
- int uiState = OS.SendMessage (handle, OS.WM_QUERYUISTATE, 0, 0);
+ int uiState = (int)/*64*/OS.SendMessage (handle, OS.WM_QUERYUISTATE, 0, 0);
if ((uiState & OS.UISF_HIDEFOCUS) == 0) event.detail |= SWT.FOCUSED;
}
}
@@ -1311,7 +1316,7 @@ LRESULT CDDS_ITEMPREPAINT (NMTVCUSTOMDRAW nmcd, int wParam, int lParam) {
}
OS.SaveDC (hDC);
if (clipRect != null) {
- int hRgn = OS.CreateRectRgn (clipRect.left, clipRect.top, clipRect.right, clipRect.bottom);
+ int /*long*/ 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);
@@ -1321,7 +1326,7 @@ LRESULT CDDS_ITEMPREPAINT (NMTVCUSTOMDRAW nmcd, int wParam, int lParam) {
return result;
}
-LRESULT CDDS_POSTPAINT (NMTVCUSTOMDRAW nmcd, int wParam, int lParam) {
+LRESULT CDDS_POSTPAINT (NMTVCUSTOMDRAW nmcd, int /*long*/ wParam, int /*long*/ lParam) {
if (ignoreCustomDraw) return null;
if (OS.IsWindowVisible (handle)) {
if (OS.COMCTL32_MAJOR >= 6 && OS.IsAppThemed ()) {
@@ -1346,7 +1351,7 @@ LRESULT CDDS_POSTPAINT (NMTVCUSTOMDRAW nmcd, int wParam, int lParam) {
* NOTE: This problem only happens on Vista during
* WM_NOTIFY with NM_CUSTOMDRAW and CDDS_POSTPAINT.
*/
- int hItem = 0;
+ int /*long*/ hItem = 0;
if (!OS.IsWinCE && OS.WIN32_VERSION >= OS.VERSION (6, 0)) {
hItem = getBottomItem ();
} else {
@@ -1370,15 +1375,15 @@ LRESULT CDDS_POSTPAINT (NMTVCUSTOMDRAW nmcd, int wParam, int lParam) {
}
}
if (linesVisible) {
- int hDC = nmcd.hdc;
+ int /*long*/ hDC = nmcd.hdc;
if (hwndHeader != 0) {
int x = 0;
RECT rect = new RECT ();
HDITEM hdItem = new HDITEM ();
hdItem.mask = OS.HDI_WIDTH;
- int count = OS.SendMessage (hwndHeader, OS.HDM_GETITEMCOUNT, 0, 0);
+ int count = (int)/*64*/OS.SendMessage (hwndHeader, OS.HDM_GETITEMCOUNT, 0, 0);
for (int i=0; i<count; i++) {
- int index = OS.SendMessage (hwndHeader, OS.HDM_ORDERTOINDEX, i, 0);
+ int index = (int)/*64*/OS.SendMessage (hwndHeader, OS.HDM_ORDERTOINDEX, i, 0);
OS.SendMessage (hwndHeader, OS.HDM_GETITEM, index, hdItem);
OS.SetRect (rect, x, nmcd.top, x + hdItem.cxy, nmcd.bottom);
OS.DrawEdge (hDC, rect, OS.BDR_SUNKENINNER, OS.BF_RIGHT);
@@ -1403,7 +1408,7 @@ LRESULT CDDS_POSTPAINT (NMTVCUSTOMDRAW nmcd, int wParam, int lParam) {
* NOTE: This problem only happens on Vista during
* WM_NOTIFY with NM_CUSTOMDRAW and CDDS_POSTPAINT.
*/
- int hItem = 0;
+ int /*long*/ hItem = 0;
if (!OS.IsWinCE && OS.WIN32_VERSION >= OS.VERSION (6, 0)) {
hItem = getBottomItem ();
} else {
@@ -1415,7 +1420,7 @@ LRESULT CDDS_POSTPAINT (NMTVCUSTOMDRAW nmcd, int wParam, int lParam) {
}
}
if (height == 0) {
- height = OS.SendMessage (handle, OS.TVM_GETITEMHEIGHT, 0, 0);
+ height = (int)/*64*/OS.SendMessage (handle, OS.TVM_GETITEMHEIGHT, 0, 0);
OS.GetClientRect (handle, rect);
OS.SetRect (rect, rect.left, rect.top, rect.right, rect.top + height);
OS.DrawEdge (hDC, rect, OS.BDR_SUNKENINNER, OS.BF_BOTTOM);
@@ -1430,7 +1435,7 @@ LRESULT CDDS_POSTPAINT (NMTVCUSTOMDRAW nmcd, int wParam, int lParam) {
return new LRESULT (OS.CDRF_DODEFAULT);
}
-LRESULT CDDS_PREPAINT (NMTVCUSTOMDRAW nmcd, int wParam, int lParam) {
+LRESULT CDDS_PREPAINT (NMTVCUSTOMDRAW nmcd, int /*long*/ wParam, int /*long*/ lParam) {
if (explorerTheme) {
if ((OS.IsWindowEnabled (handle) && hooks (SWT.EraseItem)) || findImageControl () != null) {
RECT rect = new RECT ();
@@ -1441,7 +1446,7 @@ LRESULT CDDS_PREPAINT (NMTVCUSTOMDRAW nmcd, int wParam, int lParam) {
return new LRESULT (OS.CDRF_NOTIFYITEMDRAW | OS.CDRF_NOTIFYPOSTPAINT);
}
-int callWindowProc (int hwnd, int msg, int wParam, int lParam) {
+int /*long*/ callWindowProc (int /*long*/ hwnd, int msg, int /*long*/ wParam, int /*long*/ lParam) {
if (handle == 0) return 0;
if (hwndParent != 0 && hwnd == hwndParent) {
return OS.DefWindowProc (hwnd, msg, wParam, lParam);
@@ -1460,7 +1465,7 @@ int callWindowProc (int hwnd, int msg, int wParam, int lParam) {
* only the focus is assigned.
*/
if ((style & SWT.SINGLE) != 0) break;
- int hItem = OS.SendMessage (handle, OS.TVM_GETNEXTITEM, OS.TVGN_CARET, 0);
+ int /*long*/ 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) {
@@ -1481,7 +1486,7 @@ int callWindowProc (int hwnd, int msg, int wParam, int lParam) {
break;
}
}
- int hItem = 0;
+ int /*long*/ hItem = 0;
boolean redraw = false;
switch (msg) {
/* Keyboard messages */
@@ -1535,7 +1540,7 @@ int callWindowProc (int hwnd, int msg, int wParam, int lParam) {
break;
}
}
- int code = OS.CallWindowProc (TreeProc, hwnd, msg, wParam, lParam);
+ int /*long*/ code = OS.CallWindowProc (TreeProc, hwnd, msg, wParam, lParam);
switch (msg) {
/* Keyboard messages */
case OS.WM_KEYDOWN:
@@ -1609,7 +1614,7 @@ void checkBuffered () {
}
if (EXPLORER_THEME) {
if (!OS.IsWinCE && OS.WIN32_VERSION >= OS.VERSION (6, 0)) {
- int exStyle = OS.SendMessage (handle, OS.TVM_GETEXTENDEDSTYLE, 0, 0);
+ int exStyle = (int)/*64*/OS.SendMessage (handle, OS.TVM_GETEXTENDEDSTYLE, 0, 0);
if ((exStyle & OS.TVS_EX_DOUBLEBUFFER) != 0) style |= SWT.DOUBLE_BUFFERED;
}
}
@@ -1639,11 +1644,11 @@ boolean checkData (TreeItem item, int index, boolean redraw) {
return true;
}
-boolean checkHandle (int hwnd) {
+boolean checkHandle (int /*long*/ hwnd) {
return hwnd == handle || (hwndParent != 0 && hwnd == hwndParent) || (hwndHeader != 0 && hwnd == hwndHeader);
}
-boolean checkScroll (int hItem) {
+boolean checkScroll (int /*long*/ 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
@@ -1656,8 +1661,8 @@ boolean checkScroll (int hItem) {
* callers of this method.
*/
if (drawCount == 0) return false;
- int hRoot = OS.SendMessage (handle, OS.TVM_GETNEXTITEM, OS.TVGN_ROOT, 0);
- int hParent = OS.SendMessage (handle, OS.TVM_GETNEXTITEM, OS.TVGN_PARENT, hItem);
+ 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);
while (hParent != hRoot && hParent != 0) {
hParent = OS.SendMessage (handle, OS.TVM_GETNEXTITEM, OS.TVGN_PARENT, hParent);
}
@@ -1693,7 +1698,7 @@ protected void checkSubclass () {
*/
public void clear (int index, boolean all) {
checkWidget ();
- int hItem = OS.SendMessage (handle, OS.TVM_GETNEXTITEM, OS.TVGN_ROOT, 0);
+ int /*long*/ 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);
@@ -1706,11 +1711,11 @@ public void clear (int index, boolean all) {
}
}
-void clear (int hItem, TVITEM tvItem) {
+void clear (int /*long*/ hItem, TVITEM tvItem) {
tvItem.hItem = hItem;
TreeItem item = null;
if (OS.SendMessage (handle, OS.TVM_GETITEM, 0, tvItem) != 0) {
- item = tvItem.lParam != -1 ? items [tvItem.lParam] : null;
+ item = tvItem.lParam != -1 ? items [(int)/*64*/tvItem.lParam] : null;
}
if (item != null) {
item.clear ();
@@ -1739,25 +1744,26 @@ void clear (int hItem, TVITEM tvItem) {
*/
public void clearAll (boolean all) {
checkWidget ();
- int hItem = OS.SendMessage (handle, OS.TVM_GETNEXTITEM, OS.TVGN_ROOT, 0);
+ int /*long*/ hItem = OS.SendMessage (handle, OS.TVM_GETNEXTITEM, OS.TVGN_ROOT, 0);
if (hItem == 0) return;
TVITEM tvItem = new TVITEM ();
tvItem.mask = OS.TVIF_HANDLE | OS.TVIF_PARAM;
clearAll (hItem, tvItem, all);
}
-void clearAll (int hItem, TVITEM tvItem, boolean all) {
+void clearAll (int /*long*/ hItem, TVITEM tvItem, boolean all) {
while (hItem != 0) {
clear (hItem, tvItem);
- int hFirstItem = OS.SendMessage (handle, OS.TVM_GETNEXTITEM, OS.TVGN_CHILD, hItem);
+ int /*long*/ hFirstItem = OS.SendMessage (handle, OS.TVM_GETNEXTITEM, OS.TVGN_CHILD, hItem);
if (all) clearAll (hFirstItem, tvItem, all);
hItem = OS.SendMessage (handle, OS.TVM_GETNEXTITEM, OS.TVGN_NEXT, hItem);
}
}
-int CompareFunc (int lParam1, int lParam2, int lParamSort) {
- TreeItem item1 = items [lParam1], item2 = items [lParam2];
- String text1 = item1.getText (lParamSort), text2 = item2.getText (lParamSort);
+//TODO - should ids be long
+int /*long*/ CompareFunc (int /*long*/ lParam1, int /*long*/ lParam2, int /*long*/ 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);
}
@@ -1767,7 +1773,7 @@ public Point computeSize (int wHint, int hHint, boolean changed) {
if (hwndHeader != 0) {
HDITEM hdItem = new HDITEM ();
hdItem.mask = OS.HDI_WIDTH;
- int count = OS.SendMessage (hwndHeader, OS.HDM_GETITEMCOUNT, 0, 0);
+ int count = (int)/*64*/OS.SendMessage (hwndHeader, OS.HDM_GETITEMCOUNT, 0, 0);
for (int i=0; i<count; i++) {
OS.SendMessage (hwndHeader, OS.HDM_GETITEM, i, hdItem);
width += hdItem.cxy;
@@ -1777,7 +1783,7 @@ public Point computeSize (int wHint, int hHint, boolean changed) {
height += rect.bottom - rect.top;
}
RECT rect = new RECT ();
- int hItem = OS.SendMessage (handle, OS.TVM_GETNEXTITEM, OS.TVGN_ROOT, 0);
+ int /*long*/ hItem = OS.SendMessage (handle, OS.TVM_GETNEXTITEM, OS.TVGN_ROOT, 0);
while (hItem != 0) {
if ((style & SWT.VIRTUAL) == 0 && !painted) {
TVITEM tvItem = new TVITEM ();
@@ -1863,7 +1869,7 @@ void createHandle () {
* The control will not destroy a font that it did not
* create.
*/
- int hFont = OS.GetStockObject (OS.SYSTEM_FONT);
+ int /*long*/ hFont = OS.GetStockObject (OS.SYSTEM_FONT);
OS.SendMessage (handle, OS.WM_SETFONT, hFont, 0);
}
@@ -1893,7 +1899,7 @@ void createHeaderToolTips () {
void createItem (TreeColumn column, int index) {
if (hwndHeader == 0) createParent ();
- int columnCount = OS.SendMessage (hwndHeader, OS.HDM_GETITEMCOUNT, 0, 0);
+ int columnCount = (int)/*64*/OS.SendMessage (hwndHeader, OS.HDM_GETITEMCOUNT, 0, 0);
if (!(0 <= index && index <= columnCount)) error (SWT.ERROR_INVALID_RANGE);
if (columnCount == columns.length) {
TreeColumn [] newColumns = new TreeColumn [columns.length + 4];
@@ -1948,8 +1954,8 @@ void createItem (TreeColumn column, int index) {
item.cellForeground = temp;
}
if (item.cellFont != null) {
- int [] cellFont = item.cellFont;
- int [] temp = new int [columnCount + 1];
+ int /*long*/ [] cellFont = item.cellFont;
+ int /*long*/ [] temp = new int /*long*/ [columnCount + 1];
System.arraycopy (cellFont, 0, temp, 0, index);
System.arraycopy (cellFont, index, temp, index + 1, columnCount- index);
temp [index] = -1;
@@ -1966,8 +1972,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 hHeap = OS.GetProcessHeap ();
- int pszText = OS.HeapAlloc (hHeap, OS.HEAP_ZERO_MEMORY, TCHAR.sizeof);
+ int /*long*/ hHeap = OS.GetProcessHeap ();
+ int /*long*/ 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;
@@ -1989,7 +1995,7 @@ void createItem (TreeColumn column, int index) {
* scroll bar. The fix is to check for this case and
* explicitly hide the scroll bar explicitly.
*/
- int count = OS.SendMessage (handle, OS.TVM_GETCOUNT, 0, 0);
+ int count = (int)/*64*/OS.SendMessage (handle, OS.TVM_GETCOUNT, 0, 0);
if (count != 0) {
if (!OS.IsWinCE) OS.ShowScrollBar (handle, OS.SB_HORZ, false);
}
@@ -2022,7 +2028,7 @@ void createItem (TreeColumn column, int index) {
}
}
-void createItem (TreeItem item, int hParent, int hInsertAfter, int hItem) {
+void createItem (TreeItem item, int /*long*/ hParent, int /*long*/ hInsertAfter, int /*long*/ hItem) {
int id = -1;
if (item != null) {
id = lastID < items.length ? lastID : 0;
@@ -2047,8 +2053,8 @@ void createItem (TreeItem item, int hParent, int hInsertAfter, int hItem) {
}
lastID = id + 1;
}
- int hNewItem = 0;
- int hFirstItem = OS.SendMessage (handle, OS.TVM_GETNEXTITEM, OS.TVGN_CHILD, hParent);
+ int /*long*/ hNewItem = 0;
+ int /*long*/ hFirstItem = OS.SendMessage (handle, OS.TVM_GETNEXTITEM, OS.TVGN_CHILD, hParent);
boolean fixParent = hFirstItem == 0;
if (hItem == 0) {
TVINSERTSTRUCT tvInsert = new TVINSERTSTRUCT ();
@@ -2087,11 +2093,9 @@ void createItem (TreeItem item, int hParent, int hInsertAfter, int hItem) {
items [id] = item;
}
if (hFirstItem == 0) {
- switch (hInsertAfter) {
- case OS.TVI_FIRST:
- case OS.TVI_LAST:
- hFirstIndexOf = hLastIndexOf = hFirstItem = hNewItem;
- itemCount = lastIndexOf = 0;
+ if (hInsertAfter == OS.TVI_FIRST || hInsertAfter == OS.TVI_LAST) {
+ hFirstIndexOf = hLastIndexOf = hFirstItem = hNewItem;
+ itemCount = lastIndexOf = 0;
}
}
if (hFirstItem == hFirstIndexOf && itemCount != -1) itemCount++;
@@ -2129,7 +2133,7 @@ void createItem (TreeItem item, int hParent, int hInsertAfter, int hItem) {
OS.OffsetRect (damageRect, 0, rect.bottom - rect.top);
OS.InvalidateRect (handle, damageRect, true);
} else {
- int rgn = OS.CreateRectRgn (0, 0, 0, 0);
+ int /*long*/ 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);
@@ -2202,7 +2206,7 @@ void createParent () {
OS.GetModuleHandle (null),
null);
if (hwndParent == 0) error (SWT.ERROR_NO_HANDLES);
- OS.SetWindowLong (hwndParent, OS.GWL_ID, hwndParent);
+ OS.SetWindowLongPtr (hwndParent, OS.GWLP_ID, hwndParent);
int bits = 0;
if (OS.WIN32_VERSION >= OS.VERSION (4, 10)) {
bits |= OS.WS_EX_NOINHERITLAYOUT;
@@ -2219,9 +2223,9 @@ void createParent () {
OS.GetModuleHandle (null),
null);
if (hwndHeader == 0) error (SWT.ERROR_NO_HANDLES);
- OS.SetWindowLong (hwndHeader, OS.GWL_ID, hwndHeader);
+ OS.SetWindowLongPtr (hwndHeader, OS.GWLP_ID, hwndHeader);
if (OS.IsDBLocale) {
- int hIMC = OS.ImmGetContext (handle);
+ int /*long*/ hIMC = OS.ImmGetContext (handle);
OS.ImmAssociateContext (hwndParent, hIMC);
OS.ImmAssociateContext (hwndHeader, hIMC);
OS.ImmReleaseContext (handle, hIMC);
@@ -2234,9 +2238,9 @@ void createParent () {
// OS.SetWindowLong (handle, OS.GWL_EXSTYLE, oldExStyle);
// }
// }
- int hFont = OS.SendMessage (handle, OS.WM_GETFONT, 0, 0);
+ int /*long*/ hFont = OS.SendMessage (handle, OS.WM_GETFONT, 0, 0);
if (hFont != 0) OS.SendMessage (hwndHeader, OS.WM_SETFONT, hFont, 0);
- int hwndInsertAfter = OS.GetWindow (handle, OS.GW_HWNDPREV);
+ int /*long*/ 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 ();
@@ -2253,7 +2257,7 @@ void createParent () {
if ((oldStyle & OS.WS_VISIBLE) != 0) {
OS.ShowWindow (hwndParent, OS.SW_SHOW);
}
- int hwndFocus = OS.GetFocus ();
+ int /*long*/ hwndFocus = OS.GetFocus ();
if (hwndFocus == handle) OS.SetFocus (hwndParent);
OS.SetParent (handle, hwndParent);
if (hwndFocus == handle) OS.SetFocus (handle);
@@ -2279,13 +2283,13 @@ void deregister () {
if (hwndHeader != 0) display.removeControl (hwndHeader);
}
-void deselect (int hItem, TVITEM tvItem, int hIgnoreItem) {
+void deselect (int /*long*/ hItem, TVITEM tvItem, int /*long*/ hIgnoreItem) {
while (hItem != 0) {
if (hItem != hIgnoreItem) {
tvItem.hItem = hItem;
OS.SendMessage (handle, OS.TVM_SETITEM, 0, tvItem);
}
- int hFirstItem = OS.SendMessage (handle, OS.TVM_GETNEXTITEM, OS.TVGN_CHILD, hItem);
+ int /*long*/ 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);
}
@@ -2305,16 +2309,16 @@ public void deselectAll () {
tvItem.mask = OS.TVIF_HANDLE | OS.TVIF_STATE;
tvItem.stateMask = OS.TVIS_SELECTED;
if ((style & SWT.SINGLE) != 0) {
- int hItem = OS.SendMessage (handle, OS.TVM_GETNEXTITEM, OS.TVGN_CARET, 0);
+ int /*long*/ 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 oldProc = OS.GetWindowLong (handle, OS.GWL_WNDPROC);
- OS.SetWindowLong (handle, OS.GWL_WNDPROC, TreeProc);
+ int /*long*/ oldProc = OS.GetWindowLongPtr (handle, OS.GWLP_WNDPROC);
+ OS.SetWindowLongPtr (handle, OS.GWLP_WNDPROC, TreeProc);
if ((style & SWT.VIRTUAL) != 0) {
- int hItem = OS.SendMessage (handle, OS.TVM_GETNEXTITEM, OS.TVGN_ROOT, 0);
+ int /*long*/ hItem = OS.SendMessage (handle, OS.TVM_GETNEXTITEM, OS.TVGN_ROOT, 0);
deselect (hItem, tvItem, 0);
} else {
for (int i=0; i<items.length; i++) {
@@ -2325,13 +2329,13 @@ public void deselectAll () {
}
}
}
- OS.SetWindowLong (handle, OS.GWL_WNDPROC, oldProc);
+ OS.SetWindowLongPtr (handle, OS.GWLP_WNDPROC, oldProc);
}
}
void destroyItem (TreeColumn column) {
if (hwndHeader == 0) error (SWT.ERROR_ITEM_NOT_REMOVED);
- int columnCount = OS.SendMessage (hwndHeader, OS.HDM_GETITEMCOUNT, 0, 0);
+ int columnCount = (int)/*64*/OS.SendMessage (hwndHeader, OS.HDM_GETITEMCOUNT, 0, 0);
int index = 0;
while (index < columnCount) {
if (columns [index] == column) break;
@@ -2398,8 +2402,8 @@ void destroyItem (TreeColumn column) {
item.cellForeground = temp;
}
if (item.cellFont != null) {
- int [] cellFont = item.cellFont;
- int [] temp = new int [columnCount];
+ int /*long*/ [] cellFont = item.cellFont;
+ int /*long*/ [] temp = new int /*long*/ [columnCount];
System.arraycopy (cellFont, 0, temp, 0, index);
System.arraycopy (cellFont, index + 1, temp, index, columnCount - index);
item.cellFont = temp;
@@ -2465,7 +2469,7 @@ void destroyItem (TreeColumn column) {
}
}
-void destroyItem (TreeItem item, int hItem) {
+void destroyItem (TreeItem item, int /*long*/ hItem) {
hFirstIndexOf = hLastIndexOf = 0;
itemCount = -1;
/*
@@ -2483,7 +2487,7 @@ void destroyItem (TreeItem item, int hItem) {
* allowing application code to add or remove items during
* this remove operation.
*/
- int hParent = 0;
+ int /*long*/ hParent = 0;
boolean fixRedraw = false;
if ((style & SWT.DOUBLE_BUFFERED) == 0) {
if (drawCount == 0 && OS.IsWindowVisible (handle)) {
@@ -2515,7 +2519,7 @@ void destroyItem (TreeItem item, int hItem) {
* NOTE: This only happens on Vista.
*/
if (!OS.IsWinCE && OS.WIN32_VERSION >= OS.VERSION (6, 0)) {
- int hwndToolTip = OS.SendMessage (handle, OS.TVM_GETTOOLTIPS, 0, 0);
+ int /*long*/ hwndToolTip = OS.SendMessage (handle, OS.TVM_GETTOOLTIPS, 0, 0);
if (hwndToolTip != 0) OS.SendMessage (hwndToolTip, OS.TTM_POP, 0 ,0);
}
@@ -2539,7 +2543,7 @@ void destroyItem (TreeItem item, int hItem) {
}
}
}
- int count = OS.SendMessage (handle, OS.TVM_GETCOUNT, 0, 0);
+ int count = (int)/*64*/OS.SendMessage (handle, OS.TVM_GETCOUNT, 0, 0);
if (count == 0) {
if (imageList != null) {
OS.SendMessage (handle, OS.TVM_SETIMAGELIST, 0, 0);
@@ -2606,7 +2610,7 @@ void enableWidget (boolean enabled) {
updateFullSelection ();
}
-int findIndex (int hFirstItem, int hItem) {
+int findIndex (int /*long*/ hFirstItem, int /*long*/ hItem) {
if (hFirstItem == 0) return -1;
if (hFirstItem == hFirstIndexOf) {
if (hFirstIndexOf == hItem) {
@@ -2614,12 +2618,12 @@ int findIndex (int hFirstItem, int hItem) {
return lastIndexOf = 0;
}
if (hLastIndexOf == hItem) return lastIndexOf;
- int hPrevItem = OS.SendMessage (handle, OS.TVM_GETNEXTITEM, OS.TVGN_PREVIOUS, hLastIndexOf);
+ int /*long*/ hPrevItem = OS.SendMessage (handle, OS.TVM_GETNEXTITEM, OS.TVGN_PREVIOUS, hLastIndexOf);
if (hPrevItem == hItem) {
hLastIndexOf = hPrevItem;
return --lastIndexOf;
}
- int hNextItem = OS.SendMessage (handle, OS.TVM_GETNEXTITEM, OS.TVGN_NEXT, hLastIndexOf);
+ int /*long*/ hNextItem = OS.SendMessage (handle, OS.TVM_GETNEXTITEM, OS.TVGN_NEXT, hLastIndexOf);
if (hNextItem == hItem) {
hLastIndexOf = hNextItem;
return ++lastIndexOf;
@@ -2644,7 +2648,8 @@ int findIndex (int hFirstItem, int hItem) {
}
return -1;
}
- int index = 0, hNextItem = hFirstItem;
+ int index = 0;
+ int /*long*/ hNextItem = hFirstItem;
while (hNextItem != 0 && hNextItem != hItem) {
hNextItem = OS.SendMessage (handle, OS.TVM_GETNEXTITEM, OS.TVGN_NEXT, hNextItem);
index++;
@@ -2658,11 +2663,11 @@ int findIndex (int hFirstItem, int hItem) {
return -1;
}
-Widget findItem (int hItem) {
+Widget findItem (int /*long*/ hItem) {
return _getItem (hItem);
}
-int findItem (int hFirstItem, int index) {
+int /*long*/ findItem (int /*long*/ hFirstItem, int index) {
if (hFirstItem == 0) return 0;
if (hFirstItem == hFirstIndexOf) {
if (index == 0) {
@@ -2680,7 +2685,7 @@ int findItem (int hFirstItem, int index) {
}
if (index < lastIndexOf) {
int previousIndex = lastIndexOf - 1;
- int hPrevItem = OS.SendMessage (handle, OS.TVM_GETNEXTITEM, OS.TVGN_PREVIOUS, hLastIndexOf);
+ int /*long*/ 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;
@@ -2691,7 +2696,7 @@ int findItem (int hFirstItem, int index) {
}
} else {
int nextIndex = lastIndexOf + 1;
- int hNextItem = OS.SendMessage (handle, OS.TVM_GETNEXTITEM, OS.TVGN_NEXT, hLastIndexOf);
+ int /*long*/ 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++;
@@ -2703,7 +2708,8 @@ int findItem (int hFirstItem, int index) {
}
return 0;
}
- int nextIndex = 0, hNextItem = hFirstItem;
+ int nextIndex = 0;
+ int /*long*/ hNextItem = hFirstItem;
while (hNextItem != 0 && nextIndex < index) {
hNextItem = OS.SendMessage (handle, OS.TVM_GETNEXTITEM, OS.TVGN_NEXT, hNextItem);
nextIndex++;
@@ -2719,7 +2725,7 @@ int findItem (int hFirstItem, int index) {
TreeItem getFocusItem () {
// checkWidget ();
- int hItem = OS.SendMessage (handle, OS.TVM_GETNEXTITEM, OS.TVGN_CARET, 0);
+ int /*long*/ hItem = OS.SendMessage (handle, OS.TVM_GETNEXTITEM, OS.TVGN_CARET, 0);
return hItem != 0 ? _getItem (hItem) : null;
}
@@ -2791,12 +2797,12 @@ Point getImageSize () {
return new Point (0, getItemHeight ());
}
-int getBottomItem () {
- int hItem = OS.SendMessage (handle, OS.TVM_GETNEXTITEM, OS.TVGN_FIRSTVISIBLE, 0);
+int /*long*/ getBottomItem () {
+ int /*long*/ hItem = OS.SendMessage (handle, OS.TVM_GETNEXTITEM, OS.TVGN_FIRSTVISIBLE, 0);
if (hItem == 0) return 0;
- int index = 0, count = OS.SendMessage (handle, OS.TVM_GETVISIBLECOUNT, 0, 0);
+ int index = 0, count = (int)/*64*/OS.SendMessage (handle, OS.TVM_GETVISIBLECOUNT, 0, 0);
while (index < count) {
- int hNextItem = OS.SendMessage (handle, OS.TVM_GETNEXTITEM, OS.TVGN_NEXTVISIBLE, hItem);
+ int /*long*/ hNextItem = OS.SendMessage (handle, OS.TVM_GETNEXTITEM, OS.TVGN_NEXTVISIBLE, hItem);
if (hNextItem == 0) return hItem;
hItem = hNextItem;
index++;
@@ -2836,7 +2842,7 @@ int getBottomItem () {
public TreeColumn getColumn (int index) {
checkWidget ();
if (hwndHeader == 0) error (SWT.ERROR_INVALID_RANGE);
- int count = OS.SendMessage (hwndHeader, OS.HDM_GETITEMCOUNT, 0, 0);
+ int count = (int)/*64*/OS.SendMessage (hwndHeader, OS.HDM_GETITEMCOUNT, 0, 0);
if (!(0 <= index && index < count)) error (SWT.ERROR_INVALID_RANGE);
return columns [index];
}
@@ -2860,7 +2866,7 @@ public TreeColumn getColumn (int index) {
public int getColumnCount () {
checkWidget ();
if (hwndHeader == 0) return 0;
- return OS.SendMessage (hwndHeader, OS.HDM_GETITEMCOUNT, 0, 0);
+ return (int)/*64*/OS.SendMessage (hwndHeader, OS.HDM_GETITEMCOUNT, 0, 0);
}
/**
@@ -2894,7 +2900,7 @@ public int getColumnCount () {
public int[] getColumnOrder () {
checkWidget ();
if (hwndHeader == 0) return new int [0];
- int count = OS.SendMessage (hwndHeader, OS.HDM_GETITEMCOUNT, 0, 0);
+ int count = (int)/*64*/OS.SendMessage (hwndHeader, OS.HDM_GETITEMCOUNT, 0, 0);
int [] order = new int [count];
OS.SendMessage (hwndHeader, OS.HDM_GETORDERARRAY, count, order);
return order;
@@ -2932,7 +2938,7 @@ public int[] getColumnOrder () {
public TreeColumn [] getColumns () {
checkWidget ();
if (hwndHeader == 0) return new TreeColumn [0];
- int count = OS.SendMessage (hwndHeader, OS.HDM_GETITEMCOUNT, 0, 0);
+ int count = (int)/*64*/OS.SendMessage (hwndHeader, OS.HDM_GETITEMCOUNT, 0, 0);
TreeColumn [] result = new TreeColumn [count];
System.arraycopy (columns, 0, result, 0, count);
return result;
@@ -2958,9 +2964,9 @@ public TreeColumn [] getColumns () {
public TreeItem getItem (int index) {
checkWidget ();
if (index < 0) error (SWT.ERROR_INVALID_RANGE);
- int hFirstItem = OS.SendMessage (handle, OS.TVM_GETNEXTITEM, OS.TVGN_ROOT, 0);
+ int /*long*/ hFirstItem = OS.SendMessage (handle, OS.TVM_GETNEXTITEM, OS.TVGN_ROOT, 0);
if (hFirstItem == 0) error (SWT.ERROR_INVALID_RANGE);
- int hItem = findItem (hFirstItem, index);
+ int /*long*/ hItem = findItem (hFirstItem, index);
if (hItem == 0) error (SWT.ERROR_INVALID_RANGE);
return _getItem (hItem);
}
@@ -2974,7 +2980,7 @@ TreeItem getItem (NMTVCUSTOMDRAW nmcd) {
* fix is to query the field from the item instead
* of using the struct.
*/
- int id = nmcd.lItemlParam;
+ int /*long*/ id = nmcd.lItemlParam;
if ((style & SWT.VIRTUAL) != 0) {
if (id == -1) {
TVITEM tvItem = new TVITEM ();
@@ -3040,13 +3046,14 @@ public TreeItem getItem (Point point) {
*/
public int getItemCount () {
checkWidget ();
- int hItem = OS.SendMessage (handle, OS.TVM_GETNEXTITEM, OS.TVGN_ROOT, 0);
+ int /*long*/ hItem = OS.SendMessage (handle, OS.TVM_GETNEXTITEM, OS.TVGN_ROOT, 0);
if (hItem == 0) return 0;
return getItemCount (hItem);
}
-int getItemCount (int hItem) {
- int count = 0, hFirstItem = hItem;
+int getItemCount (int /*long*/ hItem) {
+ int count = 0;
+ int /*long*/ hFirstItem = hItem;
if (hItem == hFirstIndexOf) {
if (itemCount != -1) return itemCount;
hFirstItem = hLastIndexOf;
@@ -3073,7 +3080,7 @@ int getItemCount (int hItem) {
*/
public int getItemHeight () {
checkWidget ();
- return OS.SendMessage (handle, OS.TVM_GETITEMHEIGHT, 0, 0);
+ return (int)/*64*/OS.SendMessage (handle, OS.TVM_GETITEMHEIGHT, 0, 0);
}
/**
@@ -3095,13 +3102,14 @@ public int getItemHeight () {
*/
public TreeItem [] getItems () {
checkWidget ();
- int hItem = OS.SendMessage (handle, OS.TVM_GETNEXTITEM, OS.TVGN_ROOT, 0);
+ int /*long*/ hItem = OS.SendMessage (handle, OS.TVM_GETNEXTITEM, OS.TVGN_ROOT, 0);
if (hItem == 0) return new TreeItem [0];
return getItems (hItem);
}
-TreeItem [] getItems (int hTreeItem) {
- int count = 0, hItem = hTreeItem;
+TreeItem [] getItems (int /*long*/ hTreeItem) {
+ int count = 0;
+ int /*long*/ hItem = hTreeItem;
while (hItem != 0) {
hItem = OS.SendMessage (handle, OS.TVM_GETNEXTITEM, OS.TVGN_NEXT, hItem);
count++;
@@ -3156,7 +3164,7 @@ public boolean getLinesVisible () {
return linesVisible;
}
-int getNextSelection (int hItem, TVITEM tvItem) {
+int /*long*/ getNextSelection (int /*long*/ hItem, TVITEM tvItem) {
while (hItem != 0) {
int state = 0;
if (OS.IsWinCE) {
@@ -3164,11 +3172,11 @@ int getNextSelection (int hItem, TVITEM tvItem) {
OS.SendMessage (handle, OS.TVM_GETITEM, 0, tvItem);
state = tvItem.state;
} else {
- state = OS.SendMessage (handle, OS.TVM_GETITEMSTATE, hItem, OS.TVIS_SELECTED);
+ state = (int)/*64*/OS.SendMessage (handle, OS.TVM_GETITEMSTATE, hItem, OS.TVIS_SELECTED);
}
if ((state & OS.TVIS_SELECTED) != 0) return hItem;
- int hFirstItem = OS.SendMessage (handle, OS.TVM_GETNEXTITEM, OS.TVGN_CHILD, hItem);
- int hSelected = getNextSelection (hFirstItem, tvItem);
+ int /*long*/ hFirstItem = OS.SendMessage (handle, OS.TVM_GETNEXTITEM, OS.TVGN_CHILD, hItem);
+ int /*long*/ hSelected = getNextSelection (hFirstItem, tvItem);
if (hSelected != 0) return hSelected;
hItem = OS.SendMessage (handle, OS.TVM_GETNEXTITEM, OS.TVGN_NEXT, hItem);
}
@@ -3192,7 +3200,7 @@ public TreeItem getParentItem () {
return null;
}
-int getSelection (int hItem, TVITEM tvItem, TreeItem [] selection, int index, int count, boolean bigSelection, boolean all) {
+int getSelection (int /*long*/ hItem, TVITEM tvItem, TreeItem [] selection, int index, int count, boolean bigSelection, boolean all) {
while (hItem != 0) {
if (OS.IsWinCE || bigSelection) {
tvItem.hItem = hItem;
@@ -3204,7 +3212,7 @@ int getSelection (int hItem, TVITEM tvItem, TreeItem [] selection, int index, in
index++;
}
} else {
- int state = OS.SendMessage (handle, OS.TVM_GETITEMSTATE, hItem, OS.TVIS_SELECTED);
+ int state = (int)/*64*/OS.SendMessage (handle, OS.TVM_GETITEMSTATE, hItem, OS.TVIS_SELECTED);
if ((state & OS.TVIS_SELECTED) != 0) {
if (tvItem != null && selection != null && index < selection.length) {
tvItem.hItem = hItem;
@@ -3216,7 +3224,7 @@ int getSelection (int hItem, TVITEM tvItem, TreeItem [] selection, int index, in
}
if (index == count) break;
if (all) {
- int hFirstItem = OS.SendMessage (handle, OS.TVM_GETNEXTITEM, OS.TVGN_CHILD, hItem);
+ int /*long*/ hFirstItem = OS.SendMessage (handle, OS.TVM_GETNEXTITEM, OS.TVGN_CHILD, hItem);
if ((index = getSelection (hFirstItem, tvItem, selection, index, count, bigSelection, all)) == count) {
break;
}
@@ -3247,7 +3255,7 @@ int getSelection (int hItem, TVITEM tvItem, TreeItem [] selection, int index, in
public TreeItem [] getSelection () {
checkWidget ();
if ((style & SWT.SINGLE) != 0) {
- int hItem = OS.SendMessage (handle, OS.TVM_GETNEXTITEM, OS.TVGN_CARET, 0);
+ int /*long*/ 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;
@@ -3258,12 +3266,12 @@ public TreeItem [] getSelection () {
}
int count = 0;
TreeItem [] guess = new TreeItem [(style & SWT.VIRTUAL) != 0 ? 8 : 1];
- int oldProc = OS.GetWindowLong (handle, OS.GWL_WNDPROC);
- OS.SetWindowLong (handle, OS.GWL_WNDPROC, TreeProc);
+ int /*long*/ 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 hItem = OS.SendMessage (handle, OS.TVM_GETNEXTITEM, OS.TVGN_ROOT, 0);
+ int /*long*/ hItem = OS.SendMessage (handle, OS.TVM_GETNEXTITEM, OS.TVGN_ROOT, 0);
count = getSelection (hItem, tvItem, guess, 0, -1, false, true);
} else {
TVITEM tvItem = null;
@@ -3274,13 +3282,14 @@ public TreeItem [] getSelection () {
for (int i=0; i<items.length; i++) {
TreeItem item = items [i];
if (item != null) {
- int hItem = item.handle, state = 0;
+ int /*long*/ hItem = item.handle;
+ int state = 0;
if (OS.IsWinCE) {
tvItem.hItem = hItem;
OS.SendMessage (handle, OS.TVM_GETITEM, 0, tvItem);
state = tvItem.state;
} else {
- state = OS.SendMessage (handle, OS.TVM_GETITEMSTATE, hItem, OS.TVIS_SELECTED);
+ state = (int)/*64*/OS.SendMessage (handle, OS.TVM_GETITEMSTATE, hItem, OS.TVIS_SELECTED);
}
if ((state & OS.TVIS_SELECTED) != 0) {
if (count < guess.length) guess [count] = item;
@@ -3289,7 +3298,7 @@ public TreeItem [] getSelection () {
}
}
}
- OS.SetWindowLong (handle, OS.GWL_WNDPROC, oldProc);
+ OS.SetWindowLongPtr (handle, OS.GWLP_WNDPROC, oldProc);
if (count == 0) return new TreeItem [0];
if (count == guess.length) return guess;
TreeItem [] result = new TreeItem [count];
@@ -3297,16 +3306,16 @@ public TreeItem [] getSelection () {
System.arraycopy (guess, 0, result, 0, count);
return result;
}
- OS.SetWindowLong (handle, OS.GWL_WNDPROC, TreeProc);
+ OS.SetWindowLongPtr (handle, OS.GWLP_WNDPROC, TreeProc);
TVITEM tvItem = new TVITEM ();
tvItem.mask = OS.TVIF_HANDLE | OS.TVIF_PARAM | OS.TVIF_STATE;
- int hItem = OS.SendMessage (handle, OS.TVM_GETNEXTITEM, OS.TVGN_ROOT, 0);
- int itemCount = OS.SendMessage (handle, OS.TVM_GETCOUNT, 0, 0);
+ int /*long*/ 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)) {
getSelection (hItem, tvItem, result, 0, count, bigSelection, true);
}
- OS.SetWindowLong (handle, OS.GWL_WNDPROC, oldProc);
+ OS.SetWindowLongPtr (handle, OS.GWLP_WNDPROC, oldProc);
return result;
}
@@ -3323,7 +3332,7 @@ public TreeItem [] getSelection () {
public int getSelectionCount () {
checkWidget ();
if ((style & SWT.SINGLE) != 0) {
- int hItem = OS.SendMessage (handle, OS.TVM_GETNEXTITEM, OS.TVGN_CARET, 0);
+ int /*long*/ hItem = OS.SendMessage (handle, OS.TVM_GETNEXTITEM, OS.TVGN_CARET, 0);
if (hItem == 0) return 0;
int state = 0;
if (OS.IsWinCE) {
@@ -3333,38 +3342,39 @@ public int getSelectionCount () {
OS.SendMessage (handle, OS.TVM_GETITEM, 0, tvItem);
state = tvItem.state;
} else {
- state = OS.SendMessage (handle, OS.TVM_GETITEMSTATE, hItem, OS.TVIS_SELECTED);
+ state = (int)/*64*/OS.SendMessage (handle, OS.TVM_GETITEMSTATE, hItem, OS.TVIS_SELECTED);
}
return (state & OS.TVIS_SELECTED) == 0 ? 0 : 1;
}
int count = 0;
- int oldProc = OS.GetWindowLong (handle, OS.GWL_WNDPROC);
+ int /*long*/ oldProc = OS.GetWindowLongPtr (handle, OS.GWLP_WNDPROC);
TVITEM tvItem = null;
if (OS.IsWinCE) {
tvItem = new TVITEM ();
tvItem.mask = OS.TVIF_STATE;
}
- OS.SetWindowLong (handle, OS.GWL_WNDPROC, TreeProc);
+ OS.SetWindowLongPtr (handle, OS.GWLP_WNDPROC, TreeProc);
if ((style & SWT.VIRTUAL) != 0) {
- int hItem = OS.SendMessage (handle, OS.TVM_GETNEXTITEM, OS.TVGN_ROOT, 0);
+ int /*long*/ 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 hItem = item.handle, state = 0;
+ int /*long*/ hItem = item.handle;
+ int state = 0;
if (OS.IsWinCE) {
tvItem.hItem = hItem;
OS.SendMessage (handle, OS.TVM_GETITEM, 0, tvItem);
state = tvItem.state;
} else {
- state = OS.SendMessage (handle, OS.TVM_GETITEMSTATE, hItem, OS.TVIS_SELECTED);
+ state = (int)/*64*/OS.SendMessage (handle, OS.TVM_GETITEMSTATE, hItem, OS.TVIS_SELECTED);
}
if ((state & OS.TVIS_SELECTED) != 0) count++;
}
}
}
- OS.SetWindowLong (handle, OS.GWL_WNDPROC, oldProc);
+ OS.SetWindowLongPtr (handle, OS.GWLP_WNDPROC, oldProc);
return count;
}
@@ -3443,7 +3453,7 @@ public int getSortDirection () {
*/
public TreeItem getTopItem () {
checkWidget ();
- int hItem = OS.SendMessage (handle, OS.TVM_GETNEXTITEM, OS.TVGN_FIRSTVISIBLE, 0);
+ int /*long*/ hItem = OS.SendMessage (handle, OS.TVM_GETNEXTITEM, OS.TVGN_FIRSTVISIBLE, 0);
return hItem != 0 ? _getItem (hItem) : null;
}
@@ -3456,8 +3466,8 @@ int imageIndex (Image image, int index) {
int imageIndex = imageList.indexOf (image);
if (imageIndex == -1) imageIndex = imageList.add (image);
if (hwndHeader == 0 || OS.SendMessage (hwndHeader, OS.HDM_ORDERTOINDEX, 0, 0) == index) {
- int hImageList = imageList.getHandle ();
- int hOldImageList = OS.SendMessage (handle, OS.TVM_GETIMAGELIST, OS.TVSIL_NORMAL, 0);
+ int /*long*/ hImageList = imageList.getHandle ();
+ int /*long*/ 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 ();
@@ -3473,7 +3483,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 hImageList = headerImageList.getHandle ();
+ int /*long*/ hImageList = headerImageList.getHandle ();
if (hwndHeader != 0) {
OS.SendMessage (hwndHeader, OS.HDM_SETIMAGELIST, 0, hImageList);
}
@@ -3509,7 +3519,7 @@ public int indexOf (TreeColumn column) {
if (column == null) error (SWT.ERROR_NULL_ARGUMENT);
if (column.isDisposed()) error(SWT.ERROR_INVALID_ARGUMENT);
if (hwndHeader == 0) return -1;
- int count = OS.SendMessage (hwndHeader, OS.HDM_GETITEMCOUNT, 0, 0);
+ int count = (int)/*64*/OS.SendMessage (hwndHeader, OS.HDM_GETITEMCOUNT, 0, 0);
for (int i=0; i<count; i++) {
if (columns [i] == column) return i;
}
@@ -3540,7 +3550,7 @@ public int indexOf (TreeItem item) {
checkWidget ();
if (item == null) error (SWT.ERROR_NULL_ARGUMENT);
if (item.isDisposed()) error(SWT.ERROR_INVALID_ARGUMENT);
- int hItem = OS.SendMessage (handle, OS.TVM_GETNEXTITEM, OS.TVGN_ROOT, 0);
+ int /*long*/ hItem = OS.SendMessage (handle, OS.TVM_GETNEXTITEM, OS.TVGN_ROOT, 0);
return hItem == 0 ? -1 : findIndex (hItem, item.handle);
}
@@ -3610,7 +3620,7 @@ boolean isItemSelected (NMTVCUSTOMDRAW nmcd) {
void redrawSelection () {
if ((style & SWT.SINGLE) != 0) {
- int hItem = OS.SendMessage (handle, OS.TVM_GETNEXTITEM, OS.TVGN_CARET, 0);
+ int /*long*/ 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)) {
@@ -3618,7 +3628,7 @@ void redrawSelection () {
}
}
} else {
- int hItem = OS.SendMessage (handle, OS.TVM_GETNEXTITEM, OS.TVGN_FIRSTVISIBLE, 0);
+ int /*long*/ hItem = OS.SendMessage (handle, OS.TVM_GETNEXTITEM, OS.TVGN_FIRSTVISIBLE, 0);
if (hItem != 0) {
TVITEM tvItem = null;
if (OS.IsWinCE) {
@@ -3626,7 +3636,7 @@ void redrawSelection () {
tvItem.mask = OS.TVIF_STATE;
}
RECT rect = new RECT ();
- int index = 0, count = OS.SendMessage (handle, OS.TVM_GETVISIBLECOUNT, 0, 0);
+ int index = 0, count = (int)/*64*/OS.SendMessage (handle, OS.TVM_GETVISIBLECOUNT, 0, 0);
while (index < count && hItem != 0) {
int state = 0;
if (OS.IsWinCE) {
@@ -3634,7 +3644,7 @@ void redrawSelection () {
OS.SendMessage (handle, OS.TVM_GETITEM, 0, tvItem);
state = tvItem.state;
} else {
- state = OS.SendMessage (handle, OS.TVM_GETITEMSTATE, hItem, OS.TVIS_SELECTED);
+ state = (int)/*64*/OS.SendMessage (handle, OS.TVM_GETITEMSTATE, hItem, OS.TVIS_SELECTED);
}
if ((state & OS.TVIS_SELECTED) != 0) {
if (OS.TreeView_GetItemRect (handle, hItem, rect, false)) {
@@ -3654,23 +3664,23 @@ void register () {
if (hwndHeader != 0) display.addControl (hwndHeader, this);
}
-void releaseItem (int hItem, TVITEM tvItem, boolean release) {
+void releaseItem (int /*long*/ hItem, TVITEM tvItem, boolean release) {
if (hItem == hAnchor) hAnchor = 0;
if (hItem == hInsert) hInsert = 0;
tvItem.hItem = hItem;
if (OS.SendMessage (handle, OS.TVM_GETITEM, 0, tvItem) != 0) {
if (tvItem.lParam != -1) {
- if (tvItem.lParam < lastID) lastID = tvItem.lParam;
+ if (tvItem.lParam < lastID) lastID = (int)/*64*/tvItem.lParam;
if (release) {
- TreeItem item = items [tvItem.lParam];
+ TreeItem item = items [(int)/*64*/tvItem.lParam];
if (item != null) item.release (false);
}
- items [tvItem.lParam] = null;
+ items [(int)/*64*/tvItem.lParam] = null;
}
}
}
-void releaseItems (int hItem, TVITEM tvItem) {
+void releaseItems (int /*long*/ hItem, TVITEM tvItem) {
hItem = OS.SendMessage (handle, OS.TVM_GETNEXTITEM, OS.TVGN_CHILD, hItem);
while (hItem != 0) {
releaseItems (hItem, tvItem);
@@ -3729,7 +3739,7 @@ void releaseWidget () {
display.releaseImageList (headerImageList);
}
imageList = headerImageList = null;
- int hStateList = OS.SendMessage (handle, OS.TVM_GETIMAGELIST, OS.TVSIL_STATE, 0);
+ int /*long*/ 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);
@@ -3765,7 +3775,7 @@ public void removeAll () {
boolean redraw = drawCount == 0 && OS.IsWindowVisible (handle);
if (redraw) OS.DefWindowProc (handle, OS.WM_SETREDRAW, 0, 0);
shrink = ignoreShrink = true;
- int result = OS.SendMessage (handle, OS.TVM_DELETEITEM, 0, OS.TVI_ROOT);
+ int /*long*/ result = OS.SendMessage (handle, OS.TVM_DELETEITEM, 0, OS.TVI_ROOT);
ignoreShrink = false;
if (redraw) {
OS.DefWindowProc (handle, OS.WM_SETREDRAW, 1, 0);
@@ -3859,7 +3869,7 @@ public void removeTreeListener(TreeListener listener) {
*/
public void setInsertMark (TreeItem item, boolean before) {
checkWidget ();
- int hItem = 0;
+ int /*long*/ hItem = 0;
if (item != null) {
if (item.isDisposed()) error(SWT.ERROR_INVALID_ARGUMENT);
hItem = item.handle;
@@ -3884,11 +3894,11 @@ public void setInsertMark (TreeItem item, boolean before) {
public void setItemCount (int count) {
checkWidget ();
count = Math.max (0, count);
- int hItem = OS.SendMessage (handle, OS.TVM_GETNEXTITEM, OS.TVGN_ROOT, 0);
+ int /*long*/ hItem = OS.SendMessage (handle, OS.TVM_GETNEXTITEM, OS.TVGN_ROOT, 0);
setItemCount (count, OS.TVGN_ROOT, hItem);
}
-void setItemCount (int count, int hParent, int hItem) {
+void setItemCount (int count, int /*long*/ hParent, int /*long*/ hItem) {
boolean redraw = false;
if (OS.SendMessage (handle, OS.TVM_GETCOUNT, 0, 0) == 0) {
redraw = drawCount == 0 && OS.IsWindowVisible (handle);
@@ -3905,7 +3915,7 @@ void setItemCount (int count, int hParent, int hItem) {
tvItem.hItem = hItem;
OS.SendMessage (handle, OS.TVM_GETITEM, 0, tvItem);
hItem = OS.SendMessage (handle, OS.TVM_GETNEXTITEM, OS.TVGN_NEXT, hItem);
- TreeItem item = tvItem.lParam != -1 ? items [tvItem.lParam] : null;
+ TreeItem item = tvItem.lParam != -1 ? items [(int)/*64*/tvItem.lParam] : null;
if (item != null && !item.isDisposed ()) {
item.dispose ();
} else {
@@ -3978,17 +3988,17 @@ public void setLinesVisible (boolean show) {
OS.InvalidateRect (handle, null, true);
}
-int scrolledHandle () {
+int /*long*/ scrolledHandle () {
if (hwndHeader == 0) return handle;
- int count = OS.SendMessage (hwndHeader, OS.HDM_GETITEMCOUNT, 0, 0);
+ int count = (int)/*64*/OS.SendMessage (hwndHeader, OS.HDM_GETITEMCOUNT, 0, 0);
return count == 0 ? handle : hwndParent;
}
-void select (int hItem, TVITEM tvItem) {
+void select (int /*long*/ hItem, TVITEM tvItem) {
while (hItem != 0) {
tvItem.hItem = hItem;
OS.SendMessage (handle, OS.TVM_SETITEM, 0, tvItem);
- int hFirstItem = OS.SendMessage (handle, OS.TVM_GETNEXTITEM, OS.TVGN_CHILD, hItem);
+ int /*long*/ hFirstItem = OS.SendMessage (handle, OS.TVM_GETNEXTITEM, OS.TVGN_CHILD, hItem);
select (hFirstItem, tvItem);
hItem = OS.SendMessage (handle, OS.TVM_GETNEXTITEM, OS.TVGN_NEXT, hItem);
}
@@ -4012,10 +4022,10 @@ public void selectAll () {
tvItem.mask = OS.TVIF_HANDLE | OS.TVIF_STATE;
tvItem.state = OS.TVIS_SELECTED;
tvItem.stateMask = OS.TVIS_SELECTED;
- int oldProc = OS.GetWindowLong (handle, OS.GWL_WNDPROC);
- OS.SetWindowLong (handle, OS.GWL_WNDPROC, TreeProc);
+ int /*long*/ oldProc = OS.GetWindowLongPtr (handle, OS.GWLP_WNDPROC);
+ OS.SetWindowLongPtr (handle, OS.GWLP_WNDPROC, TreeProc);
if ((style & SWT.VIRTUAL) != 0) {
- int hItem = OS.SendMessage (handle, OS.TVM_GETNEXTITEM, OS.TVGN_ROOT, 0);
+ int /*long*/ hItem = OS.SendMessage (handle, OS.TVM_GETNEXTITEM, OS.TVGN_ROOT, 0);
select (hItem, tvItem);
} else {
for (int i=0; i<items.length; i++) {
@@ -4026,10 +4036,10 @@ public void selectAll () {
}
}
}
- OS.SetWindowLong (handle, OS.GWL_WNDPROC, oldProc);
+ OS.SetWindowLongPtr (handle, OS.GWLP_WNDPROC, oldProc);
}
-void setBackgroundImage (int hBitmap) {
+void setBackgroundImage (int /*long*/ hBitmap) {
super.setBackgroundImage (hBitmap);
if (hBitmap != 0) {
/*
@@ -4104,7 +4114,7 @@ void setBounds (int x, int y, int width, int height, int flags) {
}
super.setBounds (x, y, width, height, flags);
if (fixSelection) {
- int hItem = OS.SendMessage (handle, OS.TVM_GETNEXTITEM, OS.TVGN_CARET, 0);
+ int /*long*/ hItem = OS.SendMessage (handle, OS.TVM_GETNEXTITEM, OS.TVGN_CARET, 0);
if (hItem != 0) showItem (hItem);
}
}
@@ -4120,7 +4130,7 @@ void setCursor () {
* is IDC_ARROW.
*/
Cursor cursor = findCursor ();
- int hCursor = cursor == null ? OS.LoadCursor (0, OS.IDC_ARROW) : cursor.handle;
+ int /*long*/ hCursor = cursor == null ? OS.LoadCursor (0, OS.IDC_ARROW) : cursor.handle;
OS.SetCursor (hCursor);
}
@@ -4153,7 +4163,7 @@ public void setColumnOrder (int [] order) {
if (order == null) error (SWT.ERROR_NULL_ARGUMENT);
int count = 0;
if (hwndHeader != 0) {
- count = OS.SendMessage (hwndHeader, OS.HDM_GETITEMCOUNT, 0, 0);
+ count = (int)/*64*/OS.SendMessage (hwndHeader, OS.HDM_GETITEMCOUNT, 0, 0);
}
if (count == 0) {
if (order.length != 0) error (SWT.ERROR_INVALID_ARGUMENT);
@@ -4205,7 +4215,7 @@ void setCheckboxImageList () {
if (OS.COMCTL32_MAJOR >= 6 && OS.IsAppThemed ()) {
flags |= OS.ILC_COLOR32;
} else {
- int hDC = OS.GetDC (handle);
+ int /*long*/ hDC = OS.GetDC (handle);
int bits = OS.GetDeviceCaps (hDC, OS.BITSPIXEL);
int planes = OS.GetDeviceCaps (hDC, OS.PLANES);
OS.ReleaseDC (handle, hDC);
@@ -4222,12 +4232,12 @@ void setCheckboxImageList () {
}
}
if ((style & SWT.RIGHT_TO_LEFT) != 0) flags |= OS.ILC_MIRROR;
- int height = OS.SendMessage (handle, OS.TVM_GETITEMHEIGHT, 0, 0), width = height;
- int hStateList = OS.ImageList_Create (width, height, flags, count, count);
- int hDC = OS.GetDC (handle);
- int memDC = OS.CreateCompatibleDC (hDC);
- int hBitmap = OS.CreateCompatibleBitmap (hDC, width * count, height);
- int hOldBitmap = OS.SelectObject (memDC, hBitmap);
+ 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);
RECT rect = new RECT ();
OS.SetRect (rect, 0, 0, width * count, height);
/*
@@ -4247,10 +4257,10 @@ void setCheckboxImageList () {
clrBackground = 0x0200FF00;
}
}
- int hBrush = OS.CreateSolidBrush (clrBackground);
+ int /*long*/ hBrush = OS.CreateSolidBrush (clrBackground);
OS.FillRect (memDC, rect, hBrush);
OS.DeleteObject (hBrush);
- int oldFont = OS.SelectObject (hDC, defaultFont ());
+ int /*long*/ oldFont = OS.SelectObject (hDC, defaultFont ());
TEXTMETRIC tm = OS.IsUnicode ? (TEXTMETRIC) new TEXTMETRICW () : new TEXTMETRICA ();
OS.GetTextMetrics (hDC, tm);
OS.SelectObject (hDC, oldFont);
@@ -4259,7 +4269,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 hTheme = display.hButtonTheme ();
+ int /*long*/ 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);
@@ -4285,7 +4295,7 @@ void setCheckboxImageList () {
OS.ImageList_AddMasked (hStateList, hBitmap, clrBackground);
}
OS.DeleteObject (hBitmap);
- int hOldStateList = OS.SendMessage (handle, OS.TVM_GETIMAGELIST, OS.TVSIL_STATE, 0);
+ int /*long*/ 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);
}
@@ -4370,10 +4380,10 @@ public void setRedraw (boolean redraw) {
* when redraw is turned on and there are no items in
* the tree.
*/
- int hItem = 0;
+ int /*long*/ hItem = 0;
if (redraw) {
if (drawCount == 1) {
- int count = OS.SendMessage (handle, OS.TVM_GETCOUNT, 0, 0);
+ int count = (int)/*64*/OS.SendMessage (handle, OS.TVM_GETCOUNT, 0, 0);
if (count == 0) {
TVINSERTSTRUCT tvInsert = new TVINSERTSTRUCT ();
tvInsert.hInsertAfter = OS.TVI_FIRST;
@@ -4397,7 +4407,7 @@ void setScrollWidth () {
if (hwndHeader == 0 || hwndParent == 0) return;
int width = 0;
HDITEM hdItem = new HDITEM ();
- int count = OS.SendMessage (hwndHeader, OS.HDM_GETITEMCOUNT, 0, 0);
+ int count = (int)/*64*/OS.SendMessage (hwndHeader, OS.HDM_GETITEMCOUNT, 0, 0);
for (int i=0; i<count; i++) {
hdItem.mask = OS.HDI_WIDTH;
OS.SendMessage (hwndHeader, OS.HDM_GETITEM, i, hdItem);
@@ -4415,7 +4425,7 @@ void setScrollWidth (int width) {
SCROLLINFO info = new SCROLLINFO ();
info.cbSize = SCROLLINFO.sizeof;
info.fMask = OS.SIF_RANGE | OS.SIF_PAGE;
- int count = OS.SendMessage (hwndHeader, OS.HDM_GETITEMCOUNT, 0, 0);
+ int count = (int)/*64*/OS.SendMessage (hwndHeader, OS.HDM_GETITEMCOUNT, 0, 0);
if (count == 0 && width == 0) {
OS.GetScrollInfo (hwndParent, OS.SB_HORZ, info);
info.nPage = info.nMax + 1;
@@ -4438,7 +4448,7 @@ void setScrollWidth (int width) {
horizontalBar.setPageIncrement (info.nPage);
}
OS.GetClientRect (hwndParent, rect);
- int hHeap = OS.GetProcessHeap ();
+ int /*long*/ 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);
@@ -4459,7 +4469,7 @@ void setScrollWidth (int width) {
ignoreResize = oldIgnore;
}
-void setSelection (int hItem, TVITEM tvItem, TreeItem [] selection) {
+void setSelection (int /*long*/ hItem, TVITEM tvItem, TreeItem [] selection) {
while (hItem != 0) {
int index = 0;
while (index < selection.length) {
@@ -4480,7 +4490,7 @@ void setSelection (int hItem, TVITEM tvItem, TreeItem [] selection) {
OS.SendMessage (handle, OS.TVM_SETITEM, 0, tvItem);
}
}
- int hFirstItem = OS.SendMessage (handle, OS.TVM_GETNEXTITEM, OS.TVGN_CHILD, hItem);
+ int /*long*/ 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);
}
@@ -4547,8 +4557,8 @@ public void setSelection (TreeItem [] items) {
TreeItem item = items [0];
if (item != null) {
if (item.isDisposed ()) error (SWT.ERROR_INVALID_ARGUMENT);
- int hOldItem = OS.SendMessage (handle, OS.TVM_GETNEXTITEM, OS.TVGN_CARET, 0);
- int hNewItem = hAnchor = item.handle;
+ int /*long*/ hOldItem = OS.SendMessage (handle, OS.TVM_GETNEXTITEM, OS.TVGN_CARET, 0);
+ int /*long*/ hNewItem = hAnchor = item.handle;
/*
* Bug in Windows. When TVM_SELECTITEM is used to select and
@@ -4572,7 +4582,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 hParent = OS.SendMessage (handle, OS.TVM_GETNEXTITEM, OS.TVGN_PARENT, hNewItem);
+ int /*long*/ 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) {
@@ -4603,10 +4613,10 @@ public void setSelection (TreeItem [] items) {
TVITEM tvItem = new TVITEM ();
tvItem.mask = OS.TVIF_HANDLE | OS.TVIF_STATE;
tvItem.stateMask = OS.TVIS_SELECTED;
- int oldProc = OS.GetWindowLong (handle, OS.GWL_WNDPROC);
- OS.SetWindowLong (handle, OS.GWL_WNDPROC, TreeProc);
+ int /*long*/ oldProc = OS.GetWindowLongPtr (handle, OS.GWLP_WNDPROC);
+ OS.SetWindowLongPtr (handle, OS.GWLP_WNDPROC, TreeProc);
if ((style & SWT.VIRTUAL) != 0) {
- int hItem = OS.SendMessage (handle, OS.TVM_GETNEXTITEM, OS.TVGN_ROOT, 0);
+ int /*long*/ 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++) {
@@ -4633,7 +4643,7 @@ public void setSelection (TreeItem [] items) {
}
}
}
- OS.SetWindowLong (handle, OS.GWL_WNDPROC, oldProc);
+ OS.SetWindowLongPtr (handle, OS.GWLP_WNDPROC, oldProc);
}
/**
@@ -4711,8 +4721,8 @@ public void setTopItem (TreeItem item) {
checkWidget ();
if (item == null) SWT.error (SWT.ERROR_NULL_ARGUMENT);
if (item.isDisposed ()) SWT.error (SWT.ERROR_INVALID_ARGUMENT);
- int hItem = item.handle;
- int hTopItem = OS.SendMessage (handle, OS.TVM_GETNEXTITEM, OS.TVGN_FIRSTVISIBLE, 0);
+ int /*long*/ hItem = item.handle;
+ int /*long*/ hTopItem = OS.SendMessage (handle, OS.TVM_GETNEXTITEM, OS.TVGN_FIRSTVISIBLE, 0);
if (hItem == hTopItem) return;
boolean fixScroll = checkScroll (hItem), redraw = false;
if (fixScroll) {
@@ -4723,7 +4733,7 @@ public void setTopItem (TreeItem item) {
if (redraw) OS.DefWindowProc (handle, OS.WM_SETREDRAW, 0, 0);
}
OS.SendMessage (handle, OS.TVM_SELECTITEM, OS.TVGN_FIRSTVISIBLE, hItem);
- int hParent = OS.SendMessage (handle, OS.TVM_GETNEXTITEM, OS.TVGN_PARENT, hItem);
+ int /*long*/ hParent = OS.SendMessage (handle, OS.TVM_GETNEXTITEM, OS.TVGN_PARENT, hItem);
if (hParent == 0) OS.SendMessage (handle, OS.WM_HSCROLL, OS.SB_TOP, 0);
if (fixScroll) {
OS.DefWindowProc (handle, OS.WM_SETREDRAW, 1, 0);
@@ -4737,7 +4747,7 @@ public void setTopItem (TreeItem item) {
updateScrollBar ();
}
-void showItem (int hItem) {
+void showItem (int /*long*/ hItem) {
/*
* Bug in Windows. When TVM_ENSUREVISIBLE is used to ensure
* that an item is visible and the client area of the tree is
@@ -4841,7 +4851,7 @@ public void showColumn (TreeColumn column) {
if (column.parent != this) return;
int index = indexOf (column);
if (index == -1) return;
- int count = OS.SendMessage (hwndHeader, OS.HDM_GETITEMCOUNT, 0, 0);
+ int count = (int)/*64*/OS.SendMessage (hwndHeader, OS.HDM_GETITEMCOUNT, 0, 0);
if (0 <= index && index < count) {
if (hwndParent != 0) {
forceResize ();
@@ -4906,7 +4916,7 @@ public void showItem (TreeItem item) {
*/
public void showSelection () {
checkWidget ();
- int hItem = 0;
+ int /*long*/ hItem = 0;
if ((style & SWT.SINGLE) != 0) {
hItem = OS.SendMessage (handle, OS.TVM_GETNEXTITEM, OS.TVGN_CARET, 0);
if (hItem == 0) return;
@@ -4918,19 +4928,19 @@ public void showSelection () {
OS.SendMessage (handle, OS.TVM_GETITEM, 0, tvItem);
state = tvItem.state;
} else {
- state = OS.SendMessage (handle, OS.TVM_GETITEMSTATE, hItem, OS.TVIS_SELECTED);
+ state = (int)/*64*/OS.SendMessage (handle, OS.TVM_GETITEMSTATE, hItem, OS.TVIS_SELECTED);
}
if ((state & OS.TVIS_SELECTED) == 0) return;
} else {
- int oldProc = OS.GetWindowLong (handle, OS.GWL_WNDPROC);
- OS.SetWindowLong (handle, OS.GWL_WNDPROC, TreeProc);
+ int /*long*/ oldProc = OS.GetWindowLongPtr (handle, OS.GWLP_WNDPROC);
+ OS.SetWindowLongPtr (handle, OS.GWLP_WNDPROC, TreeProc);
TVITEM tvItem = null;
if (OS.IsWinCE) {
tvItem = new TVITEM ();
tvItem.mask = OS.TVIF_STATE;
}
if ((style & SWT.VIRTUAL) != 0) {
- int hRoot = OS.SendMessage (handle, OS.TVM_GETNEXTITEM, OS.TVGN_ROOT, 0);
+ int /*long*/ 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
@@ -4944,7 +4954,7 @@ public void showSelection () {
OS.SendMessage (handle, OS.TVM_GETITEM, 0, tvItem);
state = tvItem.state;
} else {
- state = OS.SendMessage (handle, OS.TVM_GETITEMSTATE, item.handle, OS.TVIS_SELECTED);
+ state = (int)/*64*/OS.SendMessage (handle, OS.TVM_GETITEMSTATE, item.handle, OS.TVIS_SELECTED);
}
if ((state & OS.TVIS_SELECTED) != 0) {
hItem = item.handle;
@@ -4954,7 +4964,7 @@ public void showSelection () {
index++;
}
}
- OS.SetWindowLong (handle, OS.GWL_WNDPROC, oldProc);
+ OS.SetWindowLongPtr (handle, OS.GWLP_WNDPROC, oldProc);
}
if (hItem != 0) showItem (hItem);
}
@@ -4965,8 +4975,8 @@ public void showSelection () {
sort (OS.TVI_ROOT, false);
}
-void sort (int hParent, boolean all) {
- int itemCount = OS.SendMessage (handle, OS.TVM_GETCOUNT, 0, 0);
+void sort (int /*long*/ hParent, boolean all) {
+ int itemCount = (int)/*64*/OS.SendMessage (handle, OS.TVM_GETCOUNT, 0, 0);
if (itemCount == 0 || itemCount == 1) return;
hFirstIndexOf = hLastIndexOf = 0;
itemCount = -1;
@@ -4974,7 +4984,7 @@ void sort (int hParent, boolean all) {
OS.SendMessage (handle, OS.TVM_SORTCHILDREN, all ? 1 : 0, hParent);
} else {
Callback compareCallback = new Callback (this, "CompareFunc", 3);
- int lpfnCompare = compareCallback.getAddress ();
+ int /*long*/ lpfnCompare = compareCallback.getAddress ();
TVSORTCB psort = new TVSORTCB ();
psort.hParent = hParent;
psort.lpfnCompare = lpfnCompare;
@@ -4987,15 +4997,15 @@ void sort (int hParent, boolean all) {
void subclass () {
super.subclass ();
if (hwndHeader != 0) {
- OS.SetWindowLong (hwndHeader, OS.GWL_WNDPROC, display.windowProc);
+ OS.SetWindowLongPtr (hwndHeader, OS.GWLP_WNDPROC, display.windowProc);
}
}
String toolTipText (NMTTDISPINFO hdr) {
- int hwndToolTip = OS.SendMessage (handle, OS.TVM_GETTOOLTIPS, 0, 0);
+ int /*long*/ hwndToolTip = OS.SendMessage (handle, OS.TVM_GETTOOLTIPS, 0, 0);
if (hwndToolTip == hdr.hwndFrom && toolTipText != null) return ""; //$NON-NLS-1$
if (headerToolTipHandle == hdr.hwndFrom) {
- int count = OS.SendMessage (hwndHeader, OS.HDM_GETITEMCOUNT, 0, 0);
+ int count = (int)/*64*/OS.SendMessage (hwndHeader, OS.HDM_GETITEMCOUNT, 0, 0);
for (int i=0; i<count; i++) {
TreeColumn column = columns [i];
if (column.id == hdr.idFrom) return column.toolTipText;
@@ -5014,19 +5024,19 @@ String toolTipText (NMTTDISPINFO hdr) {
lpht.y = pt.y;
OS.SendMessage (handle, OS.TVM_HITTEST, 0, lpht);
if (lpht.hItem != 0) {
- int hDC = OS.GetDC (handle);
- int oldFont = 0, newFont = OS.SendMessage (handle, OS.WM_GETFONT, 0, 0);
+ int /*long*/ hDC = OS.GetDC (handle);
+ int /*long*/ oldFont = 0, newFont = OS.SendMessage (handle, OS.WM_GETFONT, 0, 0);
if (newFont != 0) oldFont = OS.SelectObject (hDC, newFont);
RECT rect = new RECT ();
OS.GetClientRect (hwndParent, rect);
OS.MapWindowPoints (hwndParent, handle, rect, 2);
TreeItem item = _getItem (lpht.hItem);
String text = null;
- int index = 0, count = Math.max (1, OS.SendMessage (hwndHeader, OS.HDM_GETITEMCOUNT, 0, 0));
+ int index = 0, count = Math.max (1, (int)/*64*/OS.SendMessage (hwndHeader, OS.HDM_GETITEMCOUNT, 0, 0));
int [] order = new int [count];
OS.SendMessage (hwndHeader, OS.HDM_GETORDERARRAY, count, order);
while (index < count) {
- int hFont = item.cellFont != null ? item.cellFont [order [index]] : -1;
+ int /*long*/ hFont = item.cellFont != null ? item.cellFont [order [index]] : -1;
if (hFont == -1) hFont = item.font;
if (hFont != -1) hFont = OS.SelectObject (hDC, hFont);
RECT cellRect = item.getBounds (order [index], true, false, true, false, true, hDC);
@@ -5056,7 +5066,7 @@ String toolTipText (NMTTDISPINFO hdr) {
return super.toolTipText (hdr);
}
-int topHandle () {
+int /*long*/ topHandle () {
return hwndParent != 0 ? hwndParent : handle;
}
@@ -5089,7 +5099,7 @@ void updateHeaderToolTips () {
lpti.uFlags = OS.TTF_SUBCLASS;
lpti.hwnd = hwndHeader;
lpti.lpszText = OS.LPSTR_TEXTCALLBACK;
- int count = OS.SendMessage (hwndHeader, OS.HDM_GETITEMCOUNT, 0, 0);
+ int count = (int)/*64*/OS.SendMessage (hwndHeader, OS.HDM_GETITEMCOUNT, 0, 0);
for (int i=0; i<count; i++) {
TreeColumn column = columns [i];
if (OS.SendMessage (hwndHeader, OS.HDM_GETITEMRECT, i, rect) != 0) {
@@ -5106,7 +5116,7 @@ void updateHeaderToolTips () {
void updateImageList () {
if (imageList == null) return;
if (hwndHeader == 0) return;
- int i = 0, index = OS.SendMessage (hwndHeader, OS.HDM_ORDERTOINDEX, 0, 0);
+ int i = 0, index = (int)/*64*/OS.SendMessage (hwndHeader, OS.HDM_ORDERTOINDEX, 0, 0);
while (i < items.length) {
TreeItem item = items [i];
if (item != null) {
@@ -5126,8 +5136,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 hImageList = i == items.length ? 0 : imageList.getHandle ();
- int hOldImageList = OS.SendMessage (handle, OS.TVM_GETIMAGELIST, OS.TVSIL_NORMAL, 0);
+ int /*long*/ hImageList = i == items.length ? 0 : imageList.getHandle ();
+ int /*long*/ hOldImageList = OS.SendMessage (handle, OS.TVM_GETIMAGELIST, OS.TVSIL_NORMAL, 0);
if (hImageList != hOldImageList) {
OS.SendMessage (handle, OS.TVM_SETIMAGELIST, OS.TVSIL_NORMAL, hImageList);
}
@@ -5148,12 +5158,12 @@ void updateImages () {
void updateScrollBar () {
if (hwndParent != 0) {
- int columnCount = OS.SendMessage (hwndHeader, OS.HDM_GETITEMCOUNT, 0, 0);
+ int columnCount = (int)/*64*/OS.SendMessage (hwndHeader, OS.HDM_GETITEMCOUNT, 0, 0);
if (columnCount != 0 || scrollWidth != 0) {
SCROLLINFO info = new SCROLLINFO ();
info.cbSize = SCROLLINFO.sizeof;
info.fMask = OS.SIF_ALL;
- int itemCount = OS.SendMessage (handle, OS.TVM_GETCOUNT, 0, 0);
+ int itemCount = (int)/*64*/OS.SendMessage (handle, OS.TVM_GETCOUNT, 0, 0);
if (itemCount == 0) {
OS.GetScrollInfo (hwndParent, OS.SB_VERT, info);
info.nPage = info.nMax + 1;
@@ -5170,7 +5180,7 @@ void updateScrollBar () {
void unsubclass () {
super.unsubclass ();
if (hwndHeader != 0) {
- OS.SetWindowLong (hwndHeader, OS.GWL_WNDPROC, HeaderProc);
+ OS.SetWindowLongPtr (hwndHeader, OS.GWLP_WNDPROC, HeaderProc);
}
}
@@ -5194,11 +5204,11 @@ TCHAR windowClass () {
return TreeClass;
}
-int windowProc () {
+int /*long*/ windowProc () {
return TreeProc;
}
-int windowProc (int hwnd, int msg, int wParam, int lParam) {
+int /*long*/ windowProc (int /*long*/ hwnd, int msg, int /*long*/ wParam, int /*long*/ lParam) {
if (hwndHeader != 0 && hwnd == hwndHeader) {
switch (msg) {
/* This code is intentionally commented */
@@ -5263,8 +5273,8 @@ int windowProc (int hwnd, int msg, int wParam, int lParam) {
OS.ScreenToClient (hwnd, pt);
pinfo.x = pt.x;
pinfo.y = pt.y;
- int columnCount = OS.SendMessage (hwndHeader, OS.HDM_GETITEMCOUNT, 0, 0);
- int index = OS.SendMessage (hwndHeader, OS.HDM_HITTEST, 0, pinfo);
+ int columnCount = (int)/*64*/OS.SendMessage (hwndHeader, OS.HDM_GETITEMCOUNT, 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) {
OS.SetCursor (OS.LoadCursor (0, OS.IDC_ARROW));
@@ -5288,7 +5298,7 @@ int windowProc (int hwnd, int msg, int wParam, int lParam) {
setScrollWidth ();
if (ignoreResize) return 0;
setResizeChildren (false);
- int code = callWindowProc (hwnd, OS.WM_SIZE, wParam, lParam);
+ int /*long*/ code = callWindowProc (hwnd, OS.WM_SIZE, wParam, lParam);
sendEvent (SWT.Resize);
if (isDisposed ()) return 0;
if (layout != null) {
@@ -5347,7 +5357,7 @@ int windowProc (int hwnd, int msg, int wParam, int lParam) {
}
}
OS.SetScrollInfo (handle, OS.SB_VERT, info, true);
- int code = OS.SendMessage (handle, OS.WM_VSCROLL, wParam, lParam);
+ int /*long*/ 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;
@@ -5358,7 +5368,7 @@ int windowProc (int hwnd, int msg, int wParam, int lParam) {
return super.windowProc (hwnd, msg, wParam, lParam);
}
-LRESULT WM_CHAR (int wParam, int lParam) {
+LRESULT WM_CHAR (int /*long*/ wParam, int /*long*/ lParam) {
LRESULT result = super.WM_CHAR (wParam, lParam);
if (result != null) return result;
/*
@@ -5370,9 +5380,9 @@ LRESULT WM_CHAR (int wParam, int lParam) {
* The fix is to avoid calling the tree window
* proc in these cases.
*/
- switch (wParam) {
+ switch ((int)/*64*/wParam) {
case ' ': {
- int hItem = OS.SendMessage (handle, OS.TVM_GETNEXTITEM, OS.TVGN_CARET, 0);
+ int /*long*/ hItem = OS.SendMessage (handle, OS.TVM_GETNEXTITEM, OS.TVGN_CARET, 0);
if (hItem != 0) {
hAnchor = hItem;
OS.SendMessage (handle, OS.TVM_ENSUREVISIBLE, 0, hItem);
@@ -5391,11 +5401,11 @@ LRESULT WM_CHAR (int wParam, int lParam) {
tvItem.state = state << 12;
OS.SendMessage (handle, OS.TVM_SETITEM, 0, tvItem);
if (!OS.IsWinCE) {
- int id = hItem;
+ int /*long*/ id = hItem;
if (OS.COMCTL32_MAJOR >= 6) {
id = OS.SendMessage (handle, OS.TVM_MAPHTREEITEMTOACCID, hItem, 0);
}
- OS.NotifyWinEvent (OS.EVENT_OBJECT_FOCUS, handle, OS.OBJID_CLIENT, id);
+ OS.NotifyWinEvent (OS.EVENT_OBJECT_FOCUS, handle, OS.OBJID_CLIENT, (int)/*64*/id);
}
}
tvItem.stateMask = OS.TVIS_SELECTED;
@@ -5433,7 +5443,7 @@ LRESULT WM_CHAR (int wParam, int lParam) {
* using NM_RETURN.
*/
Event event = new Event ();
- int hItem = OS.SendMessage (handle, OS.TVM_GETNEXTITEM, OS.TVGN_CARET, 0);
+ int /*long*/ hItem = OS.SendMessage (handle, OS.TVM_GETNEXTITEM, OS.TVGN_CARET, 0);
if (hItem != 0) event.item = _getItem (hItem);
postEvent (SWT.DefaultSelection, event);
return LRESULT.ZERO;
@@ -5444,14 +5454,14 @@ LRESULT WM_CHAR (int wParam, int lParam) {
return result;
}
-LRESULT WM_ERASEBKGND (int wParam, int lParam) {
+LRESULT WM_ERASEBKGND (int /*long*/ wParam, int /*long*/ 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 wParam, int lParam) {
+LRESULT WM_GETOBJECT (int /*long*/ wParam, int /*long*/ lParam) {
/*
* Ensure that there is an accessible object created for this
* control because support for checked item and tree column
@@ -5464,10 +5474,10 @@ LRESULT WM_GETOBJECT (int wParam, int lParam) {
return super.WM_GETOBJECT (wParam, lParam);
}
-LRESULT WM_KEYDOWN (int wParam, int lParam) {
+LRESULT WM_KEYDOWN (int /*long*/ wParam, int /*long*/ lParam) {
LRESULT result = super.WM_KEYDOWN (wParam, lParam);
if (result != null) return result;
- switch (wParam) {
+ switch ((int)/*64*/wParam) {
case OS.VK_SPACE:
/*
* Ensure that the window proc does not process VK_SPACE
@@ -5479,7 +5489,7 @@ LRESULT WM_KEYDOWN (int wParam, int lParam) {
case OS.VK_ADD:
if (OS.GetKeyState (OS.VK_CONTROL) < 0) {
if (hwndHeader != 0) {
- int count = OS.SendMessage (hwndHeader, OS.HDM_GETITEMCOUNT, 0, 0);
+ int count = (int)/*64*/OS.SendMessage (hwndHeader, OS.HDM_GETITEMCOUNT, 0, 0);
TreeColumn [] newColumns = new TreeColumn [count];
System.arraycopy (columns, 0, newColumns, 0, count);
for (int i=0; i<count; i++) {
@@ -5500,17 +5510,17 @@ LRESULT WM_KEYDOWN (int wParam, int lParam) {
OS.SendMessage (handle, OS.WM_CHANGEUISTATE, OS.UIS_INITIALIZE, 0);
if ((style & SWT.SINGLE) != 0) break;
if (OS.GetKeyState (OS.VK_SHIFT) < 0) {
- int hItem = OS.SendMessage (handle, OS.TVM_GETNEXTITEM, OS.TVGN_CARET, 0);
+ int /*long*/ hItem = OS.SendMessage (handle, OS.TVM_GETNEXTITEM, OS.TVGN_CARET, 0);
if (hItem != 0) {
if (hAnchor == 0) hAnchor = hItem;
ignoreSelect = ignoreDeselect = true;
- int code = callWindowProc (handle, OS.WM_KEYDOWN, wParam, lParam);
+ int /*long*/ code = callWindowProc (handle, OS.WM_KEYDOWN, wParam, lParam);
ignoreSelect = ignoreDeselect = false;
- int hNewItem = OS.SendMessage (handle, OS.TVM_GETNEXTITEM, OS.TVGN_CARET, 0);
+ int /*long*/ 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 hDeselectItem = hItem;
+ int /*long*/ hDeselectItem = hItem;
RECT rect1 = new RECT ();
OS.TreeView_GetItemRect (handle, hAnchor, rect1, false);
RECT rect2 = new RECT ();
@@ -5521,7 +5531,7 @@ LRESULT WM_KEYDOWN (int wParam, int lParam) {
OS.SendMessage (handle, OS.TVM_SETITEM, 0, tvItem);
hDeselectItem = OS.SendMessage (handle, OS.TVM_GETNEXTITEM, flags, hDeselectItem);
}
- int hSelectItem = hAnchor;
+ int /*long*/ hSelectItem = hAnchor;
OS.TreeView_GetItemRect (handle, hNewItem, rect1, false);
OS.TreeView_GetItemRect (handle, hSelectItem, rect2, false);
tvItem.state = OS.TVIS_SELECTED;
@@ -5543,7 +5553,7 @@ LRESULT WM_KEYDOWN (int wParam, int lParam) {
}
}
if (OS.GetKeyState (OS.VK_CONTROL) < 0) {
- int hItem = OS.SendMessage (handle, OS.TVM_GETNEXTITEM, OS.TVGN_CARET, 0);
+ int /*long*/ 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;
@@ -5551,8 +5561,8 @@ LRESULT WM_KEYDOWN (int wParam, int lParam) {
tvItem.hItem = hItem;
OS.SendMessage (handle, OS.TVM_GETITEM, 0, tvItem);
boolean oldSelected = (tvItem.state & OS.TVIS_SELECTED) != 0;
- int hNewItem = 0;
- switch (wParam) {
+ int /*long*/ hNewItem = 0;
+ switch ((int)/*64*/wParam) {
case OS.VK_UP:
hNewItem = OS.SendMessage (handle, OS.TVM_GETNEXTITEM, OS.TVGN_PREVIOUSVISIBLE, hItem);
break;
@@ -5574,7 +5584,7 @@ LRESULT WM_KEYDOWN (int wParam, int lParam) {
OS.GetClientRect (handle, clientRect);
hNewItem = OS.SendMessage (handle, OS.TVM_GETNEXTITEM, OS.TVGN_FIRSTVISIBLE, 0);
do {
- int hVisible = OS.SendMessage (handle, OS.TVM_GETNEXTITEM, OS.TVGN_NEXTVISIBLE, hNewItem);
+ int /*long*/ 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;
@@ -5628,7 +5638,7 @@ LRESULT WM_KEYDOWN (int wParam, int lParam) {
}
}
}
- int code = callWindowProc (handle, OS.WM_KEYDOWN, wParam, lParam);
+ int /*long*/ code = callWindowProc (handle, OS.WM_KEYDOWN, wParam, lParam);
hAnchor = OS.SendMessage (handle, OS.TVM_GETNEXTITEM, OS.TVGN_CARET, 0);
return new LRESULT (code);
}
@@ -5636,7 +5646,7 @@ LRESULT WM_KEYDOWN (int wParam, int lParam) {
return result;
}
-LRESULT WM_KILLFOCUS (int wParam, int lParam) {
+LRESULT WM_KILLFOCUS (int /*long*/ wParam, int /*long*/ lParam) {
/*
* Bug in Windows. When a tree item that has an image
* with alpha is expanded or collapsed, the area where
@@ -5666,7 +5676,7 @@ LRESULT WM_KILLFOCUS (int wParam, int lParam) {
return super.WM_KILLFOCUS (wParam, lParam);
}
-LRESULT WM_LBUTTONDBLCLK (int wParam, int lParam) {
+LRESULT WM_LBUTTONDBLCLK (int /*long*/ wParam, int /*long*/ lParam) {
TVHITTESTINFO lpht = new TVHITTESTINFO ();
lpht.x = OS.GET_X_LPARAM (lParam);
lpht.y = OS.GET_Y_LPARAM (lParam);
@@ -5701,11 +5711,11 @@ LRESULT WM_LBUTTONDBLCLK (int wParam, int lParam) {
tvItem.state = state << 12;
OS.SendMessage (handle, OS.TVM_SETITEM, 0, tvItem);
if (!OS.IsWinCE) {
- int id = tvItem.hItem;
+ int /*long*/ id = tvItem.hItem;
if (OS.COMCTL32_MAJOR >= 6) {
id = OS.SendMessage (handle, OS.TVM_MAPHTREEITEMTOACCID, tvItem.hItem, 0);
}
- OS.NotifyWinEvent (OS.EVENT_OBJECT_FOCUS, handle, OS.OBJID_CLIENT, id);
+ OS.NotifyWinEvent (OS.EVENT_OBJECT_FOCUS, handle, OS.OBJID_CLIENT, (int)/*64*/id);
}
Event event = new Event ();
event.item = _getItem (tvItem.hItem, tvItem.lParam);
@@ -5727,7 +5737,7 @@ LRESULT WM_LBUTTONDBLCLK (int wParam, int lParam) {
return result;
}
-LRESULT WM_LBUTTONDOWN (int wParam, int lParam) {
+LRESULT WM_LBUTTONDOWN (int /*long*/ wParam, int /*long*/ lParam) {
/*
* In a multi-select tree, if the user is collapsing a subtree that
* contains selected items, clear the selection from these items and
@@ -5750,7 +5760,7 @@ LRESULT WM_LBUTTONDOWN (int wParam, int lParam) {
}
boolean fixSelection = false, deselected = false;
if (lpht.hItem != 0 && (style & SWT.MULTI) != 0) {
- int hSelection = OS.SendMessage (handle, OS.TVM_GETNEXTITEM, OS.TVGN_CARET, 0);
+ int /*long*/ hSelection = OS.SendMessage (handle, OS.TVM_GETNEXTITEM, OS.TVGN_CARET, 0);
if (hSelection != 0) {
TVITEM tvItem = new TVITEM ();
tvItem.mask = OS.TVIF_HANDLE | OS.TVIF_STATE;
@@ -5759,14 +5769,14 @@ LRESULT WM_LBUTTONDOWN (int wParam, int lParam) {
if ((tvItem.state & OS.TVIS_EXPANDED) != 0) {
fixSelection = true;
tvItem.stateMask = OS.TVIS_SELECTED;
- int hNext = OS.SendMessage (handle, OS.TVM_GETNEXTITEM, OS.TVGN_NEXTVISIBLE, lpht.hItem);
+ int /*long*/ hNext = OS.SendMessage (handle, OS.TVM_GETNEXTITEM, OS.TVGN_NEXTVISIBLE, lpht.hItem);
while (hNext != 0) {
tvItem.hItem = hNext;
OS.SendMessage (handle, OS.TVM_GETITEM, 0, tvItem);
if ((tvItem.state & OS.TVIS_SELECTED) != 0) deselected = true;
tvItem.state = 0;
OS.SendMessage (handle, OS.TVM_SETITEM, 0, tvItem);
- int hItem = hNext = OS.SendMessage (handle, OS.TVM_GETNEXTITEM, OS.TVGN_NEXTVISIBLE, hNext);
+ int /*long*/ 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);
}
@@ -5777,7 +5787,7 @@ LRESULT WM_LBUTTONDOWN (int wParam, int lParam) {
}
dragStarted = gestureCompleted = false;
if (fixSelection) ignoreDeselect = ignoreSelect = lockSelection = true;
- int code = callWindowProc (handle, OS.WM_LBUTTONDOWN, wParam, lParam);
+ int /*long*/ code = callWindowProc (handle, OS.WM_LBUTTONDOWN, wParam, lParam);
if (fixSelection) ignoreDeselect = ignoreSelect = lockSelection = false;
if (dragStarted) {
if (!display.captureChanged && !isDisposed ()) {
@@ -5820,12 +5830,12 @@ LRESULT WM_LBUTTONDOWN (int wParam, int lParam) {
}
tvItem.state = state << 12;
OS.SendMessage (handle, OS.TVM_SETITEM, 0, tvItem);
- if (!OS.IsWinCE) {
- int id = tvItem.hItem;
+ if (!OS.IsWinCE) {
+ int /*long*/ id = tvItem.hItem;
if (OS.COMCTL32_MAJOR >= 6) {
id = OS.SendMessage (handle, OS.TVM_MAPHTREEITEMTOACCID, tvItem.hItem, 0);
}
- OS.NotifyWinEvent (OS.EVENT_OBJECT_FOCUS, handle, OS.OBJID_CLIENT, id);
+ OS.NotifyWinEvent (OS.EVENT_OBJECT_FOCUS, handle, OS.OBJID_CLIENT, (int)/*64*/id);
}
Event event = new Event ();
event.item = _getItem (tvItem.hItem, tvItem.lParam);
@@ -5846,7 +5856,7 @@ LRESULT WM_LBUTTONDOWN (int wParam, int lParam) {
}
return LRESULT.ZERO;
}
- int code = callWindowProc (handle, OS.WM_LBUTTONDOWN, wParam, lParam);
+ int /*long*/ code = callWindowProc (handle, OS.WM_LBUTTONDOWN, wParam, lParam);
if (!display.captureChanged && !isDisposed ()) {
if (OS.GetCapture () != handle) OS.SetCapture (handle);
}
@@ -5868,7 +5878,7 @@ LRESULT WM_LBUTTONDOWN (int wParam, int lParam) {
/* Get the selected state of the last selected item */
boolean redraw = false;
- int hOldItem = OS.SendMessage (handle, OS.TVM_GETNEXTITEM, OS.TVGN_CARET, 0);
+ int /*long*/ 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);
@@ -5898,7 +5908,7 @@ LRESULT WM_LBUTTONDOWN (int wParam, int lParam) {
* In SWT, the InvalidateRect() that causes the pixel corruption
* is found in Composite.WM_UPDATEUISTATE().
*/
- int uiState = OS.SendMessage (handle, OS.WM_QUERYUISTATE, 0, 0);
+ int uiState = (int)/*64*/OS.SendMessage (handle, OS.WM_QUERYUISTATE, 0, 0);
if ((uiState & OS.UISF_HIDEFOCUS) == 0) {
redraw = focused && drawCount == 0 && OS.IsWindowVisible (handle);
}
@@ -5923,8 +5933,8 @@ LRESULT WM_LBUTTONDOWN (int wParam, int lParam) {
hSelect = lpht.hItem;
dragStarted = gestureCompleted = false;
ignoreDeselect = ignoreSelect = true;
- int code = callWindowProc (handle, OS.WM_LBUTTONDOWN, wParam, lParam);
- int hNewItem = OS.SendMessage (handle, OS.TVM_GETNEXTITEM, OS.TVGN_CARET, 0);
+ int /*long*/ code = callWindowProc (handle, OS.WM_LBUTTONDOWN, wParam, lParam);
+ int /*long*/ hNewItem = OS.SendMessage (handle, OS.TVM_GETNEXTITEM, OS.TVGN_CARET, 0);
/*
* Feature in Windows. When the tree has the style
* TVS_FULLROWSELECT, the background color for the
@@ -6012,10 +6022,10 @@ LRESULT WM_LBUTTONDOWN (int wParam, int lParam) {
if ((wParam & OS.MK_CONTROL) == 0) {
if (!hittestSelected || !dragStarted) {
tvItem.state = 0;
- int oldProc = OS.GetWindowLong (handle, OS.GWL_WNDPROC);
- OS.SetWindowLong (handle, OS.GWL_WNDPROC, TreeProc);
+ int /*long*/ oldProc = OS.GetWindowLongPtr (handle, OS.GWLP_WNDPROC);
+ OS.SetWindowLongPtr (handle, OS.GWLP_WNDPROC, TreeProc);
if ((style & SWT.VIRTUAL) != 0) {
- int hItem = OS.SendMessage (handle, OS.TVM_GETNEXTITEM, OS.TVGN_ROOT, 0);
+ int /*long*/ hItem = OS.SendMessage (handle, OS.TVM_GETNEXTITEM, OS.TVGN_ROOT, 0);
deselect (hItem, tvItem, hNewItem);
} else {
for (int i=0; i<items.length; i++) {
@@ -6029,7 +6039,7 @@ LRESULT WM_LBUTTONDOWN (int wParam, int lParam) {
tvItem.hItem = hNewItem;
tvItem.state = OS.TVIS_SELECTED;
OS.SendMessage (handle, OS.TVM_SETITEM, 0, tvItem);
- OS.SetWindowLong (handle, OS.GWL_WNDPROC, oldProc);
+ OS.SetWindowLongPtr (handle, OS.GWLP_WNDPROC, oldProc);
if ((wParam & OS.MK_SHIFT) != 0) {
RECT rect1 = new RECT ();
if (hAnchor == 0) hAnchor = hNewItem;
@@ -6038,7 +6048,7 @@ LRESULT WM_LBUTTONDOWN (int wParam, int 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 hItem = tvItem.hItem = hAnchor;
+ int /*long*/ hItem = tvItem.hItem = hAnchor;
OS.SendMessage (handle, OS.TVM_SETITEM, 0, tvItem);
while (hItem != hNewItem) {
tvItem.hItem = hItem;
@@ -6084,7 +6094,7 @@ LRESULT WM_LBUTTONDOWN (int wParam, int lParam) {
return new LRESULT (code);
}
-LRESULT WM_MOUSEMOVE (int wParam, int lParam) {
+LRESULT WM_MOUSEMOVE (int /*long*/ wParam, int /*long*/ lParam) {
Display display = this.display;
LRESULT result = super.WM_MOUSEMOVE (wParam, lParam);
if (result != null) return result;
@@ -6103,8 +6113,8 @@ LRESULT WM_MOUSEMOVE (int wParam, int lParam) {
lpht.y = OS.GET_Y_LPARAM (lParam);
OS.SendMessage (handle, OS.TVM_HITTEST, 0, lpht);
if (lpht.hItem != 0) {
- int hDC = OS.GetDC (handle);
- int oldFont = 0, newFont = OS.SendMessage (handle, OS.WM_GETFONT, 0, 0);
+ int /*long*/ hDC = OS.GetDC (handle);
+ int /*long*/ oldFont = 0, newFont = OS.SendMessage (handle, OS.WM_GETFONT, 0, 0);
if (newFont != 0) oldFont = OS.SelectObject (hDC, newFont);
POINT pt = new POINT();
pt.x = lpht.x;
@@ -6113,11 +6123,11 @@ LRESULT WM_MOUSEMOVE (int wParam, int lParam) {
OS.GetClientRect (hwndParent, rect);
OS.MapWindowPoints (hwndParent, handle, rect, 2);
TreeItem item = _getItem (lpht.hItem);
- int index = 0, count = Math.max (1, OS.SendMessage (hwndHeader, OS.HDM_GETITEMCOUNT, 0, 0));
+ int index = 0, count = Math.max (1, (int)/*64*/OS.SendMessage (hwndHeader, OS.HDM_GETITEMCOUNT, 0, 0));
int [] order = new int [count];
OS.SendMessage (hwndHeader, OS.HDM_GETORDERARRAY, count, order);
while (index < count) {
- int hFont = item.cellFont != null ? item.cellFont [order [index]] : -1;
+ int /*long*/ hFont = item.cellFont != null ? item.cellFont [order [index]] : -1;
if (hFont == -1) hFont = item.font;
if (hFont != -1) hFont = OS.SelectObject (hDC, hFont);
RECT cellRect = item.getBounds (order [index], true, false, true, false, true, hDC);
@@ -6150,12 +6160,12 @@ LRESULT WM_MOUSEMOVE (int wParam, int lParam) {
return result;
}
-LRESULT WM_MOVE (int wParam, int lParam) {
+LRESULT WM_MOVE (int /*long*/ wParam, int /*long*/ lParam) {
if (ignoreResize) return null;
return super.WM_MOVE (wParam, lParam);
}
-LRESULT WM_RBUTTONDOWN (int wParam, int lParam) {
+LRESULT WM_RBUTTONDOWN (int /*long*/ wParam, int /*long*/ lParam) {
/*
* Feature in Windows. The receiver uses WM_RBUTTONDOWN
* to initiate a drag/drop operation depending on how the
@@ -6216,7 +6226,7 @@ LRESULT WM_RBUTTONDOWN (int wParam, int lParam) {
return LRESULT.ZERO;
}
-LRESULT WM_PAINT (int wParam, int lParam) {
+LRESULT WM_PAINT (int /*long*/ wParam, int /*long*/ lParam) {
if (shrink && !ignoreShrink) {
/* Resize the item array to fit the last item */
int count = items.length - 1;
@@ -6237,13 +6247,13 @@ LRESULT WM_PAINT (int wParam, int lParam) {
boolean doubleBuffer = true;
if (EXPLORER_THEME) {
if (!OS.IsWinCE && OS.WIN32_VERSION >= OS.VERSION (6, 0)) {
- int exStyle = OS.SendMessage (handle, OS.TVM_GETEXTENDEDSTYLE, 0, 0);
+ int exStyle = (int)/*64*/OS.SendMessage (handle, OS.TVM_GETEXTENDEDSTYLE, 0, 0);
if ((exStyle & OS.TVS_EX_DOUBLEBUFFER) != 0) doubleBuffer = false;
}
}
if (doubleBuffer) {
GC gc = null;
- int paintDC = 0;
+ int /*long*/ paintDC = 0;
PAINTSTRUCT ps = new PAINTSTRUCT ();
boolean hooksPaint = hooks (SWT.Paint);
if (hooksPaint) {
@@ -6258,12 +6268,12 @@ LRESULT WM_PAINT (int wParam, int lParam) {
int width = ps.right - ps.left;
int height = ps.bottom - ps.top;
if (width != 0 && height != 0) {
- int hDC = OS.CreateCompatibleDC (paintDC);
+ int /*long*/ 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 hBitmap = OS.CreateCompatibleBitmap (paintDC, width, height);
- int hOldBitmap = OS.SelectObject (hDC, hBitmap);
+ int /*long*/ hBitmap = OS.CreateCompatibleBitmap (paintDC, width, height);
+ int /*long*/ hOldBitmap = OS.SelectObject (hDC, hBitmap);
RECT rect = new RECT ();
OS.SetRect (rect, ps.left, ps.top, ps.right, ps.bottom);
drawBackground (hDC, rect);
@@ -6297,7 +6307,7 @@ LRESULT WM_PAINT (int wParam, int lParam) {
return super.WM_PAINT (wParam, lParam);
}
-LRESULT WM_PRINTCLIENT (int wParam, int lParam) {
+LRESULT WM_PRINTCLIENT (int /*long*/ wParam, int /*long*/ lParam) {
LRESULT result = super.WM_PRINTCLIENT (wParam, lParam);
if (result != null) return result;
/*
@@ -6311,12 +6321,12 @@ LRESULT WM_PRINTCLIENT (int wParam, int lParam) {
* is happening in WM_PRINTCLIENT, the redrawing is not visible.
*/
printClient = true;
- int code = callWindowProc (handle, OS.WM_PRINTCLIENT, wParam, lParam);
+ int /*long*/ code = callWindowProc (handle, OS.WM_PRINTCLIENT, wParam, lParam);
printClient = false;
return new LRESULT (code);
}
-LRESULT WM_SETFOCUS (int wParam, int lParam) {
+LRESULT WM_SETFOCUS (int /*long*/ wParam, int /*long*/ lParam) {
/*
* Bug in Windows. When a tree item that has an image
* with alpha is expanded or collapsed, the area where
@@ -6346,7 +6356,7 @@ LRESULT WM_SETFOCUS (int wParam, int lParam) {
return super.WM_SETFOCUS (wParam, lParam);
}
-LRESULT WM_SETFONT (int wParam, int lParam) {
+LRESULT WM_SETFONT (int /*long*/ wParam, int /*long*/ lParam) {
LRESULT result = super.WM_SETFONT (wParam, lParam);
if (result != null) return result;
if (hwndHeader != 0) {
@@ -6369,7 +6379,7 @@ LRESULT WM_SETFONT (int wParam, int lParam) {
return result;
}
-LRESULT WM_SETREDRAW (int wParam, int lParam) {
+LRESULT WM_SETREDRAW (int /*long*/ wParam, int /*long*/ lParam) {
LRESULT result = super.WM_SETREDRAW (wParam, lParam);
if (result != null) return result;
/*
@@ -6384,13 +6394,13 @@ LRESULT WM_SETREDRAW (int wParam, int lParam) {
* Windows Vista running under the theme manager.
*/
if (!OS.IsWinCE && OS.WIN32_VERSION >= OS.VERSION (6, 0)) {
- int code = OS.DefWindowProc (handle, OS.WM_SETREDRAW, wParam, lParam);
+ int /*long*/ code = OS.DefWindowProc (handle, OS.WM_SETREDRAW, wParam, lParam);
return code == 0 ? LRESULT.ZERO : new LRESULT (code);
}
return result;
}
-LRESULT WM_SIZE (int wParam, int lParam) {
+LRESULT WM_SIZE (int /*long*/ wParam, int /*long*/ lParam) {
/*
* Bug in Windows. When TVS_NOHSCROLL is set when the
* size of the tree is zero, the scroll bar is shown the
@@ -6419,7 +6429,7 @@ LRESULT WM_SIZE (int wParam, int lParam) {
return super.WM_SIZE (wParam, lParam);
}
-LRESULT WM_SYSCOLORCHANGE (int wParam, int lParam) {
+LRESULT WM_SYSCOLORCHANGE (int /*long*/ wParam, int /*long*/ lParam) {
LRESULT result = super.WM_SYSCOLORCHANGE (wParam, lParam);
if (result != null) return result;
/*
@@ -6435,7 +6445,7 @@ LRESULT WM_SYSCOLORCHANGE (int wParam, int lParam) {
return result;
}
-LRESULT wmColorChild (int wParam, int lParam) {
+LRESULT wmColorChild (int /*long*/ wParam, int /*long*/ lParam) {
if (findImageControl () != null) {
if (OS.COMCTL32_MAJOR < 6) {
return super.wmColorChild (wParam, lParam);
@@ -6452,7 +6462,7 @@ LRESULT wmColorChild (int wParam, int lParam) {
return null;
}
-LRESULT wmNotify (NMHDR hdr, int wParam, int lParam) {
+LRESULT wmNotify (NMHDR hdr, int /*long*/ wParam, int /*long*/ lParam) {
if (hdr.hwndFrom == itemToolTipHandle && hwndHeader != 0) {
if (!OS.IsWinCE) {
switch (hdr.code) {
@@ -6477,19 +6487,19 @@ LRESULT wmNotify (NMHDR hdr, int wParam, int lParam) {
lpht.y = pt.y;
OS.SendMessage (handle, OS.TVM_HITTEST, 0, lpht);
if (lpht.hItem != 0) {
- int hDC = OS.GetDC (handle);
- int oldFont = 0, newFont = OS.SendMessage (handle, OS.WM_GETFONT, 0, 0);
+ int /*long*/ hDC = OS.GetDC (handle);
+ int /*long*/ oldFont = 0, newFont = OS.SendMessage (handle, OS.WM_GETFONT, 0, 0);
if (newFont != 0) oldFont = OS.SelectObject (hDC, newFont);
LRESULT result = null;
RECT rect = new RECT ();
OS.GetClientRect (hwndParent, rect);
OS.MapWindowPoints (hwndParent, handle, rect, 2);
TreeItem item = _getItem (lpht.hItem);
- int index = 0, count = Math.max (1, OS.SendMessage (hwndHeader, OS.HDM_GETITEMCOUNT, 0, 0));
+ int index = 0, count = Math.max (1, (int)/*64*/OS.SendMessage (hwndHeader, OS.HDM_GETITEMCOUNT, 0, 0));
int [] order = new int [count];
OS.SendMessage (hwndHeader, OS.HDM_GETORDERARRAY, count, order);
while (index < count) {
- int hFont = item.cellFont != null ? item.cellFont [order [index]] : -1;
+ int /*long*/ hFont = item.cellFont != null ? item.cellFont [order [index]] : -1;
if (hFont == -1) hFont = item.font;
if (hFont != -1) hFont = OS.SelectObject (hDC, hFont);
RECT cellRect = item.getBounds (order [index], true, false, true, false, true, hDC);
@@ -6552,7 +6562,7 @@ LRESULT wmNotify (NMHDR hdr, int wParam, int lParam) {
}
case OS.NM_RELEASEDCAPTURE: {
if (!ignoreColumnMove) {
- int count = OS.SendMessage (hwndHeader, OS.HDM_GETITEMCOUNT, 0, 0);
+ int count = (int)/*64*/OS.SendMessage (hwndHeader, OS.HDM_GETITEMCOUNT, 0, 0);
for (int i=0; i<count; i++) {
TreeColumn column = columns [i];
column.updateToolTip (i);
@@ -6582,7 +6592,7 @@ LRESULT wmNotify (NMHDR hdr, int wParam, int lParam) {
HDITEM pitem = new HDITEM ();
OS.MoveMemory (pitem, phdn.pitem, HDITEM.sizeof);
if ((pitem.mask & OS.HDI_ORDER) != 0 && pitem.iOrder != -1) {
- int count = OS.SendMessage (hwndHeader, OS.HDM_GETITEMCOUNT, 0, 0);
+ int count = (int)/*64*/OS.SendMessage (hwndHeader, OS.HDM_GETITEMCOUNT, 0, 0);
int [] order = new int [count];
OS.SendMessage (hwndHeader, OS.HDM_GETORDERARRAY, count, order);
int index = 0;
@@ -6676,7 +6686,7 @@ LRESULT wmNotify (NMHDR hdr, int wParam, int lParam) {
column.updateToolTip (phdn.iItem);
column.sendEvent (SWT.Resize);
if (isDisposed ()) return LRESULT.ZERO;
- int count = OS.SendMessage (hwndHeader, OS.HDM_GETITEMCOUNT, 0, 0);
+ int count = (int)/*64*/OS.SendMessage (hwndHeader, OS.HDM_GETITEMCOUNT, 0, 0);
TreeColumn [] newColumns = new TreeColumn [count];
System.arraycopy (columns, 0, newColumns, 0, count);
int [] order = new int [count];
@@ -6721,7 +6731,7 @@ LRESULT wmNotify (NMHDR hdr, int wParam, int lParam) {
return super.wmNotify (hdr, wParam, lParam);
}
-LRESULT wmNotifyChild (NMHDR hdr, int wParam, int lParam) {
+LRESULT wmNotifyChild (NMHDR hdr, int /*long*/ wParam, int /*long*/ lParam) {
switch (hdr.code) {
case OS.TVN_GETDISPINFOA:
case OS.TVN_GETDISPINFOW: {
@@ -6749,7 +6759,7 @@ LRESULT wmNotifyChild (NMHDR hdr, int wParam, int lParam) {
*/
if (!ignoreShrink) {
if (items != null && lptvdi.lParam != -1) {
- if (items [lptvdi.lParam] != null && items [lptvdi.lParam].cached) {
+ if (items [(int)/*64*/lptvdi.lParam] != null && items [(int)/*64*/lptvdi.lParam].cached) {
checkVisible = false;
}
}
@@ -6778,7 +6788,7 @@ LRESULT wmNotifyChild (NMHDR hdr, int wParam, int lParam) {
* fix is to query the field from the item instead
* of using the struct.
*/
- int id = lptvdi.lParam;
+ int /*long*/ id = lptvdi.lParam;
if ((style & SWT.VIRTUAL) != 0) {
if (id == -1) {
TVITEM tvItem = new TVITEM ();
@@ -6814,7 +6824,7 @@ LRESULT wmNotifyChild (NMHDR hdr, int wParam, int lParam) {
}
int index = 0;
if (hwndHeader != 0) {
- index = OS.SendMessage (hwndHeader, OS.HDM_ORDERTOINDEX, 0, 0);
+ index = (int)/*64*/OS.SendMessage (hwndHeader, OS.HDM_ORDERTOINDEX, 0, 0);
}
if ((lptvdi.mask & OS.TVIF_TEXT) != 0) {
String string = null;
@@ -6928,12 +6938,11 @@ LRESULT wmNotifyChild (NMHDR hdr, int wParam, int lParam) {
if ((style & SWT.MULTI) != 0) {
if (lockSelection) {
/* Save the old selection state for both items */
- TVITEM tvItem = new TVITEM ();
- int offset1 = NMHDR.sizeof + 4;
- OS.MoveMemory (tvItem, lParam + offset1, TVITEM.sizeof);
+ NMTREEVIEW treeView = new NMTREEVIEW ();
+ OS.MoveMemory (treeView, lParam, NMTREEVIEW.sizeof);
+ TVITEM tvItem = treeView.itemOld;
oldSelected = (tvItem.state & OS.TVIS_SELECTED) != 0;
- int offset2 = NMHDR.sizeof + 4 + TVITEM.sizeof;
- OS.MoveMemory (tvItem, lParam + offset2, TVITEM.sizeof);
+ tvItem = treeView.itemNew;
newSelected = (tvItem.state & OS.TVIS_SELECTED) != 0;
}
}
@@ -6945,22 +6954,27 @@ LRESULT wmNotifyChild (NMHDR hdr, int wParam, int lParam) {
}
case OS.TVN_SELCHANGEDA:
case OS.TVN_SELCHANGEDW: {
+ NMTREEVIEW treeView = null;
if ((style & SWT.MULTI) != 0) {
if (lockSelection) {
/* Restore the old selection state of both items */
if (oldSelected) {
- TVITEM tvItem = new TVITEM ();
- int offset = NMHDR.sizeof + 4;
- OS.MoveMemory (tvItem, lParam + offset, TVITEM.sizeof);
+ if (treeView == null) {
+ treeView = new NMTREEVIEW ();
+ OS.MoveMemory (treeView, lParam, NMTREEVIEW.sizeof);
+ }
+ TVITEM tvItem = treeView.itemOld;
tvItem.mask = OS.TVIF_STATE;
tvItem.stateMask = OS.TVIS_SELECTED;
tvItem.state = OS.TVIS_SELECTED;
OS.SendMessage (handle, OS.TVM_SETITEM, 0, tvItem);
}
if (!newSelected && ignoreSelect) {
- TVITEM tvItem = new TVITEM ();
- int offset = NMHDR.sizeof + 4 + TVITEM.sizeof;
- OS.MoveMemory (tvItem, lParam + offset, TVITEM.sizeof);
+ if (treeView == null) {
+ treeView = new NMTREEVIEW ();
+ OS.MoveMemory (treeView, lParam, NMTREEVIEW.sizeof);
+ }
+ TVITEM tvItem = treeView.itemNew;
tvItem.mask = OS.TVIF_STATE;
tvItem.stateMask = OS.TVIS_SELECTED;
tvItem.state = 0;
@@ -6969,9 +6983,11 @@ LRESULT wmNotifyChild (NMHDR hdr, int wParam, int lParam) {
}
}
if (!ignoreSelect) {
- TVITEM tvItem = new TVITEM ();
- int offset = NMHDR.sizeof + 4 + TVITEM.sizeof;
- OS.MoveMemory (tvItem, lParam + offset, TVITEM.sizeof);
+ if (treeView == null) {
+ treeView = new NMTREEVIEW ();
+ OS.MoveMemory (treeView, lParam, NMTREEVIEW.sizeof);
+ }
+ TVITEM tvItem = treeView.itemNew;
hAnchor = tvItem.hItem;
Event event = new Event ();
event.item = _getItem (tvItem.hItem, tvItem.lParam);
@@ -6999,9 +7015,9 @@ LRESULT wmNotifyChild (NMHDR hdr, int wParam, int lParam) {
OS.SendMessage (handle, OS.TVM_SETINSERTMARK, 0, 0);
}
if (!ignoreExpand) {
- TVITEM tvItem = new TVITEM ();
- int offset = NMHDR.sizeof + 4 + TVITEM.sizeof;
- OS.MoveMemory (tvItem, lParam + offset, TVITEM.sizeof);
+ NMTREEVIEW treeView = new NMTREEVIEW ();
+ OS.MoveMemory (treeView, lParam, NMTREEVIEW.sizeof);
+ TVITEM tvItem = treeView.itemNew;
/*
* Feature in Windows. In some cases, TVM_ITEMEXPANDING
* is sent from within TVM_DELETEITEM for the tree item
@@ -7014,9 +7030,7 @@ LRESULT wmNotifyChild (NMHDR hdr, int wParam, int lParam) {
if (item == null) break;
Event event = new Event ();
event.item = item;
- int [] action = new int [1];
- OS.MoveMemory (action, lParam + NMHDR.sizeof, 4);
- switch (action [0]) {
+ switch (treeView.action) {
case OS.TVE_EXPAND:
/*
* Bug in Windows. When the numeric keypad asterisk
@@ -7042,7 +7056,7 @@ LRESULT wmNotifyChild (NMHDR hdr, int wParam, int lParam) {
* The fix is to detect this case and run the TVN_ITEMEXPANDED
* code in this method.
*/
- int hFirstItem = OS.SendMessage (handle, OS.TVM_GETNEXTITEM, OS.TVGN_CHILD, tvItem.hItem);
+ int /*long*/ hFirstItem = OS.SendMessage (handle, OS.TVM_GETNEXTITEM, OS.TVGN_CHILD, tvItem.hItem);
runExpanded = hFirstItem == 0;
}
if (!runExpanded) break;
@@ -7075,9 +7089,9 @@ LRESULT wmNotifyChild (NMHDR hdr, int wParam, int lParam) {
*/
if (!OS.IsWinCE && OS.COMCTL32_MAJOR >= 6) {
if (imageList != null) {
- TVITEM tvItem = new TVITEM ();
- int offset = NMHDR.sizeof + 4 + TVITEM.sizeof;
- OS.MoveMemory (tvItem, lParam + offset, TVITEM.sizeof);
+ NMTREEVIEW treeView = new NMTREEVIEW ();
+ OS.MoveMemory (treeView, lParam, NMTREEVIEW.sizeof);
+ TVITEM tvItem = treeView.itemNew;
if (tvItem.hItem != 0) {
int bits = OS.GetWindowLong (handle, OS.GWL_STYLE);
if ((bits & OS.TVS_FULLROWSELECT) == 0) {
@@ -7096,9 +7110,9 @@ LRESULT wmNotifyChild (NMHDR hdr, int wParam, int lParam) {
case OS.TVN_BEGINDRAGW:
case OS.TVN_BEGINRDRAGA:
case OS.TVN_BEGINRDRAGW: {
- TVITEM tvItem = new TVITEM ();
- int offset = NMHDR.sizeof + 4 + TVITEM.sizeof;
- OS.MoveMemory (tvItem, lParam + offset, TVITEM.sizeof);
+ NMTREEVIEW treeView = new NMTREEVIEW ();
+ OS.MoveMemory (treeView, lParam, NMTREEVIEW.sizeof);
+ TVITEM tvItem = treeView.itemNew;
if (tvItem.hItem != 0 && (tvItem.state & OS.TVIS_SELECTED) == 0) {
hSelect = tvItem.hItem;
ignoreSelect = ignoreDeselect = true;
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 44b1e0fad8..44872d822d 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
@@ -303,7 +303,7 @@ public int getWidth () {
checkWidget ();
int index = parent.indexOf (this);
if (index == -1) return 0;
- int hwndHeader = parent.hwndHeader;
+ int /*long*/ hwndHeader = parent.hwndHeader;
if (hwndHeader == 0) return 0;
HDITEM hdItem = new HDITEM ();
hdItem.mask = OS.HDI_WIDTH;
@@ -327,20 +327,20 @@ public void pack () {
int index = parent.indexOf (this);
if (index == -1) return;
int columnWidth = 0;
- int hwnd = parent.handle, hwndHeader = parent.hwndHeader;
+ int /*long*/ hwnd = parent.handle, hwndHeader = parent.hwndHeader;
RECT headerRect = new RECT ();
OS.SendMessage (hwndHeader, OS.HDM_GETITEMRECT, index, headerRect);
- int hDC = OS.GetDC (hwnd);
- int oldFont = 0, newFont = OS.SendMessage (hwnd, OS.WM_GETFONT, 0, 0);
+ int /*long*/ hDC = OS.GetDC (hwnd);
+ int /*long*/ 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;
tvItem.hItem = OS.SendMessage (hwnd, OS.TVM_GETNEXTITEM, OS.TVGN_ROOT, 0);
while (tvItem.hItem != 0) {
OS.SendMessage (hwnd, OS.TVM_GETITEM, 0, tvItem);
- TreeItem item = tvItem.lParam != -1 ? parent.items [tvItem.lParam] : null;
+ TreeItem item = tvItem.lParam != -1 ? parent.items [(int)/*64*/tvItem.lParam] : null;
if (item != null) {
- int hFont = item.cellFont != null ? item.cellFont [index] : -1;
+ int /*long*/ hFont = item.cellFont != null ? item.cellFont [index] : -1;
if (hFont == -1) hFont = item.font;
if (hFont != -1) hFont = OS.SelectObject (hDC, hFont);
RECT itemRect = item.getBounds (index, true, true, false, false, false, hDC);
@@ -395,7 +395,7 @@ public void pack () {
}
int margin = 0;
if (hwndHeader != 0 && OS.COMCTL32_VERSION >= OS.VERSION (5, 80)) {
- margin = OS.SendMessage (hwndHeader, OS.HDM_GETBITMAPMARGIN, 0, 0);
+ margin = (int)/*64*/OS.SendMessage (hwndHeader, OS.HDM_GETBITMAPMARGIN, 0, 0);
} else {
margin = OS.GetSystemMetrics (OS.SM_CXEDGE) * 3;
}
@@ -488,7 +488,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 hwndHeader = parent.hwndHeader;
+ int /*long*/ hwndHeader = parent.hwndHeader;
if (hwndHeader == 0) return;
HDITEM hdItem = new HDITEM ();
hdItem.mask = OS.HDI_FORMAT | OS.HDI_IMAGE;
@@ -499,7 +499,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 hwnd = parent.handle;
+ int /*long*/ hwnd = parent.handle;
parent.forceResize ();
RECT rect = new RECT (), headerRect = new RECT ();
OS.GetClientRect (hwnd, rect);
@@ -524,7 +524,7 @@ public void setImage (Image image) {
void setImage (Image image, boolean sort, boolean right) {
int index = parent.indexOf (this);
if (index == -1) return;
- int hwndHeader = parent.hwndHeader;
+ int /*long*/ hwndHeader = parent.hwndHeader;
if (hwndHeader == 0) return;
HDITEM hdItem = new HDITEM ();
hdItem.mask = OS.HDI_FORMAT | OS.HDI_IMAGE | OS.HDI_BITMAP;
@@ -595,7 +595,7 @@ public void setResizable (boolean resizable) {
void setSortDirection (int direction) {
if (OS.COMCTL32_MAJOR >= 6) {
- int hwndHeader = parent.hwndHeader;
+ int /*long*/ hwndHeader = parent.hwndHeader;
if (hwndHeader != 0) {
int index = parent.indexOf (this);
if (index == -1) return;
@@ -623,7 +623,7 @@ void setSortDirection (int direction) {
}
OS.SendMessage (hwndHeader, OS.HDM_SETITEM, index, hdItem);
if (OS.COMCTL32_MAJOR >= 6 && OS.IsAppThemed ()) {
- int hwnd = parent.handle;
+ int /*long*/ hwnd = parent.handle;
parent.forceResize ();
RECT rect = new RECT (), headerRect = new RECT ();
OS.GetClientRect (hwnd, rect);
@@ -661,17 +661,17 @@ public void setText (String string) {
* mnemonic characters and replace doubled mnemonics
* with spaces.
*/
- int hHeap = OS.GetProcessHeap ();
+ int /*long*/ hHeap = OS.GetProcessHeap ();
TCHAR buffer = new TCHAR (parent.getCodePage (), fixMnemonic (string), true);
int byteCount = buffer.length () * TCHAR.sizeof;
- int pszText = OS.HeapAlloc (hHeap, OS.HEAP_ZERO_MEMORY, byteCount);
+ int /*long*/ pszText = OS.HeapAlloc (hHeap, OS.HEAP_ZERO_MEMORY, byteCount);
OS.MoveMemory (pszText, buffer, byteCount);
- int hwndHeader = parent.hwndHeader;
+ int /*long*/ hwndHeader = parent.hwndHeader;
if (hwndHeader == 0) return;
HDITEM hdItem = new HDITEM ();
hdItem.mask = OS.HDI_TEXT;
hdItem.pszText = pszText;
- int result = OS.SendMessage (hwndHeader, OS.HDM_SETITEM, index, hdItem);
+ int /*long*/ 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);
}
@@ -692,7 +692,7 @@ public void setText (String string) {
public void setToolTipText (String string) {
checkWidget();
toolTipText = string;
- int hwndHeaderToolTip = parent.headerToolTipHandle;
+ int /*long*/ hwndHeaderToolTip = parent.headerToolTipHandle;
if (hwndHeaderToolTip == 0) {
parent.createHeaderToolTips ();
parent.updateHeaderToolTips ();
@@ -714,7 +714,7 @@ public void setWidth (int width) {
if (width < 0) return;
int index = parent.indexOf (this);
if (index == -1) return;
- int hwndHeader = parent.hwndHeader;
+ int /*long*/ hwndHeader = parent.hwndHeader;
if (hwndHeader == 0) return;
HDITEM hdItem = new HDITEM ();
hdItem.mask = OS.HDI_WIDTH;
@@ -723,7 +723,7 @@ public void setWidth (int width) {
RECT headerRect = new RECT ();
OS.SendMessage (hwndHeader, OS.HDM_GETITEMRECT, index, headerRect);
parent.forceResize ();
- int hwnd = parent.handle;
+ int /*long*/ hwnd = parent.handle;
RECT rect = new RECT ();
OS.GetClientRect (hwnd, rect);
rect.left = headerRect.left;
@@ -732,9 +732,9 @@ public void setWidth (int width) {
}
void updateToolTip (int index) {
- int hwndHeaderToolTip = parent.headerToolTipHandle;
+ int /*long*/ hwndHeaderToolTip = parent.headerToolTipHandle;
if (hwndHeaderToolTip != 0) {
- int hwndHeader = parent.hwndHeader;
+ int /*long*/ 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 98486a4ec6..d79d4e2dc4 100755
--- 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
@@ -41,13 +41,15 @@ public class TreeItem extends Item {
* platforms and should never be accessed from application code.
* </p>
*/
- public int handle;
+ public int /*long*/ handle;
Tree parent;
String [] strings;
Image [] images;
boolean cached;
- int background = -1, foreground = -1, font = -1;
- int [] cellBackground, cellForeground, cellFont;
+ int background = -1, foreground = -1;
+ int /*long*/ font = -1;
+ int [] cellBackground, cellForeground;
+ int /*long*/ [] cellFont;
/**
* Constructs a new instance of this class given its parent
@@ -189,7 +191,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 hParent, int hInsertAfter, int hItem) {
+TreeItem (Tree parent, int style, int /*long*/ hParent, int /*long*/ hInsertAfter, int /*long*/ hItem) {
super (parent, style);
this.parent = parent;
parent.createItem (this, hParent, hInsertAfter, hItem);
@@ -200,25 +202,25 @@ static TreeItem checkNull (TreeItem item) {
return item;
}
-static int findPrevious (Tree parent, int index) {
+static int /*long*/ 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 hwnd = parent.handle;
- int hFirstItem = OS.SendMessage (hwnd, OS.TVM_GETNEXTITEM, OS.TVGN_ROOT, 0);
- int hItem = parent.findItem (hFirstItem, index - 1);
+ 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);
if (hItem == 0) SWT.error (SWT.ERROR_INVALID_RANGE);
return hItem;
}
-static int findPrevious (TreeItem parentItem, int index) {
+static int /*long*/ 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 hwnd = parent.handle, hParent = parentItem.handle;
- int hFirstItem = OS.SendMessage (hwnd, OS.TVM_GETNEXTITEM, OS.TVGN_CHILD, hParent);
- int hItem = parent.findItem (hFirstItem, index - 1);
+ 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);
if (hItem == 0) SWT.error (SWT.ERROR_INVALID_RANGE);
return hItem;
}
@@ -233,7 +235,7 @@ void clear () {
strings = null;
images = null;
if ((parent.style & SWT.CHECK) != 0) {
- int hwnd = parent.handle;
+ int /*long*/ hwnd = parent.handle;
TVITEM tvItem = new TVITEM ();
tvItem.mask = OS.TVIF_HANDLE | OS.TVIF_STATE;
tvItem.stateMask = OS.TVIS_STATEIMAGEMASK;
@@ -241,8 +243,10 @@ void clear () {
tvItem.hItem = handle;
OS.SendMessage (hwnd, OS.TVM_SETITEM, 0, tvItem);
}
- background = foreground = font = -1;
- cellBackground = cellForeground = cellFont = null;
+ background = foreground = -1;
+ font = -1;
+ cellBackground = cellForeground = null;
+ cellFont = null;
if ((parent.style & SWT.VIRTUAL) != 0) cached = false;
}
@@ -271,8 +275,8 @@ void clear () {
*/
public void clear (int index, boolean all) {
checkWidget ();
- int hwnd = parent.handle;
- int hItem = OS.SendMessage (hwnd, OS.TVM_GETNEXTITEM, OS.TVGN_CHILD, handle);
+ int /*long*/ hwnd = parent.handle;
+ int /*long*/ 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);
@@ -306,8 +310,8 @@ public void clear (int index, boolean all) {
*/
public void clearAll (boolean all) {
checkWidget ();
- int hwnd = parent.handle;
- int hItem = OS.SendMessage (hwnd, OS.TVM_GETNEXTITEM, OS.TVGN_CHILD, handle);
+ int /*long*/ hwnd = parent.handle;
+ int /*long*/ 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;
@@ -410,9 +414,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 hDC) {
+RECT getBounds (int index, boolean getText, boolean getImage, boolean fullText, boolean fullImage, boolean clip, int /*long*/ hDC) {
if (!getText && !getImage) return new RECT ();
- int hwnd = parent.handle;
+ int /*long*/ hwnd = parent.handle;
if ((parent.style & SWT.VIRTUAL) == 0 && !cached && !parent.painted) {
TVITEM tvItem = new TVITEM ();
tvItem.mask = OS.TVIF_HANDLE | OS.TVIF_TEXT;
@@ -423,9 +427,10 @@ RECT getBounds (int index, boolean getText, boolean getImage, boolean fullText,
parent.ignoreCustomDraw = false;
}
boolean firstColumn = index == 0;
- int columnCount = 0, hwndHeader = parent.hwndHeader;
+ int columnCount = 0;
+ int /*long*/ hwndHeader = parent.hwndHeader;
if (hwndHeader != 0) {
- columnCount = OS.SendMessage (hwndHeader, OS.HDM_GETITEMCOUNT, 0, 0);
+ columnCount = (int)/*64*/OS.SendMessage (hwndHeader, OS.HDM_GETITEMCOUNT, 0, 0);
firstColumn = index == OS.SendMessage (hwndHeader, OS.HDM_ORDERTOINDEX, 0, 0);
}
RECT rect = new RECT ();
@@ -495,7 +500,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 hNewDC = hDC, hFont = 0;
+ int /*long*/ hNewDC = hDC, hFont = 0;
if (hDC == 0) {
hNewDC = OS.GetDC (hwnd);
hFont = cellFont != null ? cellFont [index] : -1;
@@ -547,12 +552,12 @@ public boolean getChecked () {
checkWidget ();
if (!parent.checkData (this, true)) error (SWT.ERROR_WIDGET_DISPOSED);
if ((parent.style & SWT.CHECK) == 0) return false;
- int hwnd = parent.handle;
+ int /*long*/ hwnd = parent.handle;
TVITEM tvItem = new TVITEM ();
tvItem.mask = OS.TVIF_HANDLE | OS.TVIF_STATE;
tvItem.stateMask = OS.TVIS_STATEIMAGEMASK;
tvItem.hItem = handle;
- int result = OS.SendMessage (hwnd, OS.TVM_GETITEM, 0, tvItem);
+ int /*long*/ result = OS.SendMessage (hwnd, OS.TVM_GETITEM, 0, tvItem);
return (result != 0) && (((tvItem.state >> 12) & 1) == 0);
}
@@ -570,7 +575,8 @@ public boolean getChecked () {
*/
public boolean getExpanded () {
checkWidget ();
- int hwnd = parent.handle, state = 0;
+ int /*long*/ hwnd = parent.handle;
+ int state = 0;
if (OS.IsWinCE) {
TVITEM tvItem = new TVITEM ();
tvItem.hItem = handle;
@@ -584,7 +590,7 @@ public boolean getExpanded () {
* with TVIS_EXPANDED, the entire state is returned. The fix is
* to explicitly check for the TVIS_EXPANDED bit.
*/
- state = OS.SendMessage (hwnd, OS.TVM_GETITEMSTATE, handle, OS.TVIS_EXPANDED);
+ state = (int)/*64*/OS.SendMessage (hwnd, OS.TVM_GETITEMSTATE, handle, OS.TVIS_EXPANDED);
}
return (state & OS.TVIS_EXPANDED) != 0;
}
@@ -626,7 +632,7 @@ public Font getFont (int index) {
if (!parent.checkData (this, true)) error (SWT.ERROR_WIDGET_DISPOSED);
int count = Math.max (1, parent.getColumnCount ());
if (0 > index || index > count -1) return getFont ();
- int hFont = (cellFont != null) ? cellFont [index] : font;
+ int /*long*/ hFont = (cellFont != null) ? cellFont [index] : font;
return hFont == -1 ? getFont () : Font.win32_new (display, hFont);
}
@@ -690,12 +696,12 @@ public boolean getGrayed () {
checkWidget ();
if (!parent.checkData (this, true)) error (SWT.ERROR_WIDGET_DISPOSED);
if ((parent.style & SWT.CHECK) == 0) return false;
- int hwnd = parent.handle;
+ int /*long*/ hwnd = parent.handle;
TVITEM tvItem = new TVITEM ();
tvItem.mask = OS.TVIF_HANDLE | OS.TVIF_STATE;
tvItem.stateMask = OS.TVIS_STATEIMAGEMASK;
tvItem.hItem = handle;
- int result = OS.SendMessage (hwnd, OS.TVM_GETITEM, 0, tvItem);
+ int /*long*/ result = OS.SendMessage (hwnd, OS.TVM_GETITEM, 0, tvItem);
return (result != 0) && ((tvItem.state >> 12) > 2);
}
@@ -720,10 +726,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 hwnd = parent.handle;
- int hFirstItem = OS.SendMessage (hwnd, OS.TVM_GETNEXTITEM, OS.TVGN_CHILD, handle);
+ int /*long*/ hwnd = parent.handle;
+ int /*long*/ hFirstItem = OS.SendMessage (hwnd, OS.TVM_GETNEXTITEM, OS.TVGN_CHILD, handle);
if (hFirstItem == 0) error (SWT.ERROR_INVALID_RANGE);
- int hItem = parent.findItem (hFirstItem, index);
+ int /*long*/ hItem = parent.findItem (hFirstItem, index);
if (hItem == 0) error (SWT.ERROR_INVALID_RANGE);
return parent._getItem (hItem);
}
@@ -742,8 +748,8 @@ public TreeItem getItem (int index) {
public int getItemCount () {
checkWidget ();
if (!parent.checkData (this, true)) error (SWT.ERROR_WIDGET_DISPOSED);
- int hwnd = parent.handle;
- int hItem = OS.SendMessage (hwnd, OS.TVM_GETNEXTITEM, OS.TVGN_CHILD, handle);
+ int /*long*/ hwnd = parent.handle;
+ int /*long*/ hItem = OS.SendMessage (hwnd, OS.TVM_GETNEXTITEM, OS.TVGN_CHILD, handle);
if (hItem == 0) return 0;
return parent.getItemCount (hItem);
}
@@ -767,8 +773,8 @@ public int getItemCount () {
public TreeItem [] getItems () {
checkWidget ();
if (!parent.checkData (this, true)) error (SWT.ERROR_WIDGET_DISPOSED);
- int hwnd = parent.handle;
- int hItem = OS.SendMessage (hwnd, OS.TVM_GETNEXTITEM, OS.TVGN_CHILD, handle);
+ int /*long*/ hwnd = parent.handle;
+ int /*long*/ hItem = OS.SendMessage (hwnd, OS.TVM_GETNEXTITEM, OS.TVGN_CHILD, handle);
if (hItem == 0) return new TreeItem [0];
return parent.getItems (hItem);
}
@@ -855,8 +861,8 @@ public Tree getParent () {
*/
public TreeItem getParentItem () {
checkWidget ();
- int hwnd = parent.handle;
- int hItem = OS.SendMessage (hwnd, OS.TVM_GETNEXTITEM, OS.TVGN_PARENT, handle);
+ int /*long*/ hwnd = parent.handle;
+ int /*long*/ hItem = OS.SendMessage (hwnd, OS.TVM_GETNEXTITEM, OS.TVGN_PARENT, handle);
return hItem != 0 ? parent._getItem (hItem) : null;
}
@@ -944,14 +950,14 @@ public int indexOf (TreeItem item) {
checkWidget ();
if (item == null) error (SWT.ERROR_NULL_ARGUMENT);
if (item.isDisposed()) error(SWT.ERROR_INVALID_ARGUMENT);
- int hwnd = parent.handle;
- int hItem = OS.SendMessage (hwnd, OS.TVM_GETNEXTITEM, OS.TVGN_CHILD, handle);
+ int /*long*/ hwnd = parent.handle;
+ int /*long*/ 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.drawCount != 0) return;
- int hwnd = parent.handle;
+ int /*long*/ hwnd = parent.handle;
if (!OS.IsWindowVisible (hwnd)) return;
/*
* When there are no columns and the tree is not
@@ -960,7 +966,7 @@ void redraw () {
*/
boolean full = (parent.style & (SWT.FULL_SELECTION | SWT.VIRTUAL)) != 0;
if (!full) {
- int hwndHeader = parent.hwndHeader;
+ int /*long*/ hwndHeader = parent.hwndHeader;
if (hwndHeader != 0) {
full = OS.SendMessage (hwndHeader, OS.HDM_GETITEMCOUNT, 0, 0) != 0;
}
@@ -978,7 +984,7 @@ void redraw () {
void redraw (int column, boolean drawText, boolean drawImage) {
if (parent.currentItem == this || parent.drawCount != 0) return;
- int hwnd = parent.handle;
+ int /*long*/ hwnd = parent.handle;
if (!OS.IsWindowVisible (hwnd)) return;
boolean fullImage = column == 0 && drawText && drawImage;
RECT rect = getBounds (column, drawText, drawImage, true, fullImage, true, 0);
@@ -1004,7 +1010,8 @@ void releaseWidget () {
super.releaseWidget ();
strings = null;
images = null;
- cellBackground = cellForeground = cellFont = null;
+ cellBackground = cellForeground = null;
+ cellFont = null;
}
/**
@@ -1019,13 +1026,13 @@ void releaseWidget () {
*/
public void removeAll () {
checkWidget ();
- int hwnd = parent.handle;
+ int /*long*/ 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);
while (tvItem.hItem != 0) {
OS.SendMessage (hwnd, OS.TVM_GETITEM, 0, tvItem);
- TreeItem item = tvItem.lParam != -1 ? parent.items [tvItem.lParam] : null;
+ TreeItem item = tvItem.lParam != -1 ? parent.items [(int)/*64*/tvItem.lParam] : null;
if (item != null && !item.isDisposed ()) {
item.dispose ();
} else {
@@ -1127,7 +1134,7 @@ public void setBackground (int index, Color color) {
public void setChecked (boolean checked) {
checkWidget ();
if ((parent.style & SWT.CHECK) == 0) return;
- int hwnd = parent.handle;
+ int /*long*/ hwnd = parent.handle;
TVITEM tvItem = new TVITEM ();
tvItem.mask = OS.TVIF_HANDLE | OS.TVIF_STATE;
tvItem.stateMask = OS.TVIS_STATEIMAGEMASK;
@@ -1175,7 +1182,7 @@ public void setExpanded (boolean expanded) {
checkWidget ();
/* Do nothing when the item is a leaf or already expanded */
- int hwnd = parent.handle;
+ int /*long*/ hwnd = parent.handle;
if (OS.SendMessage (hwnd, OS.TVM_GETNEXTITEM, OS.TVGN_CHILD, handle) == 0) {
return;
}
@@ -1193,7 +1200,7 @@ public void setExpanded (boolean expanded) {
* with TVIS_EXPANDED, the entire state is returned. The fix is
* to explicitly check for the TVIS_EXPANDED bit.
*/
- state = OS.SendMessage (hwnd, OS.TVM_GETITEMSTATE, handle, OS.TVIS_EXPANDED);
+ state = (int)/*64*/OS.SendMessage (hwnd, OS.TVM_GETITEMSTATE, handle, OS.TVIS_EXPANDED);
}
if (((state & OS.TVIS_EXPANDED) != 0) == expanded) return;
@@ -1213,9 +1220,10 @@ public void setExpanded (boolean expanded) {
RECT oldRect = null;
RECT [] rects = null;
SCROLLINFO oldInfo = null;
- int count = 0, hBottomItem = 0;
+ int count = 0;
+ int /*long*/ hBottomItem = 0;
boolean redraw = false, noScroll = true;
- int hTopItem = OS.SendMessage (hwnd, OS.TVM_GETNEXTITEM, OS.TVGN_FIRSTVISIBLE, 0);
+ int /*long*/ hTopItem = OS.SendMessage (hwnd, OS.TVM_GETNEXTITEM, OS.TVGN_FIRSTVISIBLE, 0);
if (noScroll && hTopItem != 0) {
oldInfo = new SCROLLINFO ();
oldInfo.cbSize = SCROLLINFO.sizeof;
@@ -1225,9 +1233,10 @@ public void setExpanded (boolean expanded) {
}
if (parent.drawCount == 0 && OS.IsWindowVisible (hwnd)) {
boolean noAnimate = true;
- count = OS.SendMessage (hwnd, OS.TVM_GETVISIBLECOUNT, 0, 0);
+ count = (int)/*64*/OS.SendMessage (hwnd, OS.TVM_GETVISIBLECOUNT, 0, 0);
rects = new RECT [count + 1];
- int hItem = hTopItem, index = 0;
+ int /*long*/ hItem = hTopItem;
+ int index = 0;
while (hItem != 0 && (noAnimate || hItem != handle) && index < count) {
RECT rect = new RECT ();
if (OS.TreeView_GetItemRect (hwnd, hItem, rect, true)) {
@@ -1241,7 +1250,7 @@ public void setExpanded (boolean expanded) {
hBottomItem = hItem;
oldRect = new RECT ();
OS.GetClientRect (hwnd, oldRect);
- int topHandle = parent.topHandle ();
+ int /*long*/ topHandle = parent.topHandle ();
OS.UpdateWindow (topHandle);
OS.DefWindowProc (topHandle, OS.WM_SETREDRAW, 0, 0);
if (hwnd != topHandle) {
@@ -1268,7 +1277,7 @@ public void setExpanded (boolean expanded) {
* check whether the selection has changed and issue
* the event.
*/
- int hOldItem = OS.SendMessage (hwnd, OS.TVM_GETNEXTITEM, OS.TVGN_CARET, 0);
+ int /*long*/ hOldItem = OS.SendMessage (hwnd, OS.TVM_GETNEXTITEM, OS.TVGN_CARET, 0);
/* Expand or collapse the item */
parent.ignoreExpand = true;
@@ -1296,7 +1305,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 lParam = OS.MAKELPARAM (OS.SB_THUMBPOSITION, oldInfo.nPos);
+ int /*long*/ lParam = OS.MAKELPARAM (OS.SB_THUMBPOSITION, oldInfo.nPos);
OS.SendMessage (hwnd, OS.WM_HSCROLL, lParam, 0);
}
}
@@ -1307,7 +1316,8 @@ public void setExpanded (boolean expanded) {
RECT newRect = new RECT ();
OS.GetClientRect (hwnd, newRect);
if (OS.EqualRect (oldRect, newRect)) {
- int hItem = hTopItem, index = 0;
+ int /*long*/ hItem = hTopItem;
+ int index = 0;
while (hItem != 0 && index < count) {
RECT rect = new RECT ();
if (OS.TreeView_GetItemRect (hwnd, hItem, rect, true)) {
@@ -1321,7 +1331,7 @@ public void setExpanded (boolean expanded) {
fixScroll = index == count && hItem == hBottomItem;
}
}
- int topHandle = parent.topHandle ();
+ int /*long*/ topHandle = parent.topHandle ();
OS.DefWindowProc (topHandle, OS.WM_SETREDRAW, 1, 0);
if (hwnd != topHandle) {
OS.DefWindowProc (hwnd, OS.WM_SETREDRAW, 1, 0);
@@ -1357,7 +1367,7 @@ public void setExpanded (boolean expanded) {
}
/* Check for a selection event */
- int hNewItem = OS.SendMessage (hwnd, OS.TVM_GETNEXTITEM, OS.TVGN_CARET, 0);
+ int /*long*/ hNewItem = OS.SendMessage (hwnd, OS.TVM_GETNEXTITEM, OS.TVGN_CARET, 0);
if (hNewItem != hOldItem) {
Event event = new Event ();
if (hNewItem != 0) {
@@ -1390,7 +1400,7 @@ public void setFont (Font font){
if (font != null && font.isDisposed ()) {
SWT.error (SWT.ERROR_INVALID_ARGUMENT);
}
- int hFont = -1;
+ int /*long*/ hFont = -1;
if (font != null) {
parent.customDraw = true;
hFont = font.handle;
@@ -1407,7 +1417,7 @@ public void setFont (Font font){
if ((parent.style & SWT.VIRTUAL) == 0 && !cached && !parent.painted) {
return;
}
- int hwnd = parent.handle;
+ int /*long*/ hwnd = parent.handle;
TVITEM tvItem = new TVITEM ();
tvItem.mask = OS.TVIF_HANDLE | OS.TVIF_TEXT;
tvItem.hItem = handle;
@@ -1442,13 +1452,13 @@ public void setFont (int index, Font font) {
}
int count = Math.max (1, parent.getColumnCount ());
if (0 > index || index > count - 1) return;
- int hFont = -1;
+ int /*long*/ hFont = -1;
if (font != null) {
parent.customDraw = true;
hFont = font.handle;
}
if (cellFont == null) {
- cellFont = new int [count];
+ cellFont = new int /*long*/ [count];
for (int i = 0; i < count; i++) {
cellFont [i] = -1;
}
@@ -1466,7 +1476,7 @@ public void setFont (int index, Font font) {
if ((parent.style & SWT.VIRTUAL) == 0 && !cached && !parent.painted) {
return;
}
- int hwnd = parent.handle;
+ int /*long*/ hwnd = parent.handle;
TVITEM tvItem = new TVITEM ();
tvItem.mask = OS.TVIF_HANDLE | OS.TVIF_TEXT;
tvItem.hItem = handle;
@@ -1570,7 +1580,7 @@ public void setForeground (int index, Color color){
public void setGrayed (boolean grayed) {
checkWidget ();
if ((parent.style & SWT.CHECK) == 0) return;
- int hwnd = parent.handle;
+ int /*long*/ hwnd = parent.handle;
TVITEM tvItem = new TVITEM ();
tvItem.mask = OS.TVIF_HANDLE | OS.TVIF_STATE;
tvItem.stateMask = OS.TVIS_STATEIMAGEMASK;
@@ -1679,7 +1689,7 @@ public void setImage (int index, Image image) {
if ((parent.style & SWT.VIRTUAL) == 0 &&!cached && !parent.painted) {
return;
}
- int hwnd = parent.handle;
+ int /*long*/ hwnd = parent.handle;
TVITEM tvItem = new TVITEM ();
tvItem.mask = OS.TVIF_HANDLE | OS.TVIF_IMAGE | OS.TVIF_SELECTEDIMAGE;
tvItem.hItem = handle;
@@ -1719,8 +1729,8 @@ public void setImage (Image image) {
public void setItemCount (int count) {
checkWidget ();
count = Math.max (0, count);
- int hwnd = parent.handle;
- int hItem = OS.SendMessage (hwnd, OS.TVM_GETNEXTITEM, OS.TVGN_CHILD, handle);
+ int /*long*/ hwnd = parent.handle;
+ int /*long*/ hItem = OS.SendMessage (hwnd, OS.TVM_GETNEXTITEM, OS.TVGN_CHILD, handle);
parent.setItemCount (count, handle, hItem);
}
@@ -1786,7 +1796,7 @@ public void setText (int index, String string) {
if ((parent.style & SWT.VIRTUAL) == 0 && !cached && !parent.painted) {
return;
}
- int hwnd = parent.handle;
+ int /*long*/ 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 82a4807a63..4e14315445 100755
--- 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
@@ -198,7 +198,7 @@ public void addDisposeListener (DisposeListener listener) {
addListener (SWT.Dispose, typedListener);
}
-int callWindowProc (int hwnd, int msg, int wParam, int lParam) {
+int /*long*/ callWindowProc (int /*long*/ hwnd, int msg, int /*long*/ wParam, int /*long*/ lParam) {
return 0;
}
@@ -350,7 +350,7 @@ void destroyWidget () {
releaseHandle ();
}
-int DeferWindowPos(int hWinPosInfo, int hWnd, int hWndInsertAfter, int X, int Y, int cx, int cy, int uFlags){
+int /*long*/ DeferWindowPos(int /*long*/ hWinPosInfo, int /*long*/ hWnd, int /*long*/ hWndInsertAfter, int X, int Y, int cx, int cy, int uFlags){
if (OS.IsWinCE) {
/*
* Feature in Windows. On Windows CE, DeferWindowPos always causes
@@ -410,7 +410,7 @@ public void dispose () {
release (true);
}
-boolean dragDetect (int hwnd, int x, int y, boolean filter, boolean [] detect, boolean [] consume) {
+boolean dragDetect (int /*long*/ 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 ();
@@ -436,7 +436,7 @@ boolean filters (int eventType) {
return display.filters (eventType);
}
-Widget findItem (int id) {
+Widget findItem (int /*long*/ id) {
return null;
}
@@ -674,7 +674,7 @@ boolean isValidThread () {
return getDisplay ().isValidThread ();
}
-void mapEvent (int hwnd, Event event) {
+void mapEvent (int /*long*/ hwnd, Event event) {
}
GC new_GC (GCData data) {
@@ -965,23 +965,23 @@ void sendEvent (int eventType, Event event, boolean send) {
}
}
-boolean sendKeyEvent (int type, int msg, int wParam, int lParam) {
+boolean sendKeyEvent (int type, int msg, int /*long*/ wParam, int /*long*/ 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 wParam, int lParam, Event event) {
+boolean sendKeyEvent (int type, int msg, int /*long*/ wParam, int /*long*/ lParam, Event event) {
sendEvent (type, event);
if (isDisposed ()) return false;
return event.doit;
}
-boolean sendMouseEvent (int type, int button, int hwnd, int msg, int wParam, int lParam) {
+boolean sendMouseEvent (int type, int button, int /*long*/ hwnd, int msg, int /*long*/ wParam, int /*long*/ 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 hwnd, int msg, int wParam, int lParam) {
+boolean sendMouseEvent (int type, int button, int count, int detail, boolean send, int /*long*/ hwnd, int msg, int /*long*/ wParam, int /*long*/ lParam) {
if (!hooks (type) && !filters (type)) return true;
Event event = new Event ();
event.button = button;
@@ -1146,7 +1146,7 @@ boolean setInputState (Event event, int type) {
return true;
}
-boolean setKeyState (Event event, int type, int wParam, int lParam) {
+boolean setKeyState (Event event, int type, int /*long*/ wParam, int /*long*/ lParam) {
/*
* Feature in Windows. When the user presses Ctrl+Backspace
@@ -1208,7 +1208,7 @@ boolean setKeyState (Event event, int type, int wParam, int lParam) {
return setInputState (event, type);
}
-boolean SetWindowPos (int hWnd, int hWndInsertAfter, int X, int Y, int cx, int cy, int uFlags) {
+boolean SetWindowPos (int /*long*/ hWnd, int /*long*/ hWndInsertAfter, int X, int Y, int cx, int cy, int uFlags) {
if (OS.IsWinCE) {
/*
* Feature in Windows. On Windows CE, SetWindowPos() always causes
@@ -1267,12 +1267,12 @@ public String toString () {
return getName () + " {" + string + "}"; //$NON-NLS-1$ //$NON-NLS-2$
}
-LRESULT wmCaptureChanged (int hwnd, int wParam, int lParam) {
+LRESULT wmCaptureChanged (int /*long*/ hwnd, int /*long*/ wParam, int /*long*/ lParam) {
display.captureChanged = true;
return null;
}
-LRESULT wmChar (int hwnd, int wParam, int lParam) {
+LRESULT wmChar (int /*long*/ hwnd, int /*long*/ wParam, int /*long*/ lParam) {
/*
* Do not report a lead byte as a key pressed.
*/
@@ -1280,7 +1280,7 @@ LRESULT wmChar (int hwnd, int wParam, int lParam) {
byte lead = (byte) (wParam & 0xFF);
if (OS.IsDBCSLeadByte (lead)) return null;
}
- display.lastAscii = wParam;
+ display.lastAscii = (int)/*64*/wParam;
display.lastNull = wParam == 0;
if (!sendKeyEvent (SWT.KeyDown, OS.WM_CHAR, wParam, lParam)) {
return LRESULT.ONE;
@@ -1289,7 +1289,7 @@ LRESULT wmChar (int hwnd, int wParam, int lParam) {
return null;
}
-LRESULT wmContextMenu (int hwnd, int wParam, int lParam) {
+LRESULT wmContextMenu (int /*long*/ hwnd, int /*long*/ wParam, int /*long*/ lParam) {
if (wParam != hwnd) return null;
/*
@@ -1336,10 +1336,10 @@ LRESULT wmContextMenu (int hwnd, int wParam, int lParam) {
return showMenu (x, y) ? LRESULT.ZERO : null;
}
-LRESULT wmIMEChar (int hwnd, int wParam, int lParam) {
+LRESULT wmIMEChar (int /*long*/ hwnd, int /*long*/ wParam, int /*long*/ lParam) {
Display display = this.display;
display.lastKey = 0;
- display.lastAscii = wParam;
+ display.lastAscii = (int)/*64*/wParam;
display.lastVirtual = display.lastNull = display.lastDead = false;
if (!sendKeyEvent (SWT.KeyDown, OS.WM_IME_CHAR, wParam, lParam)) {
return LRESULT.ONE;
@@ -1350,10 +1350,10 @@ LRESULT wmIMEChar (int hwnd, int wParam, int lParam) {
return LRESULT.ONE;
}
-LRESULT wmKeyDown (int hwnd, int wParam, int lParam) {
+LRESULT wmKeyDown (int /*long*/ hwnd, int /*long*/ wParam, int /*long*/ lParam) {
/* Ignore repeating modifier keys by testing key down state */
- switch (wParam) {
+ switch ((int)/*64*/wParam) {
case OS.VK_SHIFT:
case OS.VK_MENU:
case OS.VK_CONTROL:
@@ -1387,7 +1387,7 @@ LRESULT wmKeyDown (int hwnd, int wParam, int lParam) {
*/
int mapKey = 0;
if (OS.IsWinCE) {
- switch (wParam) {
+ switch ((int)/*64*/wParam) {
case OS.VK_BACK: mapKey = SWT.BS; break;
case OS.VK_RETURN: mapKey = SWT.CR; break;
case OS.VK_DELETE: mapKey = SWT.DEL; break;
@@ -1395,7 +1395,7 @@ LRESULT wmKeyDown (int hwnd, int wParam, int lParam) {
case OS.VK_TAB: mapKey = SWT.TAB; break;
}
} else {
- mapKey = OS.MapVirtualKey (wParam, 2);
+ mapKey = OS.MapVirtualKey ((int)/*64*/wParam, 2);
}
/*
@@ -1425,7 +1425,7 @@ LRESULT wmKeyDown (int hwnd, int wParam, int lParam) {
if (OS.PeekMessage (msg, hwnd, OS.WM_DEADCHAR, OS.WM_DEADCHAR, flags)) {
display.lastDead = true;
display.lastVirtual = mapKey == 0;
- display.lastKey = display.lastVirtual ? wParam : mapKey;
+ display.lastKey = display.lastVirtual ? (int)/*64*/wParam : mapKey;
return null;
}
@@ -1462,9 +1462,9 @@ LRESULT wmKeyDown (int hwnd, int wParam, int lParam) {
* they are not virtual. Therefore it is necessary to force
* numeric keypad keys to be virtual.
*/
- display.lastVirtual = mapKey == 0 || display.numpadKey (wParam) != 0;
+ display.lastVirtual = mapKey == 0 || display.numpadKey ((int)/*64*/wParam) != 0;
if (display.lastVirtual) {
- display.lastKey = wParam;
+ display.lastKey = (int)/*64*/wParam;
/*
* Feature in Windows. The virtual key VK_DELETE is not
* treated as both a virtual key and an ASCII key by Windows.
@@ -1521,7 +1521,7 @@ LRESULT wmKeyDown (int hwnd, int wParam, int lParam) {
* WM_CHAR. If this is the case, issue the key down event from
* inside WM_CHAR.
*/
- int asciiKey = display.asciiKey (wParam);
+ int asciiKey = display.asciiKey ((int)/*64*/wParam);
if (asciiKey != 0) {
/*
* When the user types Ctrl+Space, ToAscii () maps this to
@@ -1531,7 +1531,7 @@ LRESULT wmKeyDown (int hwnd, int wParam, int lParam) {
* issue the event from WM_CHAR.
*/
if (asciiKey == ' ') return null;
- if (asciiKey != wParam) return null;
+ if (asciiKey != (int)/*64*/wParam) return null;
/*
* Feature in Windows. The virtual key VK_CANCEL is treated
* as both a virtual key and ASCII key by Windows. This
@@ -1558,7 +1558,7 @@ LRESULT wmKeyDown (int hwnd, int wParam, int lParam) {
* depend on the international keyboard.
*/
if (OS.GetKeyState (OS.VK_SHIFT) < 0) {
- display.lastAscii = display.shiftedKey (wParam);
+ display.lastAscii = display.shiftedKey ((int)/*64*/wParam);
if (display.lastAscii == 0) display.lastAscii = mapKey;
} else {
display.lastAscii = OS.CharLower ((short) mapKey);
@@ -1575,7 +1575,7 @@ LRESULT wmKeyDown (int hwnd, int wParam, int lParam) {
return null;
}
-LRESULT wmKeyUp (int hwnd, int wParam, int lParam) {
+LRESULT wmKeyUp (int /*long*/ hwnd, int /*long*/ wParam, int /*long*/ lParam) {
Display display = this.display;
/* Check for hardware keys */
@@ -1584,7 +1584,7 @@ LRESULT wmKeyUp (int hwnd, int wParam, int lParam) {
display.lastKey = display.lastAscii = 0;
display.lastVirtual = display.lastNull = display.lastDead = false;
Event event = new Event ();
- event.detail = wParam - OS.VK_APP1 + 1;
+ event.detail = (int)/*64*/wParam - OS.VK_APP1 + 1;
/* Check the bit 30 to get the key state */
int type = (lParam & 0x40000000) != 0 ? SWT.HardKeyUp : SWT.HardKeyDown;
if (setInputState (event, type)) sendEvent (type, event);
@@ -1615,7 +1615,7 @@ LRESULT wmKeyUp (int hwnd, int wParam, int lParam) {
*/
int mapKey = 0;
if (OS.IsWinCE) {
- switch (wParam) {
+ switch ((int)/*64*/wParam) {
case OS.VK_BACK: mapKey = SWT.BS; break;
case OS.VK_RETURN: mapKey = SWT.CR; break;
case OS.VK_DELETE: mapKey = SWT.DEL; break;
@@ -1623,7 +1623,7 @@ LRESULT wmKeyUp (int hwnd, int wParam, int lParam) {
case OS.VK_TAB: mapKey = SWT.TAB; break;
}
} else {
- mapKey = OS.MapVirtualKey (wParam, 2);
+ mapKey = OS.MapVirtualKey ((int)/*64*/wParam, 2);
}
/*
@@ -1649,9 +1649,9 @@ LRESULT wmKeyUp (int hwnd, int wParam, int lParam) {
* they are not virtual. Therefore it is necessary to force
* numeric keypad keys to be virtual.
*/
- display.lastVirtual = mapKey == 0 || display.numpadKey (wParam) != 0;
+ display.lastVirtual = mapKey == 0 || display.numpadKey ((int)/*64*/wParam) != 0;
if (display.lastVirtual) {
- display.lastKey = wParam;
+ display.lastKey = (int)/*64*/wParam;
} else {
/*
* Feature in Windows. The virtual key VK_CANCEL is treated
@@ -1677,8 +1677,8 @@ LRESULT wmKeyUp (int hwnd, int wParam, int lParam) {
return result;
}
-LRESULT wmKillFocus (int hwnd, int wParam, int lParam) {
- int code = callWindowProc (hwnd, OS.WM_KILLFOCUS, wParam, lParam);
+LRESULT wmKillFocus (int /*long*/ hwnd, int /*long*/ wParam, int /*long*/ lParam) {
+ int /*long*/ code = callWindowProc (hwnd, OS.WM_KILLFOCUS, wParam, lParam);
sendFocusEvent (SWT.FocusOut);
// widget could be disposed at this point
@@ -1694,7 +1694,7 @@ LRESULT wmKillFocus (int hwnd, int wParam, int lParam) {
return new LRESULT (code);
}
-LRESULT wmLButtonDblClk (int hwnd, int wParam, int lParam) {
+LRESULT wmLButtonDblClk (int /*long*/ hwnd, int /*long*/ wParam, int /*long*/ lParam) {
/*
* Feature in Windows. Windows sends the following
* messages when the user double clicks the mouse:
@@ -1723,7 +1723,7 @@ LRESULT wmLButtonDblClk (int hwnd, int wParam, int lParam) {
return result;
}
-LRESULT wmLButtonDown (int hwnd, int wParam, int lParam) {
+LRESULT wmLButtonDown (int /*long*/ hwnd, int /*long*/ wParam, int /*long*/ lParam) {
Display display = this.display;
LRESULT result = null;
int x = OS.GET_X_LPARAM (lParam);
@@ -1811,7 +1811,7 @@ LRESULT wmLButtonDown (int hwnd, int wParam, int lParam) {
return result;
}
-LRESULT wmLButtonUp (int hwnd, int wParam, int lParam) {
+LRESULT wmLButtonUp (int /*long*/ hwnd, int /*long*/ wParam, int /*long*/ lParam) {
Display display = this.display;
LRESULT result = null;
if (sendMouseEvent (SWT.MouseUp, 1, hwnd, OS.WM_LBUTTONUP, wParam, lParam)) {
@@ -1833,7 +1833,7 @@ LRESULT wmLButtonUp (int hwnd, int wParam, int lParam) {
return result;
}
-LRESULT wmMButtonDblClk (int hwnd, int wParam, int lParam) {
+LRESULT wmMButtonDblClk (int /*long*/ hwnd, int /*long*/ wParam, int /*long*/ lParam) {
/*
* Feature in Windows. Windows sends the following
* messages when the user double clicks the mouse:
@@ -1862,7 +1862,7 @@ LRESULT wmMButtonDblClk (int hwnd, int wParam, int lParam) {
return result;
}
-LRESULT wmMButtonDown (int hwnd, int wParam, int lParam) {
+LRESULT wmMButtonDown (int /*long*/ hwnd, int /*long*/ wParam, int /*long*/ lParam) {
LRESULT result = null;
Display display = this.display;
display.captureChanged = false;
@@ -1877,7 +1877,7 @@ LRESULT wmMButtonDown (int hwnd, int wParam, int lParam) {
return result;
}
-LRESULT wmMButtonUp (int hwnd, int wParam, int lParam) {
+LRESULT wmMButtonUp (int /*long*/ hwnd, int /*long*/ wParam, int /*long*/ lParam) {
Display display = this.display;
LRESULT result = null;
if (sendMouseEvent (SWT.MouseUp, 2, hwnd, OS.WM_MBUTTONUP, wParam, lParam)) {
@@ -1899,14 +1899,14 @@ LRESULT wmMButtonUp (int hwnd, int wParam, int lParam) {
return result;
}
-LRESULT wmMouseHover (int hwnd, int wParam, int lParam) {
+LRESULT wmMouseHover (int /*long*/ hwnd, int /*long*/ wParam, int /*long*/ lParam) {
if (!sendMouseEvent (SWT.MouseHover, 0, hwnd, OS.WM_MOUSEHOVER, wParam, lParam)) {
return LRESULT.ZERO;
}
return null;
}
-LRESULT wmMouseLeave (int hwnd, int wParam, int lParam) {
+LRESULT wmMouseLeave (int /*long*/ hwnd, int /*long*/ wParam, int /*long*/ lParam) {
if (!hooks (SWT.MouseExit) && !filters (SWT.MouseExit)) return null;
int pos = OS.GetMessagePos ();
POINT pt = new POINT ();
@@ -1919,7 +1919,7 @@ LRESULT wmMouseLeave (int hwnd, int wParam, int lParam) {
return null;
}
-LRESULT wmMouseMove (int hwnd, int wParam, int lParam) {
+LRESULT wmMouseMove (int /*long*/ hwnd, int /*long*/ wParam, int /*long*/ lParam) {
LRESULT result = null;
Display display = this.display;
int pos = OS.GetMessagePos ();
@@ -1971,7 +1971,7 @@ LRESULT wmMouseMove (int hwnd, int wParam, int lParam) {
return result;
}
-LRESULT wmMouseWheel (int hwnd, int wParam, int lParam) {
+LRESULT wmMouseWheel (int /*long*/ hwnd, int /*long*/ wParam, int /*long*/ lParam) {
if (!hooks (SWT.MouseWheel) && !filters (SWT.MouseWheel)) return null;
int delta = OS.GET_WHEEL_DELTA_WPARAM (wParam);
int [] value = new int [1];
@@ -1994,7 +1994,7 @@ LRESULT wmMouseWheel (int hwnd, int wParam, int lParam) {
return null;
}
-LRESULT wmPaint (int hwnd, int wParam, int lParam) {
+LRESULT wmPaint (int /*long*/ hwnd, int /*long*/ wParam, int /*long*/ lParam) {
/* Exit early - don't draw the background */
if (!hooks (SWT.Paint) && !filters (SWT.Paint)) {
@@ -2002,7 +2002,7 @@ LRESULT wmPaint (int hwnd, int wParam, int lParam) {
}
/* Issue a paint event */
- int result = 0;
+ int /*long*/ result = 0;
if (OS.IsWinCE) {
RECT rect = new RECT ();
OS.GetUpdateRect (hwnd, rect, false);
@@ -2040,7 +2040,7 @@ LRESULT wmPaint (int hwnd, int wParam, int lParam) {
gc.dispose ();
}
} else {
- int rgn = OS.CreateRectRgn (0, 0, 0, 0);
+ int /*long*/ rgn = OS.CreateRectRgn (0, 0, 0, 0);
OS.GetUpdateRgn (hwnd, rgn, false);
result = callWindowProc (hwnd, OS.WM_PAINT, wParam, lParam);
GCData data = new GCData ();
@@ -2053,7 +2053,7 @@ LRESULT wmPaint (int hwnd, int wParam, int lParam) {
int width = rect.right - rect.left;
int height = rect.bottom - rect.top;
if (width != 0 && height != 0) {
- int hDC = gc.handle;
+ int /*long*/ hDC = gc.handle;
OS.SelectClipRgn (hDC, rgn);
OS.SetMetaRgn (hDC);
Event event = new Event ();
@@ -2075,7 +2075,7 @@ LRESULT wmPaint (int hwnd, int wParam, int lParam) {
return new LRESULT (result);
}
-LRESULT wmPrint (int hwnd, int wParam, int lParam) {
+LRESULT wmPrint (int /*long*/ hwnd, int /*long*/ wParam, int /*long*/ 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
@@ -2086,7 +2086,7 @@ LRESULT wmPrint (int hwnd, int wParam, int lParam) {
if (OS.COMCTL32_MAJOR >= 6 && OS.IsAppThemed ()) {
int bits = OS.GetWindowLong (hwnd, OS.GWL_EXSTYLE);
if ((bits & OS.WS_EX_CLIENTEDGE) != 0) {
- int code = callWindowProc (hwnd, OS.WM_PRINT, wParam, lParam);
+ int /*long*/ code = callWindowProc (hwnd, OS.WM_PRINT, wParam, lParam);
RECT rect = new RECT ();
OS.GetWindowRect (hwnd, rect);
rect.right -= rect.left;
@@ -2102,7 +2102,7 @@ LRESULT wmPrint (int hwnd, int wParam, int lParam) {
return null;
}
-LRESULT wmRButtonDblClk (int hwnd, int wParam, int lParam) {
+LRESULT wmRButtonDblClk (int /*long*/ hwnd, int /*long*/ wParam, int /*long*/ lParam) {
/*
* Feature in Windows. Windows sends the following
* messages when the user double clicks the mouse:
@@ -2131,7 +2131,7 @@ LRESULT wmRButtonDblClk (int hwnd, int wParam, int lParam) {
return result;
}
-LRESULT wmRButtonDown (int hwnd, int wParam, int lParam) {
+LRESULT wmRButtonDown (int /*long*/ hwnd, int /*long*/ wParam, int /*long*/ lParam) {
LRESULT result = null;
Display display = this.display;
display.captureChanged = false;
@@ -2146,7 +2146,7 @@ LRESULT wmRButtonDown (int hwnd, int wParam, int lParam) {
return result;
}
-LRESULT wmRButtonUp (int hwnd, int wParam, int lParam) {
+LRESULT wmRButtonUp (int /*long*/ hwnd, int /*long*/ wParam, int /*long*/ lParam) {
Display display = this.display;
LRESULT result = null;
if (sendMouseEvent (SWT.MouseUp, 3, hwnd, OS.WM_RBUTTONUP, wParam, lParam)) {
@@ -2170,8 +2170,8 @@ LRESULT wmRButtonUp (int hwnd, int wParam, int lParam) {
return result;
}
-LRESULT wmSetFocus (int hwnd, int wParam, int lParam) {
- int code = callWindowProc (hwnd, OS.WM_SETFOCUS, wParam, lParam);
+LRESULT wmSetFocus (int /*long*/ hwnd, int /*long*/ wParam, int /*long*/ lParam) {
+ int /*long*/ code = callWindowProc (hwnd, OS.WM_SETFOCUS, wParam, lParam);
sendFocusEvent (SWT.FocusIn);
// widget could be disposed at this point
@@ -2187,9 +2187,9 @@ LRESULT wmSetFocus (int hwnd, int wParam, int lParam) {
return new LRESULT (code);
}
-LRESULT wmSysChar (int hwnd, int wParam, int lParam) {
+LRESULT wmSysChar (int /*long*/ hwnd, int /*long*/ wParam, int /*long*/ lParam) {
Display display = this.display;
- display.lastAscii = wParam;
+ display.lastAscii = (int)/*64*/wParam;
display.lastNull = wParam == 0;
/* Do not issue a key down if a menu bar mnemonic was invoked */
@@ -2200,7 +2200,7 @@ LRESULT wmSysChar (int hwnd, int wParam, int lParam) {
/* Call the window proc to determine whether it is a system key or mnemonic */
boolean oldKeyHit = display.mnemonicKeyHit;
display.mnemonicKeyHit = true;
- int result = callWindowProc (hwnd, OS.WM_SYSCHAR, wParam, lParam);
+ int /*long*/ result = callWindowProc (hwnd, OS.WM_SYSCHAR, wParam, lParam);
boolean consumed = false;
if (!display.mnemonicKeyHit) {
consumed = !sendKeyEvent (SWT.KeyDown, OS.WM_SYSCHAR, wParam, lParam);
@@ -2211,7 +2211,7 @@ LRESULT wmSysChar (int hwnd, int wParam, int lParam) {
return consumed ? LRESULT.ONE : new LRESULT (result);
}
-LRESULT wmSysKeyDown (int hwnd, int wParam, int lParam) {
+LRESULT wmSysKeyDown (int /*long*/ hwnd, int /*long*/ wParam, int /*long*/ lParam) {
/*
* Feature in Windows. When WM_SYSKEYDOWN is sent,
* the user pressed ALT+<key> or F10 to get to the
@@ -2226,9 +2226,9 @@ LRESULT wmSysKeyDown (int hwnd, int wParam, int lParam) {
}
/* Ignore well known system keys */
- switch (wParam) {
+ switch ((int)/*64*/wParam) {
case OS.VK_F4: {
- int hwndShell = hwnd;
+ int /*long*/ hwndShell = hwnd;
while (OS.GetParent (hwndShell) != 0) {
if (OS.GetWindow (hwndShell, OS.GW_OWNER) != 0) break;
hwndShell = OS.GetParent (hwndShell);
@@ -2239,7 +2239,7 @@ LRESULT wmSysKeyDown (int hwnd, int wParam, int lParam) {
}
/* Ignore repeating modifier keys by testing key down state */
- switch (wParam) {
+ switch ((int)/*64*/wParam) {
case OS.VK_SHIFT:
case OS.VK_MENU:
case OS.VK_CONTROL:
@@ -2265,7 +2265,7 @@ LRESULT wmSysKeyDown (int hwnd, int wParam, int lParam) {
*/
int mapKey = 0;
if (OS.IsWinCE) {
- switch (wParam) {
+ switch ((int)/*64*/wParam) {
case OS.VK_BACK: mapKey = SWT.BS; break;
case OS.VK_RETURN: mapKey = SWT.CR; break;
case OS.VK_DELETE: mapKey = SWT.DEL; break;
@@ -2273,11 +2273,11 @@ LRESULT wmSysKeyDown (int hwnd, int wParam, int lParam) {
case OS.VK_TAB: mapKey = SWT.TAB; break;
}
} else {
- mapKey = OS.MapVirtualKey (wParam, 2);
+ mapKey = OS.MapVirtualKey ((int)/*64*/wParam, 2);
}
- display.lastVirtual = mapKey == 0 || display.numpadKey (wParam) != 0;
+ display.lastVirtual = mapKey == 0 || display.numpadKey ((int)/*64*/wParam) != 0;
if (display.lastVirtual) {
- display.lastKey = wParam;
+ display.lastKey = (int)/*64*/wParam;
/*
* Feature in Windows. The virtual key VK_DELETE is not
* treated as both a virtual key and an ASCII key by Windows.
@@ -2334,11 +2334,11 @@ LRESULT wmSysKeyDown (int hwnd, int wParam, int lParam) {
return null;
}
-LRESULT wmSysKeyUp (int hwnd, int wParam, int lParam) {
+LRESULT wmSysKeyUp (int /*long*/ hwnd, int /*long*/ wParam, int /*long*/ lParam) {
return wmKeyUp (hwnd, wParam, lParam);
}
-LRESULT wmXButtonDblClk (int hwnd, int wParam, int lParam) {
+LRESULT wmXButtonDblClk (int /*long*/ hwnd, int /*long*/ wParam, int /*long*/ lParam) {
/*
* Feature in Windows. Windows sends the following
* messages when the user double clicks the mouse:
@@ -2368,7 +2368,7 @@ LRESULT wmXButtonDblClk (int hwnd, int wParam, int lParam) {
return result;
}
-LRESULT wmXButtonDown (int hwnd, int wParam, int lParam) {
+LRESULT wmXButtonDown (int /*long*/ hwnd, int /*long*/ wParam, int /*long*/ lParam) {
LRESULT result = null;
Display display = this.display;
display.captureChanged = false;
@@ -2385,7 +2385,7 @@ LRESULT wmXButtonDown (int hwnd, int wParam, int lParam) {
return result;
}
-LRESULT wmXButtonUp (int hwnd, int wParam, int lParam) {
+LRESULT wmXButtonUp (int /*long*/ hwnd, int /*long*/ wParam, int /*long*/ lParam) {
Display display = this.display;
LRESULT result = null;
int button = OS.HIWORD (wParam) == OS.XBUTTON1 ? 4 : 5;