summaryrefslogtreecommitdiffstats
path: root/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/win32/org/eclipse/swt/dnd
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 Drag and Drop/win32/org/eclipse/swt/dnd
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 Drag and Drop/win32/org/eclipse/swt/dnd')
-rwxr-xr-xbundles/org.eclipse.swt/Eclipse SWT Drag and Drop/win32/org/eclipse/swt/dnd/ByteArrayTransfer.java6
-rwxr-xr-xbundles/org.eclipse.swt/Eclipse SWT Drag and Drop/win32/org/eclipse/swt/dnd/Clipboard.java35
-rwxr-xr-xbundles/org.eclipse.swt/Eclipse SWT Drag and Drop/win32/org/eclipse/swt/dnd/DragSource.java49
-rwxr-xr-xbundles/org.eclipse.swt/Eclipse SWT Drag and Drop/win32/org/eclipse/swt/dnd/DropTarget.java75
-rwxr-xr-xbundles/org.eclipse.swt/Eclipse SWT Drag and Drop/win32/org/eclipse/swt/dnd/FileTransfer.java2
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/win32/org/eclipse/swt/dnd/HTMLTransfer.java6
-rwxr-xr-xbundles/org.eclipse.swt/Eclipse SWT Drag and Drop/win32/org/eclipse/swt/dnd/OleEnumFORMATETC.java31
-rwxr-xr-xbundles/org.eclipse.swt/Eclipse SWT Drag and Drop/win32/org/eclipse/swt/dnd/RTFTransfer.java6
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/win32/org/eclipse/swt/dnd/TableDragSourceEffect.java14
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/win32/org/eclipse/swt/dnd/TableDropTargetEffect.java8
-rwxr-xr-xbundles/org.eclipse.swt/Eclipse SWT Drag and Drop/win32/org/eclipse/swt/dnd/TextTransfer.java10
-rwxr-xr-xbundles/org.eclipse.swt/Eclipse SWT Drag and Drop/win32/org/eclipse/swt/dnd/TransferData.java2
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/win32/org/eclipse/swt/dnd/TreeDragSourceEffect.java14
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/win32/org/eclipse/swt/dnd/TreeDropTargetEffect.java16
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/win32/org/eclipse/swt/dnd/URLTransfer.java6
15 files changed, 160 insertions, 120 deletions
diff --git a/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/win32/org/eclipse/swt/dnd/ByteArrayTransfer.java b/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/win32/org/eclipse/swt/dnd/ByteArrayTransfer.java
index bed769108f..040f460632 100755
--- a/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/win32/org/eclipse/swt/dnd/ByteArrayTransfer.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/win32/org/eclipse/swt/dnd/ByteArrayTransfer.java
@@ -166,7 +166,7 @@ protected void javaToNative (Object object, TransferData transferData) {
// The caller of this method must release the data when it is done with it.
byte[] data = (byte[])object;
int size = data.length;
- int newPtr = OS.GlobalAlloc(OS.GMEM_FIXED | OS.GMEM_ZEROINIT, size);
+ int /*long*/ newPtr = OS.GlobalAlloc(OS.GMEM_FIXED | OS.GMEM_ZEROINIT, size);
OS.MoveMemory(newPtr, data, size);
transferData.stgmedium = new STGMEDIUM();
transferData.stgmedium.tymed = COM.TYMED_HGLOBAL;
@@ -198,10 +198,10 @@ protected Object nativeToJava(TransferData transferData) {
transferData.result = data.GetData(formatetc, stgmedium);
data.Release();
if (transferData.result != COM.S_OK) return null;
- int hMem = stgmedium.unionField;
+ int /*long*/ hMem = stgmedium.unionField;
int size = OS.GlobalSize(hMem);
byte[] buffer = new byte[size];
- int ptr = OS.GlobalLock(hMem);
+ int /*long*/ ptr = OS.GlobalLock(hMem);
OS.MoveMemory(buffer, ptr, size);
OS.GlobalUnlock(hMem);
OS.GlobalFree(hMem);
diff --git a/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/win32/org/eclipse/swt/dnd/Clipboard.java b/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/win32/org/eclipse/swt/dnd/Clipboard.java
index ff1a925d5b..57e7493c9e 100755
--- a/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/win32/org/eclipse/swt/dnd/Clipboard.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/win32/org/eclipse/swt/dnd/Clipboard.java
@@ -309,7 +309,7 @@ public Object getContents(Transfer transfer, int clipboards) {
* the clipboard, use PeekMessage() to enable cross thread
* message sends.
*/
- int[] ppv = new int[1];
+ int /*long*/[] ppv = new int /*long*/[1];
int retryCount = 0;
/* OleGetClipboard([out] ppDataObject).
* AddRef has already been called on ppDataObject by the callee and must be released by the caller.
@@ -511,15 +511,15 @@ private int AddRef() {
private void createCOMInterfaces() {
// register each of the interfaces that this object implements
iDataObject = new COMObject(new int[]{2, 0, 0, 2, 2, 1, 2, 3, 2, 4, 1, 1}){
- public int method0(int[] args) {return QueryInterface(args[0], args[1]);}
- public int method1(int[] args) {return AddRef();}
- public int method2(int[] args) {return Release();}
- public int method3(int[] args) {return GetData(args[0], args[1]);}
+ public int /*long*/ method0(int /*long*/[] args) {return QueryInterface(args[0], args[1]);}
+ public int /*long*/ method1(int /*long*/[] args) {return AddRef();}
+ public int /*long*/ method2(int /*long*/[] args) {return Release();}
+ public int /*long*/ method3(int /*long*/[] args) {return GetData(args[0], args[1]);}
// method4 GetDataHere - not implemented
- public int method5(int[] args) {return QueryGetData(args[0]);}
+ public int /*long*/ method5(int /*long*/[] args) {return QueryGetData(args[0]);}
// method6 GetCanonicalFormatEtc - not implemented
// method7 SetData - not implemented
- public int method8(int[] args) {return EnumFormatEtc(args[0], args[1]);}
+ public int /*long*/ method8(int /*long*/[] args) {return EnumFormatEtc((int)/*64*/args[0], args[1]);}
// method9 DAdvise - not implemented
// method10 DUnadvise - not implemented
// method11 EnumDAdvise - not implemented
@@ -535,7 +535,7 @@ private void disposeCOMInterfaces() {
* Ownership of ppenumFormatetc transfers from callee to caller so reference count on ppenumFormatetc
* must be incremented before returning. Caller is responsible for releasing ppenumFormatetc.
*/
-private int EnumFormatEtc(int dwDirection, int ppenumFormatetc) {
+private int EnumFormatEtc(int dwDirection, int /*long*/ ppenumFormatetc) {
// only allow getting of data - SetData is not currently supported
if (dwDirection == COM.DATADIR_SET) return COM.E_NOTIMPL;
// what types have been registered?
@@ -561,10 +561,10 @@ private int EnumFormatEtc(int dwDirection, int ppenumFormatetc) {
dropeffect.tymed = COM.TYMED_HGLOBAL;
formats[formats.length -1] = dropeffect;
enumFORMATETC.setFormats(formats);
- OS.MoveMemory(ppenumFormatetc, new int[] {enumFORMATETC.getAddress()}, 4);
+ OS.MoveMemory(ppenumFormatetc, new int /*long*/[] {enumFORMATETC.getAddress()}, OS.PTR_SIZEOF);
return COM.S_OK;
}
-private int GetData(int pFormatetc, int pmedium) {
+private int GetData(int /*long*/ pFormatetc, int /*long*/ pmedium) {
/* Called by a data consumer to obtain data from a source data object.
The GetData method renders the data described in the specified FORMATETC
structure and transfers it through the specified STGMEDIUM structure.
@@ -585,6 +585,7 @@ private int GetData(int pFormatetc, int pmedium) {
STGMEDIUM stgmedium = new STGMEDIUM();
stgmedium.tymed = COM.TYMED_HGLOBAL;
stgmedium.unionField = OS.GlobalAlloc(COM.GMEM_FIXED | COM.GMEM_ZEROINIT, 4);
+ //TODO - should call GlobalLock
OS.MoveMemory(stgmedium.unionField, new int[] {COM.DROPEFFECT_COPY}, 4);
stgmedium.pUnkForRelease = 0;
COM.MoveMemory(pmedium, stgmedium, STGMEDIUM.sizeof);
@@ -605,7 +606,7 @@ private int GetData(int pFormatetc, int pmedium) {
return transferData.result;
}
-private int QueryGetData(int pFormatetc) {
+private int QueryGetData(int /*long*/ pFormatetc) {
if (transferAgents == null) return COM.E_FAIL;
TransferData transferData = new TransferData();
transferData.formatetc = new FORMATETC();
@@ -624,16 +625,16 @@ private int QueryGetData(int pFormatetc) {
* Ownership of ppvObject transfers from callee to caller so reference count on ppvObject
* must be incremented before returning. Caller is responsible for releasing ppvObject.
*/
-private int QueryInterface(int riid, int ppvObject) {
+private int QueryInterface(int /*long*/ riid, int /*long*/ ppvObject) {
if (riid == 0 || ppvObject == 0) return COM.E_INVALIDARG;
GUID guid = new GUID();
COM.MoveMemory(guid, riid, GUID.sizeof);
if (COM.IsEqualGUID(guid, COM.IIDIUnknown) || COM.IsEqualGUID(guid, COM.IIDIDataObject) ) {
- OS.MoveMemory(ppvObject, new int[] {iDataObject.getAddress()}, 4);
+ OS.MoveMemory(ppvObject, new int /*long*/[] {iDataObject.getAddress()}, OS.PTR_SIZEOF);
AddRef();
return COM.S_OK;
}
- OS.MoveMemory(ppvObject, new int[] {0}, 4);
+ OS.MoveMemory(ppvObject, new int /*long*/[] {0}, OS.PTR_SIZEOF);
return COM.E_NOINTERFACE;
}
private int Release() {
@@ -756,13 +757,13 @@ public String[] getAvailableTypeNames() {
private FORMATETC[] _getAvailableTypes() {
FORMATETC[] types = new FORMATETC[0];
- int[] ppv = new int[1];
+ int /*long*/[] ppv = new int /*long*/[1];
/* OleGetClipboard([out] ppDataObject).
* AddRef has already been called on ppDataObject by the callee and must be released by the caller.
*/
if (COM.OleGetClipboard(ppv) != COM.S_OK) return types;
IDataObject dataObject = new IDataObject(ppv[0]);
- int[] ppFormatetc = new int[1];
+ int /*long*/[] ppFormatetc = new int /*long*/[1];
/* EnumFormatEtc([in] dwDirection, [out] ppenumFormatetc)
* AddRef has already been called on ppenumFormatetc by the callee and must be released by the caller.
*/
@@ -771,7 +772,7 @@ private FORMATETC[] _getAvailableTypes() {
if (rc != COM.S_OK)return types;
IEnumFORMATETC enumFormatetc = new IEnumFORMATETC(ppFormatetc[0]);
// Loop over enumerator and save any types that match what we are looking for
- int rgelt = OS.GlobalAlloc(OS.GMEM_FIXED | OS.GMEM_ZEROINIT, FORMATETC.sizeof);
+ int /*long*/ rgelt = OS.GlobalAlloc(OS.GMEM_FIXED | OS.GMEM_ZEROINIT, FORMATETC.sizeof);
int[] pceltFetched = new int[1];
enumFormatetc.Reset();
while (enumFormatetc.Next(1, rgelt, pceltFetched) == COM.S_OK && pceltFetched[0] == 1) {
diff --git a/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/win32/org/eclipse/swt/dnd/DragSource.java b/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/win32/org/eclipse/swt/dnd/DragSource.java
index 5aea5271e0..79e1e3d817 100755
--- a/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/win32/org/eclipse/swt/dnd/DragSource.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/win32/org/eclipse/swt/dnd/DragSource.java
@@ -238,23 +238,23 @@ private int AddRef() {
private void createCOMInterfaces() {
// register each of the interfaces that this object implements
iDropSource = new COMObject(new int[]{2, 0, 0, 2, 1}){
- public int method0(int[] args) {return QueryInterface(args[0], args[1]);}
- public int method1(int[] args) {return AddRef();}
- public int method2(int[] args) {return Release();}
- public int method3(int[] args) {return QueryContinueDrag(args[0], args[1]);}
- public int method4(int[] args) {return GiveFeedback(args[0]);}
+ public int /*long*/ method0(int /*long*/[] args) {return QueryInterface(args[0], args[1]);}
+ public int /*long*/ method1(int /*long*/[] args) {return AddRef();}
+ public int /*long*/ method2(int /*long*/[] args) {return Release();}
+ public int /*long*/ method3(int /*long*/[] args) {return QueryContinueDrag((int)/*64*/args[0], (int)/*64*/args[1]);}
+ public int /*long*/ method4(int /*long*/[] args) {return GiveFeedback((int)/*64*/args[0]);}
};
iDataObject = new COMObject(new int[]{2, 0, 0, 2, 2, 1, 2, 3, 2, 4, 1, 1}){
- public int method0(int[] args) {return QueryInterface(args[0], args[1]);}
- public int method1(int[] args) {return AddRef();}
- public int method2(int[] args) {return Release();}
- public int method3(int[] args) {return GetData(args[0], args[1]);}
+ public int /*long*/ method0(int /*long*/[] args) {return QueryInterface(args[0], args[1]);}
+ public int /*long*/ method1(int /*long*/[] args) {return AddRef();}
+ public int /*long*/ method2(int /*long*/[] args) {return Release();}
+ public int /*long*/ method3(int /*long*/[] args) {return GetData(args[0], args[1]);}
// method4 GetDataHere - not implemented
- public int method5(int[] args) {return QueryGetData(args[0]);}
+ public int /*long*/ method5(int /*long*/[] args) {return QueryGetData(args[0]);}
// method6 GetCanonicalFormatEtc - not implemented
- public int method7(int[] args) {return SetData(args[0], args[1], args[2]);}
- public int method8(int[] args) {return EnumFormatEtc(args[0], args[1]);}
+ public int /*long*/ method7(int /*long*/[] args) {return SetData(args[0], args[1], (int)/*64*/args[2]);}
+ public int /*long*/ method8(int /*long*/[] args) {return EnumFormatEtc((int)/*64*/args[0], args[1]);}
// method9 DAdvise - not implemented
// method10 DUnadvise - not implemented
// method11 EnumDAdvise - not implemented
@@ -348,7 +348,7 @@ private void drag(Event dragEvent) {
* Ownership of ppenumFormatetc transfers from callee to caller so reference count on ppenumFormatetc
* must be incremented before returning. Caller is responsible for releasing ppenumFormatetc.
*/
-private int EnumFormatEtc(int dwDirection, int ppenumFormatetc) {
+private int EnumFormatEtc(int dwDirection, int /*long*/ ppenumFormatetc) {
// only allow getting of data - SetData is not currently supported
if (dwDirection == COM.DATADIR_SET) return COM.E_NOTIMPL;
@@ -374,7 +374,7 @@ private int EnumFormatEtc(int dwDirection, int ppenumFormatetc) {
}
enumFORMATETC.setFormats(formats);
- OS.MoveMemory(ppenumFormatetc, new int[] {enumFORMATETC.getAddress()}, 4);
+ OS.MoveMemory(ppenumFormatetc, new int /*long*/[] {enumFORMATETC.getAddress()}, OS.PTR_SIZEOF);
return COM.S_OK;
}
/**
@@ -387,7 +387,7 @@ public Control getControl() {
return control;
}
-private int GetData(int pFormatetc, int pmedium) {
+private int GetData(int /*long*/ pFormatetc, int /*long*/ pmedium) {
/* Called by a data consumer to obtain data from a source data object.
The GetData method renders the data described in the specified FORMATETC
structure and transfers it through the specified STGMEDIUM structure.
@@ -520,7 +520,7 @@ private int osToOp(int osOperation){
return operation;
}
-private int QueryGetData(int pFormatetc) {
+private int QueryGetData(int /*long*/ pFormatetc) {
if (transferAgents == null) return COM.E_FAIL;
TransferData transferData = new TransferData();
transferData.formatetc = new FORMATETC();
@@ -541,25 +541,25 @@ private int QueryGetData(int pFormatetc) {
* Ownership of ppvObject transfers from callee to caller so reference count on ppvObject
* must be incremented before returning. Caller is responsible for releasing ppvObject.
*/
-private int QueryInterface(int riid, int ppvObject) {
+private int QueryInterface(int /*long*/ riid, int /*long*/ ppvObject) {
if (riid == 0 || ppvObject == 0)
return COM.E_INVALIDARG;
GUID guid = new GUID();
COM.MoveMemory(guid, riid, GUID.sizeof);
if (COM.IsEqualGUID(guid, COM.IIDIUnknown) || COM.IsEqualGUID(guid, COM.IIDIDropSource)) {
- OS.MoveMemory(ppvObject, new int[] {iDropSource.getAddress()}, 4);
+ OS.MoveMemory(ppvObject, new int /*long*/[] {iDropSource.getAddress()}, OS.PTR_SIZEOF);
AddRef();
return COM.S_OK;
}
if (COM.IsEqualGUID(guid, COM.IIDIDataObject) ) {
- OS.MoveMemory(ppvObject, new int[] {iDataObject.getAddress()}, 4);
+ OS.MoveMemory(ppvObject, new int /*long*/[] {iDataObject.getAddress()}, OS.PTR_SIZEOF);
AddRef();
return COM.S_OK;
}
- OS.MoveMemory(ppvObject, new int[] {0}, 4);
+ OS.MoveMemory(ppvObject, new int /*long*/[] {0}, OS.PTR_SIZEOF);
return COM.E_NOINTERFACE;
}
@@ -596,17 +596,18 @@ public void removeDragListener(DragSourceListener listener) {
removeListener(DND.DragEnd, listener);
}
-private int SetData(int pFormatetc, int pmedium, int fRelease) {
+private int SetData(int /*long*/ pFormatetc, int /*long*/ pmedium, int fRelease) {
if (pFormatetc == 0 || pmedium == 0) return COM.E_INVALIDARG;
FORMATETC formatetc = new FORMATETC();
COM.MoveMemory(formatetc, pFormatetc, FORMATETC.sizeof);
if (formatetc.cfFormat == CFSTR_PERFORMEDDROPEFFECT && formatetc.tymed == COM.TYMED_HGLOBAL) {
STGMEDIUM stgmedium = new STGMEDIUM();
COM.MoveMemory(stgmedium, pmedium,STGMEDIUM.sizeof);
- int[] ptrEffect = new int[1];
- OS.MoveMemory(ptrEffect, stgmedium.unionField,4);
+ //TODO - this should be GlobalLock()
+ int /*long*/[] ptrEffect = new int /*long*/[1];
+ OS.MoveMemory(ptrEffect, stgmedium.unionField, OS.PTR_SIZEOF);
int[] effect = new int[1];
- OS.MoveMemory(effect, ptrEffect[0],4);
+ OS.MoveMemory(effect, ptrEffect[0], 4);
dataEffect = osToOp(effect[0]);
}
if (fRelease == 1) {
diff --git a/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/win32/org/eclipse/swt/dnd/DropTarget.java b/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/win32/org/eclipse/swt/dnd/DropTarget.java
index 70f2dfd6b5..2a01c876f2 100755
--- a/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/win32/org/eclipse/swt/dnd/DropTarget.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/win32/org/eclipse/swt/dnd/DropTarget.java
@@ -12,6 +12,7 @@ package org.eclipse.swt.dnd;
import org.eclipse.swt.*;
import org.eclipse.swt.widgets.*;
+import org.eclipse.swt.internal.*;
import org.eclipse.swt.internal.ole.win32.*;
import org.eclipse.swt.internal.win32.*;
@@ -227,16 +228,34 @@ protected void checkSubclass () {
void createCOMInterfaces() {
// register each of the interfaces that this object implements
- iDropTarget = new COMObject(new int[]{2, 0, 0, 5, 4, 0, 5}){
- public int method0(int[] args) {return QueryInterface(args[0], args[1]);}
- public int method1(int[] args) {return AddRef();}
- public int method2(int[] args) {return Release();}
- public int method3(int[] args) {return DragEnter(args[0], args[1], args[2], args[3], args[4]);}
- public int method4(int[] args) {return DragOver(args[0], args[1], args[2], args[3]);}
- public int method5(int[] args) {return DragLeave();}
- public int method6(int[] args) {return Drop(args[0], args[1], args[2], args[3], args[4]);}
+ boolean is32 = C.PTR_SIZEOF == 4;
+ iDropTarget = new COMObject(new int[]{2, 0, 0, is32 ? 5 : 4, is32 ? 4 : 3, 0, is32 ? 5 : 4}){
+ public int /*long*/ method0(int /*long*/[] args) {return QueryInterface(args[0], args[1]);}
+ public int /*long*/ method1(int /*long*/[] args) {return AddRef();}
+ public int /*long*/ method2(int /*long*/[] args) {return Release();}
+ public int /*long*/ method3(int /*long*/[] args) {
+ if (args.length == 5) {
+ return DragEnter(args[0], (int)/*64*/args[1], (int)/*64*/args[2], (int)/*64*/args[3], args[4]);
+ } else {
+ return DragEnter_64(args[0], (int)/*64*/args[1], args[2], args[3]);
+ }
+ }
+ public int /*long*/ method4(int /*long*/[] args) {
+ if (args.length == 4) {
+ return DragOver((int)/*64*/args[0], (int)/*64*/args[1], (int)/*64*/args[2], args[3]);
+ } else {
+ return DragOver_64((int)/*64*/args[0], args[1], args[2]);
+ }
+ }
+ public int /*long*/ method5(int /*long*/[] args) {return DragLeave();}
+ public int /*long*/ method6(int /*long*/[] args) {
+ if (args.length == 5) {
+ return Drop(args[0], (int)/*64*/args[1], (int)/*64*/args[2], (int)/*64*/args[3], args[4]);
+ } else {
+ return Drop_64(args[0], (int)/*64*/args[1], args[2], args[3]);
+ }
+ }
};
-
}
void disposeCOMInterfaces() {
@@ -245,7 +264,13 @@ void disposeCOMInterfaces() {
iDropTarget = null;
}
-int DragEnter(int pDataObject, int grfKeyState, int pt_x, int pt_y, int pdwEffect) {
+int DragEnter_64(int /*long*/ pDataObject, int grfKeyState, long pt, int /*long*/ pdwEffect) {
+ POINT point = new POINT();
+ OS.MoveMemory(point, new long[]{pt}, 8);
+ return DragEnter(pDataObject, grfKeyState, point.x, point.y, pdwEffect);
+}
+
+int DragEnter(int /*long*/ pDataObject, int grfKeyState, int pt_x, int pt_y, int /*long*/ pdwEffect) {
selectedDataType = null;
selectedOperation = DND.DROP_NONE;
if (iDataObject != null) iDataObject.Release();
@@ -304,7 +329,13 @@ int DragLeave() {
return COM.S_OK;
}
-int DragOver(int grfKeyState, int pt_x, int pt_y, int pdwEffect) {
+int DragOver_64(int grfKeyState, long pt, int /*long*/ pdwEffect) {
+ POINT point = new POINT();
+ OS.MoveMemory(point, new long[]{pt}, 8);
+ return DragOver(grfKeyState, point.x, point.y, pdwEffect);
+}
+
+int DragOver(int grfKeyState, int pt_x, int pt_y, int /*long*/ pdwEffect) {
if (iDataObject == null) return COM.S_FALSE;
int oldKeyOperation = keyOperation;
@@ -350,7 +381,13 @@ int DragOver(int grfKeyState, int pt_x, int pt_y, int pdwEffect) {
return COM.S_OK;
}
-int Drop(int pDataObject, int grfKeyState, int pt_x, int pt_y, int pdwEffect) {
+int Drop_64(int /*long*/ pDataObject, int grfKeyState, long pt, int /*long*/ pdwEffect) {
+ POINT point = new POINT();
+ OS.MoveMemory(point, new long[]{pt}, 8);
+ return Drop(pDataObject, grfKeyState, point.x, point.y, pdwEffect);
+}
+
+int Drop(int /*long*/ pDataObject, int grfKeyState, int pt_x, int pt_y, int /*long*/ pdwEffect) {
DNDEvent event = new DNDEvent();
event.widget = this;
event.time = OS.GetMessageTime();
@@ -522,19 +559,19 @@ int osToOp(int osOperation){
* Ownership of ppvObject transfers from callee to caller so reference count on ppvObject
* must be incremented before returning. Caller is responsible for releasing ppvObject.
*/
-int QueryInterface(int riid, int ppvObject) {
+int QueryInterface(int /*long*/ riid, int /*long*/ ppvObject) {
if (riid == 0 || ppvObject == 0)
return COM.E_INVALIDARG;
GUID guid = new GUID();
COM.MoveMemory(guid, riid, GUID.sizeof);
if (COM.IsEqualGUID(guid, COM.IIDIUnknown) || COM.IsEqualGUID(guid, COM.IIDIDropTarget)) {
- OS.MoveMemory(ppvObject, new int[] {iDropTarget.getAddress()}, 4);
+ COM.MoveMemory(ppvObject, new int /*long*/[] {iDropTarget.getAddress()}, OS.PTR_SIZEOF);
AddRef();
return COM.S_OK;
}
- OS.MoveMemory(ppvObject, new int[] {0}, 4);
+ COM.MoveMemory(ppvObject, new int /*long*/[] {0}, OS.PTR_SIZEOF);
return COM.E_NOINTERFACE;
}
@@ -551,7 +588,7 @@ int Release() {
void refresh() {
if (control == null || control.isDisposed()) return;
- int handle = control.handle;
+ int /*long*/ handle = control.handle;
RECT lpRect = new RECT();
if (OS.GetUpdateRect(handle, lpRect, false)) {
OS.ImageList_DragShowNolock(false);
@@ -600,7 +637,7 @@ public void setDropTargetEffect(DropTargetEffect effect) {
dropEffect = effect;
}
-boolean setEventData(DNDEvent event, int pDataObject, int grfKeyState, int pt_x, int pt_y, int pdwEffect) {
+boolean setEventData(DNDEvent event, int /*long*/ pDataObject, int grfKeyState, int pt_x, int pt_y, int /*long*/ pdwEffect) {
if (pDataObject == 0 || pdwEffect == 0) return false;
// get allowed operations
@@ -626,14 +663,14 @@ boolean setEventData(DNDEvent event, int pDataObject, int grfKeyState, int pt_x,
IDataObject dataObject = new IDataObject(pDataObject);
dataObject.AddRef();
try {
- int[] address = new int[1];
+ int /*long*/[] address = new int /*long*/[1];
if (dataObject.EnumFormatEtc(COM.DATADIR_GET, address) != COM.S_OK) {
return false;
}
IEnumFORMATETC enumFormatetc = new IEnumFORMATETC(address[0]);
try {
// Loop over enumerator and save any types that match what we are looking for
- int rgelt = OS.GlobalAlloc(OS.GMEM_FIXED | OS.GMEM_ZEROINIT, FORMATETC.sizeof);
+ int /*long*/ rgelt = OS.GlobalAlloc(OS.GMEM_FIXED | OS.GMEM_ZEROINIT, FORMATETC.sizeof);
try {
int[] pceltFetched = new int[1];
enumFormatetc.Reset();
diff --git a/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/win32/org/eclipse/swt/dnd/FileTransfer.java b/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/win32/org/eclipse/swt/dnd/FileTransfer.java
index 6aceeeb1ae..bd354f50bf 100755
--- a/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/win32/org/eclipse/swt/dnd/FileTransfer.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/win32/org/eclipse/swt/dnd/FileTransfer.java
@@ -81,7 +81,7 @@ public void javaToNative(Object object, TransferData transferData) {
// Allocate the memory because the caller (DropTarget) has not handed it in
// The caller of this method must release the data when it is done with it.
int byteCount = buffer.length() * TCHAR.sizeof;
- int newPtr = OS.GlobalAlloc(COM.GMEM_FIXED | COM.GMEM_ZEROINIT, DROPFILES.sizeof + byteCount);
+ int /*long*/ newPtr = OS.GlobalAlloc(COM.GMEM_FIXED | COM.GMEM_ZEROINIT, DROPFILES.sizeof + byteCount);
OS.MoveMemory(newPtr, dropfiles, DROPFILES.sizeof);
OS.MoveMemory(newPtr + DROPFILES.sizeof, buffer, byteCount);
transferData.stgmedium = new STGMEDIUM();
diff --git a/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/win32/org/eclipse/swt/dnd/HTMLTransfer.java b/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/win32/org/eclipse/swt/dnd/HTMLTransfer.java
index 7c7c592cd2..5f6eca10df 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/win32/org/eclipse/swt/dnd/HTMLTransfer.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/win32/org/eclipse/swt/dnd/HTMLTransfer.java
@@ -105,7 +105,7 @@ public void javaToNative (Object object, TransferData transferData){
chars = new char[count + 1];
buffer.getChars(0, count, chars, 0);
cchMultiByte = OS.WideCharToMultiByte(codePage, 0, chars, -1, null, 0, null, null);
- int lpMultiByteStr = OS.GlobalAlloc(OS.GMEM_FIXED | OS.GMEM_ZEROINIT, cchMultiByte);
+ int /*long*/ lpMultiByteStr = OS.GlobalAlloc(OS.GMEM_FIXED | OS.GMEM_ZEROINIT, cchMultiByte);
OS.WideCharToMultiByte(codePage, 0, chars, -1, lpMultiByteStr, cchMultiByte, null, null);
transferData.stgmedium = new STGMEDIUM();
transferData.stgmedium.tymed = COM.TYMED_HGLOBAL;
@@ -135,10 +135,10 @@ public Object nativeToJava(TransferData transferData){
transferData.result = data.GetData(formatetc, stgmedium);
data.Release();
if (transferData.result != COM.S_OK) return null;
- int hMem = stgmedium.unionField;
+ int /*long*/ hMem = stgmedium.unionField;
try {
- int lpMultiByteStr = OS.GlobalLock(hMem);
+ int /*long*/ lpMultiByteStr = OS.GlobalLock(hMem);
if (lpMultiByteStr == 0) return null;
try {
int codePage = OS.GetACP();
diff --git a/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/win32/org/eclipse/swt/dnd/OleEnumFORMATETC.java b/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/win32/org/eclipse/swt/dnd/OleEnumFORMATETC.java
index 07482f75f7..eddb16b27b 100755
--- a/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/win32/org/eclipse/swt/dnd/OleEnumFORMATETC.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/win32/org/eclipse/swt/dnd/OleEnumFORMATETC.java
@@ -10,6 +10,7 @@
*******************************************************************************/
package org.eclipse.swt.dnd;
+import org.eclipse.swt.internal.win32.*;
import org.eclipse.swt.internal.ole.win32.*;
final class OleEnumFORMATETC {
@@ -34,17 +35,17 @@ int AddRef() {
private void createCOMInterfaces() {
// register each of the interfaces that this object implements
iUnknown = new COMObject(new int[] {2, 0, 0}){
- public int method0(int[] args) {return QueryInterface(args[0], args[1]);}
- public int method1(int[] args) {return AddRef();}
- public int method2(int[] args) {return Release();}
+ public int /*long*/ method0(int /*long*/[] args) {return QueryInterface(args[0], args[1]);}
+ public int /*long*/ method1(int /*long*/[] args) {return AddRef();}
+ public int /*long*/ method2(int /*long*/[] args) {return Release();}
};
iEnumFORMATETC = new COMObject(new int[] {2, 0, 0, 3, 1, 0, 1}){
- public int method0(int[] args) {return QueryInterface(args[0], args[1]);}
- public int method1(int[] args) {return AddRef();}
- public int method2(int[] args) {return Release();}
- public int method3(int[] args) {return Next(args[0], args[1], args[2]);}
- public int method4(int[] args) {return Skip(args[0]);}
- public int method5(int[] args) {return Reset();}
+ public int /*long*/ method0(int /*long*/[] args) {return QueryInterface(args[0], args[1]);}
+ public int /*long*/ method1(int /*long*/[] args) {return AddRef();}
+ public int /*long*/ method2(int /*long*/[] args) {return Release();}
+ public int /*long*/ method3(int /*long*/[] args) {return Next((int)/*64*/args[0], args[1], args[2]);}
+ public int /*long*/ method4(int /*long*/[] args) {return Skip((int)/*64*/args[0]);}
+ public int /*long*/ method5(int /*long*/[] args) {return Reset();}
// method6 Clone - not implemented
};
}
@@ -58,7 +59,7 @@ private void disposeCOMInterfaces() {
iEnumFORMATETC.dispose();
iEnumFORMATETC = null;
}
-int getAddress() {
+int /*long*/ getAddress() {
return iEnumFORMATETC.getAddress();
}
private FORMATETC[] getNextItems(int numItems){
@@ -77,7 +78,7 @@ private FORMATETC[] getNextItems(int numItems){
return items;
}
-private int Next(int celt, int rgelt, int pceltFetched) {
+private int Next(int celt, int /*long*/ rgelt, int /*long*/ pceltFetched) {
/* Retrieves the next celt items in the enumeration sequence.
If there are fewer than the requested number of elements left in the sequence,
it retrieves the remaining elements.
@@ -107,7 +108,7 @@ private int Next(int celt, int rgelt, int pceltFetched) {
}
return COM.S_FALSE;
}
-private int QueryInterface(int riid, int ppvObject) {
+private int QueryInterface(int /*long*/ riid, int /*long*/ ppvObject) {
if (riid == 0 || ppvObject == 0) return COM.E_NOINTERFACE;
@@ -115,16 +116,16 @@ private int QueryInterface(int riid, int ppvObject) {
COM.MoveMemory(guid, riid, GUID.sizeof);
if (COM.IsEqualGUID(guid, COM.IIDIUnknown)) {
- COM.MoveMemory(ppvObject, new int[] {iUnknown.getAddress()}, 4);
+ COM.MoveMemory(ppvObject, new int /*long*/[] {iUnknown.getAddress()}, OS.PTR_SIZEOF);
AddRef();
return COM.S_OK;
}
if (COM.IsEqualGUID(guid, COM.IIDIEnumFORMATETC)) {
- COM.MoveMemory(ppvObject, new int[] {iEnumFORMATETC.getAddress()}, 4);
+ COM.MoveMemory(ppvObject, new int /*long*/[] {iEnumFORMATETC.getAddress()}, OS.PTR_SIZEOF);
AddRef();
return COM.S_OK;
}
- COM.MoveMemory(ppvObject, new int[] {0}, 4);
+ COM.MoveMemory(ppvObject, new int /*long*/[] {0}, OS.PTR_SIZEOF);
return COM.E_NOINTERFACE;
}
int Release() {
diff --git a/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/win32/org/eclipse/swt/dnd/RTFTransfer.java b/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/win32/org/eclipse/swt/dnd/RTFTransfer.java
index 38e6053277..368a1c6d76 100755
--- a/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/win32/org/eclipse/swt/dnd/RTFTransfer.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/win32/org/eclipse/swt/dnd/RTFTransfer.java
@@ -68,7 +68,7 @@ public void javaToNative (Object object, TransferData transferData){
transferData.result = COM.DV_E_STGMEDIUM;
return;
}
- int lpMultiByteStr = OS.GlobalAlloc(COM.GMEM_FIXED | COM.GMEM_ZEROINIT, cchMultiByte);
+ int /*long*/ lpMultiByteStr = OS.GlobalAlloc(COM.GMEM_FIXED | COM.GMEM_ZEROINIT, cchMultiByte);
OS.WideCharToMultiByte(codePage, 0, chars, -1, lpMultiByteStr, cchMultiByte, null, null);
transferData.stgmedium = new STGMEDIUM();
transferData.stgmedium.tymed = COM.TYMED_HGLOBAL;
@@ -98,9 +98,9 @@ public Object nativeToJava(TransferData transferData){
transferData.result = data.GetData(formatetc, stgmedium);
data.Release();
if (transferData.result != COM.S_OK) return null;
- int hMem = stgmedium.unionField;
+ int /*long*/ hMem = stgmedium.unionField;
try {
- int lpMultiByteStr = OS.GlobalLock(hMem);
+ int /*long*/ lpMultiByteStr = OS.GlobalLock(hMem);
if (lpMultiByteStr == 0) return null;
try {
int codePage = OS.GetACP();
diff --git a/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/win32/org/eclipse/swt/dnd/TableDragSourceEffect.java b/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/win32/org/eclipse/swt/dnd/TableDragSourceEffect.java
index a134b2628e..c545b4b367 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/win32/org/eclipse/swt/dnd/TableDragSourceEffect.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/win32/org/eclipse/swt/dnd/TableDragSourceEffect.java
@@ -80,27 +80,27 @@ public class TableDragSourceEffect extends DragSourceEffect {
Table table = (Table) control;
TableItem[] selection = table.getSelection();
if (selection.length == 0) return null;
- int tableImageList = OS.SendMessage (table.handle, OS.LVM_GETIMAGELIST, OS.LVSIL_SMALL, 0);
+ int /*long*/ tableImageList = OS.SendMessage (table.handle, OS.LVM_GETIMAGELIST, OS.LVSIL_SMALL, 0);
if (tableImageList != 0) {
int count = Math.min(selection.length, 10);
Rectangle bounds = selection[0].getBounds(0);
for (int i = 1; i < count; i++) {
bounds = bounds.union(selection[i].getBounds(0));
}
- int hDC = OS.GetDC(0);
- int hDC1 = OS.CreateCompatibleDC(hDC);
- int bitmap = OS.CreateCompatibleBitmap(hDC, bounds.width, bounds.height);
- int hOldBitmap = OS.SelectObject(hDC1, bitmap);
+ int /*long*/ hDC = OS.GetDC(0);
+ int /*long*/ hDC1 = OS.CreateCompatibleDC(hDC);
+ int /*long*/ bitmap = OS.CreateCompatibleBitmap(hDC, bounds.width, bounds.height);
+ int /*long*/ hOldBitmap = OS.SelectObject(hDC1, bitmap);
RECT rect = new RECT();
rect.right = bounds.width;
rect.bottom = bounds.height;
- int hBrush = OS.GetStockObject(OS.WHITE_BRUSH);
+ int /*long*/ hBrush = OS.GetStockObject(OS.WHITE_BRUSH);
OS.FillRect(hDC1, rect, hBrush);
for (int i = 0; i < count; i++) {
TableItem selected = selection[i];
Rectangle cell = selected.getBounds(0);
POINT pt = new POINT();
- int imageList = OS.SendMessage (table.handle, OS.LVM_CREATEDRAGIMAGE, table.indexOf(selected), pt);
+ int /*long*/ imageList = OS.SendMessage (table.handle, OS.LVM_CREATEDRAGIMAGE, table.indexOf(selected), pt);
OS.ImageList_Draw(imageList, 0, hDC1, cell.x - bounds.x, cell.y - bounds.y, OS.ILD_SELECTED);
OS.ImageList_Destroy(imageList);
}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/win32/org/eclipse/swt/dnd/TableDropTargetEffect.java b/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/win32/org/eclipse/swt/dnd/TableDropTargetEffect.java
index 04e2f9c4bf..5e16a41269 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/win32/org/eclipse/swt/dnd/TableDropTargetEffect.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/win32/org/eclipse/swt/dnd/TableDropTargetEffect.java
@@ -103,7 +103,7 @@ public class TableDropTargetEffect extends DropTargetEffect {
*/
public void dragLeave(DropTargetEvent event) {
Table table = (Table) control;
- int handle = table.handle;
+ int /*long*/ handle = table.handle;
if (dropHighlight != null) {
LVITEM lvItem = new LVITEM ();
lvItem.stateMask = OS.LVIS_DROPHILITED;
@@ -134,7 +134,7 @@ public class TableDropTargetEffect extends DropTargetEffect {
public void dragOver(DropTargetEvent event) {
Table table = (Table) getControl();
int effect = checkEffect(event.feedback);
- int handle = table.handle;
+ int /*long*/ handle = table.handle;
Point coordinates = new Point(event.x, event.y);
coordinates = table.toControl(coordinates);
LVHITTESTINFO pinfo = new LVHITTESTINFO();
@@ -147,8 +147,8 @@ public class TableDropTargetEffect extends DropTargetEffect {
} else {
if (pinfo.iItem != -1 && scrollIndex == pinfo.iItem && scrollBeginTime != 0) {
if (System.currentTimeMillis() >= scrollBeginTime) {
- int top = Math.max (0, OS.SendMessage (handle, OS.LVM_GETTOPINDEX, 0, 0));
- int count = OS.SendMessage (handle, OS.LVM_GETITEMCOUNT, 0, 0);
+ int top = Math.max (0, (int)/*64*/OS.SendMessage (handle, OS.LVM_GETTOPINDEX, 0, 0));
+ int count = (int)/*64*/OS.SendMessage (handle, OS.LVM_GETITEMCOUNT, 0, 0);
int index = (scrollIndex - 1 < top) ? Math.max(0, scrollIndex - 1) : Math.min(count - 1, scrollIndex + 1);
boolean scroll = true;
if (pinfo.iItem == top) {
diff --git a/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/win32/org/eclipse/swt/dnd/TextTransfer.java b/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/win32/org/eclipse/swt/dnd/TextTransfer.java
index 44380f1e69..7e79d54662 100755
--- a/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/win32/org/eclipse/swt/dnd/TextTransfer.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/win32/org/eclipse/swt/dnd/TextTransfer.java
@@ -68,7 +68,7 @@ public void javaToNative (Object object, TransferData transferData){
char[] chars = new char[charCount+1];
string.getChars (0, charCount, chars, 0);
int byteCount = chars.length * 2;
- int newPtr = OS.GlobalAlloc(COM.GMEM_FIXED | COM.GMEM_ZEROINIT, byteCount);
+ int /*long*/ newPtr = OS.GlobalAlloc(COM.GMEM_FIXED | COM.GMEM_ZEROINIT, byteCount);
OS.MoveMemory(newPtr, chars, byteCount);
transferData.stgmedium = new STGMEDIUM();
transferData.stgmedium.tymed = COM.TYMED_HGLOBAL;
@@ -88,7 +88,7 @@ public void javaToNative (Object object, TransferData transferData){
transferData.result = COM.DV_E_STGMEDIUM;
return;
}
- int lpMultiByteStr = OS.GlobalAlloc(COM.GMEM_FIXED | COM.GMEM_ZEROINIT, cchMultiByte);
+ int /*long*/ lpMultiByteStr = OS.GlobalAlloc(COM.GMEM_FIXED | COM.GMEM_ZEROINIT, cchMultiByte);
OS.WideCharToMultiByte(codePage, 0, chars, -1, lpMultiByteStr, cchMultiByte, null, null);
transferData.stgmedium = new STGMEDIUM();
transferData.stgmedium.tymed = COM.TYMED_HGLOBAL;
@@ -121,7 +121,7 @@ public Object nativeToJava(TransferData transferData){
transferData.result = data.GetData(formatetc, stgmedium);
data.Release();
if (transferData.result != COM.S_OK) return null;
- int hMem = stgmedium.unionField;
+ int /*long*/ hMem = stgmedium.unionField;
try {
switch (transferData.type) {
case CF_UNICODETEXTID: {
@@ -129,7 +129,7 @@ public Object nativeToJava(TransferData transferData){
int size = OS.GlobalSize(hMem) / 2 * 2;
if (size == 0) return null;
char[] chars = new char[size/2];
- int ptr = OS.GlobalLock(hMem);
+ int /*long*/ ptr = OS.GlobalLock(hMem);
if (ptr == 0) return null;
try {
OS.MoveMemory(chars, ptr, size);
@@ -146,7 +146,7 @@ public Object nativeToJava(TransferData transferData){
}
}
case CF_TEXTID: {
- int lpMultiByteStr = OS.GlobalLock(hMem);
+ int /*long*/ lpMultiByteStr = OS.GlobalLock(hMem);
if (lpMultiByteStr == 0) return null;
try {
int codePage = OS.GetACP();
diff --git a/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/win32/org/eclipse/swt/dnd/TransferData.java b/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/win32/org/eclipse/swt/dnd/TransferData.java
index eb8019c20f..6770c9c51f 100755
--- a/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/win32/org/eclipse/swt/dnd/TransferData.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/win32/org/eclipse/swt/dnd/TransferData.java
@@ -92,7 +92,7 @@ public class TransferData {
* platforms and should never be accessed from application code.
* </p>
*/
- public int pIDataObject;
+ public int /*long*/ pIDataObject;
static boolean sameType(TransferData data1, TransferData data2) {
if (data1 == data2) return true;
diff --git a/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/win32/org/eclipse/swt/dnd/TreeDragSourceEffect.java b/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/win32/org/eclipse/swt/dnd/TreeDragSourceEffect.java
index 0beb423819..819e7766cf 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/win32/org/eclipse/swt/dnd/TreeDragSourceEffect.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/win32/org/eclipse/swt/dnd/TreeDragSourceEffect.java
@@ -79,26 +79,26 @@ public class TreeDragSourceEffect extends DragSourceEffect {
Tree tree = (Tree) control;
TreeItem[] selection = tree.getSelection();
if (selection.length == 0) return null;
- int treeImageList = OS.SendMessage (tree.handle, OS.TVM_GETIMAGELIST, OS.TVSIL_NORMAL, 0);
+ int /*long*/ treeImageList = OS.SendMessage (tree.handle, OS.TVM_GETIMAGELIST, OS.TVSIL_NORMAL, 0);
if (treeImageList != 0) {
int count = Math.min(selection.length, 10);
Rectangle bounds = selection[0].getBounds(0);
for (int i = 1; i < count; i++) {
bounds = bounds.union(selection[i].getBounds(0));
}
- int hDC = OS.GetDC(0);
- int hDC1 = OS.CreateCompatibleDC(hDC);
- int bitmap = OS.CreateCompatibleBitmap(hDC, bounds.width, bounds.height);
- int hOldBitmap = OS.SelectObject(hDC1, bitmap);
+ int /*long*/ hDC = OS.GetDC(0);
+ int /*long*/ hDC1 = OS.CreateCompatibleDC(hDC);
+ int /*long*/ bitmap = OS.CreateCompatibleBitmap(hDC, bounds.width, bounds.height);
+ int /*long*/ hOldBitmap = OS.SelectObject(hDC1, bitmap);
RECT rect = new RECT();
rect.right = bounds.width;
rect.bottom = bounds.height;
- int hBrush = OS.GetStockObject(OS.WHITE_BRUSH);
+ int /*long*/ hBrush = OS.GetStockObject(OS.WHITE_BRUSH);
OS.FillRect(hDC1, rect, hBrush);
for (int i = 0; i < count; i++) {
TreeItem selected = selection[i];
Rectangle cell = selected.getBounds(0);
- int imageList = OS.SendMessage(tree.handle, OS.TVM_CREATEDRAGIMAGE, 0, selected.handle);
+ int /*long*/ imageList = OS.SendMessage(tree.handle, OS.TVM_CREATEDRAGIMAGE, 0, selected.handle);
OS.ImageList_Draw(imageList, 0, hDC1, cell.x - bounds.x, cell.y - bounds.y, OS.ILD_SELECTED);
OS.ImageList_Destroy(imageList);
}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/win32/org/eclipse/swt/dnd/TreeDropTargetEffect.java b/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/win32/org/eclipse/swt/dnd/TreeDropTargetEffect.java
index 91d10af731..84e0353ca3 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/win32/org/eclipse/swt/dnd/TreeDropTargetEffect.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/win32/org/eclipse/swt/dnd/TreeDropTargetEffect.java
@@ -50,10 +50,10 @@ public class TreeDropTargetEffect extends DropTargetEffect {
static final int SCROLL_HYSTERESIS = 200; // milli seconds
static final int EXPAND_HYSTERESIS = 1000; // milli seconds
- int dropIndex;
- int scrollIndex;
+ int /*long*/ dropIndex;
+ int /*long*/ scrollIndex;
long scrollBeginTime;
- int expandIndex;
+ int /*long*/ expandIndex;
long expandBeginTime;
TreeItem insertItem;
boolean insertBefore;
@@ -114,7 +114,7 @@ public class TreeDropTargetEffect extends DropTargetEffect {
*/
public void dragLeave(DropTargetEvent event) {
Tree tree = (Tree) control;
- int handle = tree.handle;
+ int /*long*/ handle = tree.handle;
if (dropIndex != -1) {
TVITEM tvItem = new TVITEM ();
tvItem.hItem = dropIndex;
@@ -155,22 +155,22 @@ public class TreeDropTargetEffect extends DropTargetEffect {
public void dragOver(DropTargetEvent event) {
Tree tree = (Tree) getControl();
int effect = checkEffect(event.feedback);
- int handle = tree.handle;
+ int /*long*/ handle = tree.handle;
Point coordinates = new Point(event.x, event.y);
coordinates = tree.toControl(coordinates);
TVHITTESTINFO lpht = new TVHITTESTINFO ();
lpht.x = coordinates.x;
lpht.y = coordinates.y;
OS.SendMessage (handle, OS.TVM_HITTEST, 0, lpht);
- int hItem = lpht.hItem;
+ int /*long*/ hItem = lpht.hItem;
if ((effect & DND.FEEDBACK_SCROLL) == 0) {
scrollBeginTime = 0;
scrollIndex = -1;
} else {
if (hItem != -1 && scrollIndex == hItem && scrollBeginTime != 0) {
if (System.currentTimeMillis() >= scrollBeginTime) {
- int topItem = OS.SendMessage(handle, OS.TVM_GETNEXTITEM, OS.TVGN_FIRSTVISIBLE, 0);
- int nextItem = OS.SendMessage(handle, OS.TVM_GETNEXTITEM, hItem == topItem ? OS.TVGN_PREVIOUSVISIBLE : OS.TVGN_NEXTVISIBLE, hItem);
+ int /*long*/ topItem = OS.SendMessage(handle, OS.TVM_GETNEXTITEM, OS.TVGN_FIRSTVISIBLE, 0);
+ int /*long*/ nextItem = OS.SendMessage(handle, OS.TVM_GETNEXTITEM, hItem == topItem ? OS.TVGN_PREVIOUSVISIBLE : OS.TVGN_NEXTVISIBLE, hItem);
boolean scroll = true;
if (hItem == topItem) {
scroll = nextItem != 0;
diff --git a/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/win32/org/eclipse/swt/dnd/URLTransfer.java b/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/win32/org/eclipse/swt/dnd/URLTransfer.java
index dd3e731320..b897be07f4 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/win32/org/eclipse/swt/dnd/URLTransfer.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/win32/org/eclipse/swt/dnd/URLTransfer.java
@@ -74,7 +74,7 @@ public void javaToNative (Object object, TransferData transferData){
transferData.result = COM.DV_E_STGMEDIUM;
return;
}
- int lpMultiByteStr = OS.GlobalAlloc(OS.GMEM_FIXED | OS.GMEM_ZEROINIT, cchMultiByte);
+ int /*long*/ lpMultiByteStr = OS.GlobalAlloc(OS.GMEM_FIXED | OS.GMEM_ZEROINIT, cchMultiByte);
OS.WideCharToMultiByte(codePage, 0, chars, -1, lpMultiByteStr, cchMultiByte, null, null);
transferData.stgmedium = new STGMEDIUM();
transferData.stgmedium.tymed = COM.TYMED_HGLOBAL;
@@ -104,9 +104,9 @@ public Object nativeToJava(TransferData transferData){
transferData.result = data.GetData(formatetc, stgmedium);
data.Release();
if (transferData.result != COM.S_OK) return null;
- int hMem = stgmedium.unionField;
+ int /*long*/ hMem = stgmedium.unionField;
try {
- int lpMultiByteStr = OS.GlobalLock(hMem);
+ int /*long*/ lpMultiByteStr = OS.GlobalLock(hMem);
if (lpMultiByteStr == 0) return null;
try {
int codePage = OS.GetACP();