Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/win32/org/eclipse/swt')
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/win32/org/eclipse/swt/dnd/ByteArrayTransfer.java6
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/win32/org/eclipse/swt/dnd/Clipboard.java34
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/win32/org/eclipse/swt/dnd/DragSource.java46
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/win32/org/eclipse/swt/dnd/DropTarget.java40
-rw-r--r--bundles/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
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/win32/org/eclipse/swt/dnd/ImageTransfer.java18
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/win32/org/eclipse/swt/dnd/OleEnumFORMATETC.java30
-rw-r--r--bundles/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.java30
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/win32/org/eclipse/swt/dnd/TableDropTargetEffect.java4
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/win32/org/eclipse/swt/dnd/TextTransfer.java10
-rw-r--r--bundles/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.java30
-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.java10
16 files changed, 145 insertions, 145 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 d33f8815ae..40fe5bccc0 100644
--- 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 /*long*/ newPtr = OS.GlobalAlloc(OS.GMEM_FIXED | OS.GMEM_ZEROINIT, size);
+ long /*int*/ 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;
@@ -196,10 +196,10 @@ protected Object nativeToJava(TransferData transferData) {
transferData.result = getData(data, formatetc, stgmedium);
data.Release();
if (transferData.result != COM.S_OK) return null;
- int /*long*/ hMem = stgmedium.unionField;
+ long /*int*/ hMem = stgmedium.unionField;
int size = OS.GlobalSize(hMem);
byte[] buffer = new byte[size];
- int /*long*/ ptr = OS.GlobalLock(hMem);
+ long /*int*/ 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 913d7d839e..5567b2d88c 100644
--- 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
@@ -315,7 +315,7 @@ public Object getContents(Transfer transfer, int clipboards) {
* the clipboard, use PeekMessage() to enable cross thread
* message sends.
*/
- int /*long*/[] ppv = new int /*long*/[1];
+ long /*int*/[] ppv = new long /*int*/[1];
int retryCount = 0;
/* OleGetClipboard([out] ppDataObject).
* AddRef has already been called on ppDataObject by the callee and must be released by the caller.
@@ -517,15 +517,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 /*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]);}
+ public long /*int*/ method0(long /*int*/[] args) {return QueryInterface(args[0], args[1]);}
+ public long /*int*/ method1(long /*int*/[] args) {return AddRef();}
+ public long /*int*/ method2(long /*int*/[] args) {return Release();}
+ public long /*int*/ method3(long /*int*/[] args) {return GetData(args[0], args[1]);}
// method4 GetDataHere - not implemented
- public int /*long*/ method5(int /*long*/[] args) {return QueryGetData(args[0]);}
+ public long /*int*/ method5(long /*int*/[] args) {return QueryGetData(args[0]);}
// method6 GetCanonicalFormatEtc - not implemented
// method7 SetData - not implemented
- public int /*long*/ method8(int /*long*/[] args) {return EnumFormatEtc((int)/*64*/args[0], args[1]);}
+ public long /*int*/ method8(long /*int*/[] args) {return EnumFormatEtc((int)/*64*/args[0], args[1]);}
// method9 DAdvise - not implemented
// method10 DUnadvise - not implemented
// method11 EnumDAdvise - not implemented
@@ -541,7 +541,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 /*long*/ ppenumFormatetc) {
+private int EnumFormatEtc(int dwDirection, long /*int*/ 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?
@@ -567,10 +567,10 @@ private int EnumFormatEtc(int dwDirection, int /*long*/ ppenumFormatetc) {
dropeffect.tymed = COM.TYMED_HGLOBAL;
formats[formats.length -1] = dropeffect;
enumFORMATETC.setFormats(formats);
- OS.MoveMemory(ppenumFormatetc, new int /*long*/[] {enumFORMATETC.getAddress()}, OS.PTR_SIZEOF);
+ OS.MoveMemory(ppenumFormatetc, new long /*int*/[] {enumFORMATETC.getAddress()}, OS.PTR_SIZEOF);
return COM.S_OK;
}
-private int GetData(int /*long*/ pFormatetc, int /*long*/ pmedium) {
+private int GetData(long /*int*/ pFormatetc, long /*int*/ 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.
@@ -612,7 +612,7 @@ private int GetData(int /*long*/ pFormatetc, int /*long*/ pmedium) {
return transferData.result;
}
-private int QueryGetData(int /*long*/ pFormatetc) {
+private int QueryGetData(long /*int*/ pFormatetc) {
if (transferAgents == null) return COM.E_FAIL;
TransferData transferData = new TransferData();
transferData.formatetc = new FORMATETC();
@@ -631,16 +631,16 @@ private int QueryGetData(int /*long*/ 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 /*long*/ riid, int /*long*/ ppvObject) {
+private int QueryInterface(long /*int*/ riid, long /*int*/ 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 /*long*/[] {iDataObject.getAddress()}, OS.PTR_SIZEOF);
+ OS.MoveMemory(ppvObject, new long /*int*/[] {iDataObject.getAddress()}, OS.PTR_SIZEOF);
AddRef();
return COM.S_OK;
}
- OS.MoveMemory(ppvObject, new int /*long*/[] {0}, OS.PTR_SIZEOF);
+ OS.MoveMemory(ppvObject, new long /*int*/[] {0}, OS.PTR_SIZEOF);
return COM.E_NOINTERFACE;
}
private int Release() {
@@ -765,13 +765,13 @@ public String[] getAvailableTypeNames() {
private FORMATETC[] _getAvailableTypes() {
FORMATETC[] types = new FORMATETC[0];
- int /*long*/[] ppv = new int /*long*/[1];
+ long /*int*/[] ppv = new long /*int*/[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 /*long*/[] ppFormatetc = new int /*long*/[1];
+ long /*int*/[] ppFormatetc = new long /*int*/[1];
/* EnumFormatEtc([in] dwDirection, [out] ppenumFormatetc)
* AddRef has already been called on ppenumFormatetc by the callee and must be released by the caller.
*/
@@ -780,7 +780,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 /*long*/ rgelt = OS.GlobalAlloc(OS.GMEM_FIXED | OS.GMEM_ZEROINIT, FORMATETC.sizeof);
+ long /*int*/ 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 4e83e954f1..592b959aed 100644
--- 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
@@ -107,7 +107,7 @@ public class DragSource extends Widget {
Transfer[] transferAgents = new Transfer[0];
DragSourceEffect dragEffect;
Composite topControl;
- int /*long*/ hwndDrag;
+ long /*int*/ hwndDrag;
// ole interfaces
COMObject iDropSource;
@@ -245,23 +245,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 /*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]);}
+ public long /*int*/ method0(long /*int*/[] args) {return QueryInterface(args[0], args[1]);}
+ public long /*int*/ method1(long /*int*/[] args) {return AddRef();}
+ public long /*int*/ method2(long /*int*/[] args) {return Release();}
+ public long /*int*/ method3(long /*int*/[] args) {return QueryContinueDrag((int)/*64*/args[0], (int)/*64*/args[1]);}
+ public long /*int*/ method4(long /*int*/[] 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 /*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]);}
+ public long /*int*/ method0(long /*int*/[] args) {return QueryInterface(args[0], args[1]);}
+ public long /*int*/ method1(long /*int*/[] args) {return AddRef();}
+ public long /*int*/ method2(long /*int*/[] args) {return Release();}
+ public long /*int*/ method3(long /*int*/[] args) {return GetData(args[0], args[1]);}
// method4 GetDataHere - not implemented
- public int /*long*/ method5(int /*long*/[] args) {return QueryGetData(args[0]);}
+ public long /*int*/ method5(long /*int*/[] args) {return QueryGetData(args[0]);}
// method6 GetCanonicalFormatEtc - not implemented
- 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]);}
+ public long /*int*/ method7(long /*int*/[] args) {return SetData(args[0], args[1], (int)/*64*/args[2]);}
+ public long /*int*/ method8(long /*int*/[] args) {return EnumFormatEtc((int)/*64*/args[0], args[1]);}
// method9 DAdvise - not implemented
// method10 DUnadvise - not implemented
// method11 EnumDAdvise - not implemented
@@ -394,7 +394,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 /*long*/ ppenumFormatetc) {
+private int EnumFormatEtc(int dwDirection, long /*int*/ ppenumFormatetc) {
// only allow getting of data - SetData is not currently supported
if (dwDirection == COM.DATADIR_SET) return COM.E_NOTIMPL;
@@ -420,7 +420,7 @@ private int EnumFormatEtc(int dwDirection, int /*long*/ ppenumFormatetc) {
}
enumFORMATETC.setFormats(formats);
- OS.MoveMemory(ppenumFormatetc, new int /*long*/[] {enumFORMATETC.getAddress()}, OS.PTR_SIZEOF);
+ OS.MoveMemory(ppenumFormatetc, new long /*int*/[] {enumFORMATETC.getAddress()}, OS.PTR_SIZEOF);
return COM.S_OK;
}
/**
@@ -433,7 +433,7 @@ public Control getControl() {
return control;
}
-private int GetData(int /*long*/ pFormatetc, int /*long*/ pmedium) {
+private int GetData(long /*int*/ pFormatetc, long /*int*/ 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.
@@ -608,7 +608,7 @@ private int osToOp(int osOperation){
return operation;
}
-private int QueryGetData(int /*long*/ pFormatetc) {
+private int QueryGetData(long /*int*/ pFormatetc) {
if (transferAgents == null) return COM.E_FAIL;
TransferData transferData = new TransferData();
transferData.formatetc = new FORMATETC();
@@ -629,25 +629,25 @@ private int QueryGetData(int /*long*/ 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 /*long*/ riid, int /*long*/ ppvObject) {
+private int QueryInterface(long /*int*/ riid, long /*int*/ 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 /*long*/[] {iDropSource.getAddress()}, OS.PTR_SIZEOF);
+ OS.MoveMemory(ppvObject, new long /*int*/[] {iDropSource.getAddress()}, OS.PTR_SIZEOF);
AddRef();
return COM.S_OK;
}
if (COM.IsEqualGUID(guid, COM.IIDIDataObject) ) {
- OS.MoveMemory(ppvObject, new int /*long*/[] {iDataObject.getAddress()}, OS.PTR_SIZEOF);
+ OS.MoveMemory(ppvObject, new long /*int*/[] {iDataObject.getAddress()}, OS.PTR_SIZEOF);
AddRef();
return COM.S_OK;
}
- OS.MoveMemory(ppvObject, new int /*long*/[] {0}, OS.PTR_SIZEOF);
+ OS.MoveMemory(ppvObject, new long /*int*/[] {0}, OS.PTR_SIZEOF);
return COM.E_NOINTERFACE;
}
@@ -687,7 +687,7 @@ public void removeDragListener(DragSourceListener listener) {
removeListener(DND.DragEnd, listener);
}
-private int SetData(int /*long*/ pFormatetc, int /*long*/ pmedium, int fRelease) {
+private int SetData(long /*int*/ pFormatetc, long /*int*/ pmedium, int fRelease) {
if (pFormatetc == 0 || pmedium == 0) return COM.E_INVALIDARG;
FORMATETC formatetc = new FORMATETC();
COM.MoveMemory(formatetc, pFormatetc, FORMATETC.sizeof);
@@ -695,7 +695,7 @@ private int SetData(int /*long*/ pFormatetc, int /*long*/ pmedium, int fRelease)
STGMEDIUM stgmedium = new STGMEDIUM();
COM.MoveMemory(stgmedium, pmedium,STGMEDIUM.sizeof);
//TODO - this should be GlobalLock()
- int /*long*/[] ptrEffect = new int /*long*/[1];
+ long /*int*/[] ptrEffect = new long /*int*/[1];
OS.MoveMemory(ptrEffect, stgmedium.unionField, OS.PTR_SIZEOF);
int[] effect = new int[1];
OS.MoveMemory(effect, ptrEffect[0], 4);
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 fe7785ec2e..1cb6c67392 100644
--- 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
@@ -235,25 +235,25 @@ void createCOMInterfaces() {
// register each of the interfaces that this object implements
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) {
+ public long /*int*/ method0(long /*int*/[] args) {return QueryInterface(args[0], args[1]);}
+ public long /*int*/ method1(long /*int*/[] args) {return AddRef();}
+ public long /*int*/ method2(long /*int*/[] args) {return Release();}
+ public long /*int*/ method3(long /*int*/[] 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) {
+ public long /*int*/ method4(long /*int*/[] 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) {
+ public long /*int*/ method5(long /*int*/[] args) {return DragLeave();}
+ public long /*int*/ method6(long /*int*/[] args) {
if (args.length == 5) {
return Drop(args[0], (int)/*64*/args[1], (int)/*64*/args[2], (int)/*64*/args[3], args[4]);
} else {
@@ -269,13 +269,13 @@ void disposeCOMInterfaces() {
iDropTarget = null;
}
-int DragEnter_64(int /*long*/ pDataObject, int grfKeyState, long pt, int /*long*/ pdwEffect) {
+int DragEnter_64(long /*int*/ pDataObject, int grfKeyState, long pt, long /*int*/ 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) {
+int DragEnter(long /*int*/ pDataObject, int grfKeyState, int pt_x, int pt_y, long /*int*/ pdwEffect) {
selectedDataType = null;
selectedOperation = DND.DROP_NONE;
if (iDataObject != null) iDataObject.Release();
@@ -334,13 +334,13 @@ int DragLeave() {
return COM.S_OK;
}
-int DragOver_64(int grfKeyState, long pt, int /*long*/ pdwEffect) {
+int DragOver_64(int grfKeyState, long pt, long /*int*/ 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) {
+int DragOver(int grfKeyState, int pt_x, int pt_y, long /*int*/ pdwEffect) {
if (iDataObject == null) return COM.S_FALSE;
int oldKeyOperation = keyOperation;
@@ -386,13 +386,13 @@ int DragOver(int grfKeyState, int pt_x, int pt_y, int /*long*/ pdwEffect) {
return COM.S_OK;
}
-int Drop_64(int /*long*/ pDataObject, int grfKeyState, long pt, int /*long*/ pdwEffect) {
+int Drop_64(long /*int*/ pDataObject, int grfKeyState, long pt, long /*int*/ 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) {
+int Drop(long /*int*/ pDataObject, int grfKeyState, int pt_x, int pt_y, long /*int*/ pdwEffect) {
DNDEvent event = new DNDEvent();
event.widget = this;
event.time = OS.GetMessageTime();
@@ -608,19 +608,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 /*long*/ riid, int /*long*/ ppvObject) {
+int QueryInterface(long /*int*/ riid, long /*int*/ 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)) {
- COM.MoveMemory(ppvObject, new int /*long*/[] {iDropTarget.getAddress()}, OS.PTR_SIZEOF);
+ COM.MoveMemory(ppvObject, new long /*int*/[] {iDropTarget.getAddress()}, OS.PTR_SIZEOF);
AddRef();
return COM.S_OK;
}
- COM.MoveMemory(ppvObject, new int /*long*/[] {0}, OS.PTR_SIZEOF);
+ COM.MoveMemory(ppvObject, new long /*int*/[] {0}, OS.PTR_SIZEOF);
return COM.E_NOINTERFACE;
}
@@ -639,7 +639,7 @@ int Release() {
void refresh() {
if (control == null || control.isDisposed()) return;
- int /*long*/ handle = control.handle;
+ long /*int*/ handle = control.handle;
RECT lpRect = new RECT();
if (OS.GetUpdateRect(handle, lpRect, false)) {
OS.ImageList_DragShowNolock(false);
@@ -689,7 +689,7 @@ public void setDropTargetEffect(DropTargetEffect effect) {
dropEffect = effect;
}
-boolean setEventData(DNDEvent event, int /*long*/ pDataObject, int grfKeyState, int pt_x, int pt_y, int /*long*/ pdwEffect) {
+boolean setEventData(DNDEvent event, long /*int*/ pDataObject, int grfKeyState, int pt_x, int pt_y, long /*int*/ pdwEffect) {
if (pDataObject == 0 || pdwEffect == 0) return false;
// get allowed operations
@@ -715,14 +715,14 @@ boolean setEventData(DNDEvent event, int /*long*/ pDataObject, int grfKeyState,
IDataObject dataObject = new IDataObject(pDataObject);
dataObject.AddRef();
try {
- int /*long*/[] address = new int /*long*/[1];
+ long /*int*/[] address = new long /*int*/[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 /*long*/ rgelt = OS.GlobalAlloc(OS.GMEM_FIXED | OS.GMEM_ZEROINIT, FORMATETC.sizeof);
+ long /*int*/ 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 8acb6456d1..d61488d82a 100644
--- 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
@@ -82,7 +82,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 /*long*/ newPtr = OS.GlobalAlloc(COM.GMEM_FIXED | COM.GMEM_ZEROINIT, DROPFILES.sizeof + byteCount);
+ long /*int*/ 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 9664d49d67..2de209857a 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
@@ -107,7 +107,7 @@ public void javaToNative (Object object, TransferData transferData){
chars = new char[count + 1];
buffer.getChars(0, count, chars, 0);
cchMultiByte = OS.WideCharToMultiByte(OS.CP_UTF8, 0, chars, -1, null, 0, null, null);
- int /*long*/ lpMultiByteStr = OS.GlobalAlloc(OS.GMEM_FIXED | OS.GMEM_ZEROINIT, cchMultiByte);
+ long /*int*/ lpMultiByteStr = OS.GlobalAlloc(OS.GMEM_FIXED | OS.GMEM_ZEROINIT, cchMultiByte);
OS.WideCharToMultiByte(OS.CP_UTF8, 0, chars, -1, lpMultiByteStr, cchMultiByte, null, null);
transferData.stgmedium = new STGMEDIUM();
transferData.stgmedium.tymed = COM.TYMED_HGLOBAL;
@@ -137,10 +137,10 @@ public Object nativeToJava(TransferData transferData){
transferData.result = getData(data, formatetc, stgmedium);
data.Release();
if (transferData.result != COM.S_OK) return null;
- int /*long*/ hMem = stgmedium.unionField;
+ long /*int*/ hMem = stgmedium.unionField;
try {
- int /*long*/ lpMultiByteStr = OS.GlobalLock(hMem);
+ long /*int*/ lpMultiByteStr = OS.GlobalLock(hMem);
if (lpMultiByteStr == 0) return null;
try {
/* NOTE: CF_HTML uses UTF-8 encoding.
diff --git a/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/win32/org/eclipse/swt/dnd/ImageTransfer.java b/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/win32/org/eclipse/swt/dnd/ImageTransfer.java
index 426adf1bcf..5021362050 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/win32/org/eclipse/swt/dnd/ImageTransfer.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/win32/org/eclipse/swt/dnd/ImageTransfer.java
@@ -96,9 +96,9 @@ public void javaToNative(Object object, TransferData transferData) {
offset += 4;
}
}
- int /*long*/ newPtr = OS.GlobalAlloc(OS.GMEM_FIXED | OS.GMEM_ZEROINIT, BITMAPINFOHEADER.sizeof + colorSize + imageSize);
+ long /*int*/ newPtr = OS.GlobalAlloc(OS.GMEM_FIXED | OS.GMEM_ZEROINIT, BITMAPINFOHEADER.sizeof + colorSize + imageSize);
OS.MoveMemory(newPtr, bmi, bmi.length);
- int /*long*/ pBitDest = newPtr + BITMAPINFOHEADER.sizeof + colorSize;
+ long /*int*/ pBitDest = newPtr + BITMAPINFOHEADER.sizeof + colorSize;
if (imageHeight <= 0) {
OS.MoveMemory(pBitDest, imgData.data, imageSize);
@@ -146,18 +146,18 @@ public Object nativeToJava(TransferData transferData) {
transferData.result = getData(dataObject, formatetc, stgmedium);
if (transferData.result != COM.S_OK) return null;
- int /*long*/ hMem = stgmedium.unionField;
+ long /*int*/ hMem = stgmedium.unionField;
dataObject.Release();
try {
- int /*long*/ ptr = OS.GlobalLock(hMem);
+ long /*int*/ ptr = OS.GlobalLock(hMem);
if (ptr == 0) return null;
try {
BITMAPINFOHEADER bmiHeader = new BITMAPINFOHEADER();
OS.MoveMemory(bmiHeader, ptr, BITMAPINFOHEADER.sizeof);
- int /*long*/[] pBits = new int /*long*/[1];
- int /*long*/ memDib = OS.CreateDIBSection(0, ptr, OS.DIB_RGB_COLORS, pBits, 0, 0);
+ long /*int*/[] pBits = new long /*int*/[1];
+ long /*int*/ memDib = OS.CreateDIBSection(0, ptr, OS.DIB_RGB_COLORS, pBits, 0, 0);
if (memDib == 0) SWT.error(SWT.ERROR_NO_HANDLES);
- int /*long*/ bits = ptr + bmiHeader.biSize;
+ long /*int*/ bits = ptr + bmiHeader.biSize;
if (bmiHeader.biBitCount <= 8) {
bits += (bmiHeader.biClrUsed == 0 ? (1 << bmiHeader.biBitCount) : bmiHeader.biClrUsed) * 4;
} else if (bmiHeader.biCompression == OS.BI_BITFIELDS) {
@@ -170,8 +170,8 @@ public Object nativeToJava(TransferData transferData) {
OS.GetObject(memDib, DIBSECTION.sizeof, dib);
int biHeight = dib.biHeight;
int scanline = dib.biSizeImage / biHeight;
- int /*long*/ pDestBits = pBits[0];
- int /*long*/ pSourceBits = bits + scanline * (biHeight - 1);
+ long /*int*/ pDestBits = pBits[0];
+ long /*int*/ pSourceBits = bits + scanline * (biHeight - 1);
for (int i = 0; i < biHeight; i++) {
OS.MoveMemory(pDestBits, pSourceBits, scanline);
pDestBits += scanline;
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 b4f06ff70e..eb4fd77aa3 100644
--- 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
@@ -35,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 /*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 long /*int*/ method0(long /*int*/[] args) {return QueryInterface(args[0], args[1]);}
+ public long /*int*/ method1(long /*int*/[] args) {return AddRef();}
+ public long /*int*/ method2(long /*int*/[] args) {return Release();}
};
iEnumFORMATETC = new COMObject(new int[] {2, 0, 0, 3, 1, 0, 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 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();}
+ public long /*int*/ method0(long /*int*/[] args) {return QueryInterface(args[0], args[1]);}
+ public long /*int*/ method1(long /*int*/[] args) {return AddRef();}
+ public long /*int*/ method2(long /*int*/[] args) {return Release();}
+ public long /*int*/ method3(long /*int*/[] args) {return Next((int)/*64*/args[0], args[1], args[2]);}
+ public long /*int*/ method4(long /*int*/[] args) {return Skip((int)/*64*/args[0]);}
+ public long /*int*/ method5(long /*int*/[] args) {return Reset();}
// method6 Clone - not implemented
};
}
@@ -59,7 +59,7 @@ private void disposeCOMInterfaces() {
iEnumFORMATETC.dispose();
iEnumFORMATETC = null;
}
-int /*long*/ getAddress() {
+long /*int*/ getAddress() {
return iEnumFORMATETC.getAddress();
}
private FORMATETC[] getNextItems(int numItems){
@@ -78,7 +78,7 @@ private FORMATETC[] getNextItems(int numItems){
return items;
}
-private int Next(int celt, int /*long*/ rgelt, int /*long*/ pceltFetched) {
+private int Next(int celt, long /*int*/ rgelt, long /*int*/ 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.
@@ -108,7 +108,7 @@ private int Next(int celt, int /*long*/ rgelt, int /*long*/ pceltFetched) {
}
return COM.S_FALSE;
}
-private int QueryInterface(int /*long*/ riid, int /*long*/ ppvObject) {
+private int QueryInterface(long /*int*/ riid, long /*int*/ ppvObject) {
if (riid == 0 || ppvObject == 0) return COM.E_NOINTERFACE;
@@ -116,16 +116,16 @@ private int QueryInterface(int /*long*/ riid, int /*long*/ ppvObject) {
COM.MoveMemory(guid, riid, GUID.sizeof);
if (COM.IsEqualGUID(guid, COM.IIDIUnknown)) {
- COM.MoveMemory(ppvObject, new int /*long*/[] {iUnknown.getAddress()}, OS.PTR_SIZEOF);
+ COM.MoveMemory(ppvObject, new long /*int*/[] {iUnknown.getAddress()}, OS.PTR_SIZEOF);
AddRef();
return COM.S_OK;
}
if (COM.IsEqualGUID(guid, COM.IIDIEnumFORMATETC)) {
- COM.MoveMemory(ppvObject, new int /*long*/[] {iEnumFORMATETC.getAddress()}, OS.PTR_SIZEOF);
+ COM.MoveMemory(ppvObject, new long /*int*/[] {iEnumFORMATETC.getAddress()}, OS.PTR_SIZEOF);
AddRef();
return COM.S_OK;
}
- COM.MoveMemory(ppvObject, new int /*long*/[] {0}, OS.PTR_SIZEOF);
+ COM.MoveMemory(ppvObject, new long /*int*/[] {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 f8da4986c4..9b21730ad4 100644
--- 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
@@ -70,7 +70,7 @@ public void javaToNative (Object object, TransferData transferData){
transferData.result = COM.DV_E_STGMEDIUM;
return;
}
- int /*long*/ lpMultiByteStr = OS.GlobalAlloc(COM.GMEM_FIXED | COM.GMEM_ZEROINIT, cchMultiByte);
+ long /*int*/ 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;
@@ -100,9 +100,9 @@ public Object nativeToJava(TransferData transferData){
transferData.result = getData(data, formatetc, stgmedium);
data.Release();
if (transferData.result != COM.S_OK) return null;
- int /*long*/ hMem = stgmedium.unionField;
+ long /*int*/ hMem = stgmedium.unionField;
try {
- int /*long*/ lpMultiByteStr = OS.GlobalLock(hMem);
+ long /*int*/ 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 bc25bd33ae..f3373f7aa3 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
@@ -88,7 +88,7 @@ public class TableDragSourceEffect extends DragSourceEffect {
event.offsetX = shdi.ptOffset.x;
}
event.offsetY = shdi.ptOffset.y;
- int /*long*/ hImage = shdi.hbmpDragImage;
+ long /*int*/ hImage = shdi.hbmpDragImage;
if (hImage != 0) {
BITMAP bm = new BITMAP ();
OS.GetObject (hImage, BITMAP.sizeof, bm);
@@ -96,10 +96,10 @@ public class TableDragSourceEffect extends DragSourceEffect {
int srcHeight = bm.bmHeight;
/* Create resources */
- int /*long*/ hdc = OS.GetDC (0);
- int /*long*/ srcHdc = OS.CreateCompatibleDC (hdc);
- int /*long*/ oldSrcBitmap = OS.SelectObject (srcHdc, hImage);
- int /*long*/ memHdc = OS.CreateCompatibleDC (hdc);
+ long /*int*/ hdc = OS.GetDC (0);
+ long /*int*/ srcHdc = OS.CreateCompatibleDC (hdc);
+ long /*int*/ oldSrcBitmap = OS.SelectObject (srcHdc, hImage);
+ long /*int*/ memHdc = OS.CreateCompatibleDC (hdc);
BITMAPINFOHEADER bmiHeader = new BITMAPINFOHEADER ();
bmiHeader.biSize = BITMAPINFOHEADER.sizeof;
bmiHeader.biWidth = srcWidth;
@@ -109,10 +109,10 @@ public class TableDragSourceEffect extends DragSourceEffect {
bmiHeader.biCompression = OS.BI_RGB;
byte [] bmi = new byte[BITMAPINFOHEADER.sizeof];
OS.MoveMemory (bmi, bmiHeader, BITMAPINFOHEADER.sizeof);
- int /*long*/ [] pBits = new int /*long*/ [1];
- int /*long*/ memDib = OS.CreateDIBSection (0, bmi, OS.DIB_RGB_COLORS, pBits, 0, 0);
+ long /*int*/ [] pBits = new long /*int*/ [1];
+ long /*int*/ memDib = OS.CreateDIBSection (0, bmi, OS.DIB_RGB_COLORS, pBits, 0, 0);
if (memDib == 0) SWT.error (SWT.ERROR_NO_HANDLES);
- int /*long*/ oldMemBitmap = OS.SelectObject (memHdc, memDib);
+ long /*int*/ oldMemBitmap = OS.SelectObject (memHdc, memDib);
BITMAP dibBM = new BITMAP ();
OS.GetObject (memDib, BITMAP.sizeof, dibBM);
@@ -158,32 +158,32 @@ public class TableDragSourceEffect extends DragSourceEffect {
if (table.isListening (SWT.EraseItem) || table.isListening (SWT.PaintItem)) return null;
TableItem[] selection = table.getSelection();
if (selection.length == 0) return null;
- int /*long*/ tableImageList = OS.SendMessage (table.handle, OS.LVM_GETIMAGELIST, OS.LVSIL_SMALL, 0);
+ long /*int*/ 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 /*long*/ hDC = OS.GetDC(0);
- int /*long*/ hDC1 = OS.CreateCompatibleDC(hDC);
+ long /*int*/ hDC = OS.GetDC(0);
+ long /*int*/ hDC1 = OS.CreateCompatibleDC(hDC);
if (!OS.IsWinCE && OS.WIN32_VERSION >= OS.VERSION(4, 10)) {
if ((table.getStyle() & SWT.RIGHT_TO_LEFT) != 0) {
OS.SetLayout(hDC1, OS.LAYOUT_RTL | OS.LAYOUT_BITMAPORIENTATIONPRESERVED);
}
}
- int /*long*/ bitmap = OS.CreateCompatibleBitmap(hDC, bounds.width, bounds.height);
- int /*long*/ hOldBitmap = OS.SelectObject(hDC1, bitmap);
+ long /*int*/ bitmap = OS.CreateCompatibleBitmap(hDC, bounds.width, bounds.height);
+ long /*int*/ hOldBitmap = OS.SelectObject(hDC1, bitmap);
RECT rect = new RECT();
rect.right = bounds.width;
rect.bottom = bounds.height;
- int /*long*/ hBrush = OS.GetStockObject(OS.WHITE_BRUSH);
+ long /*int*/ 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 /*long*/ imageList = OS.SendMessage (table.handle, OS.LVM_CREATEDRAGIMAGE, table.indexOf(selected), pt);
+ long /*int*/ 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 c53d8e5e3b..8693f66160 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
@@ -106,7 +106,7 @@ public class TableDropTargetEffect extends DropTargetEffect {
*/
public void dragLeave(DropTargetEvent event) {
Table table = (Table) control;
- int /*long*/ handle = table.handle;
+ long /*int*/ handle = table.handle;
if (dropHighlight != null) {
LVITEM lvItem = new LVITEM ();
lvItem.stateMask = OS.LVIS_DROPHILITED;
@@ -146,7 +146,7 @@ public class TableDropTargetEffect extends DropTargetEffect {
public void dragOver(DropTargetEvent event) {
Table table = (Table) getControl();
int effect = checkEffect(event.feedback);
- int /*long*/ handle = table.handle;
+ long /*int*/ handle = table.handle;
Point coordinates = new Point(event.x, event.y);
coordinates = table.toControl(coordinates);
LVHITTESTINFO pinfo = new LVHITTESTINFO();
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 97b3a177b8..06a1449c53 100644
--- 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
@@ -74,7 +74,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 /*long*/ newPtr = OS.GlobalAlloc(COM.GMEM_FIXED | COM.GMEM_ZEROINIT, byteCount);
+ long /*int*/ 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;
@@ -94,7 +94,7 @@ public void javaToNative (Object object, TransferData transferData){
transferData.result = COM.DV_E_STGMEDIUM;
return;
}
- int /*long*/ lpMultiByteStr = OS.GlobalAlloc(COM.GMEM_FIXED | COM.GMEM_ZEROINIT, cchMultiByte);
+ long /*int*/ 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;
@@ -127,7 +127,7 @@ public Object nativeToJava(TransferData transferData){
transferData.result = getData(data, formatetc, stgmedium);
data.Release();
if (transferData.result != COM.S_OK) return null;
- int /*long*/ hMem = stgmedium.unionField;
+ long /*int*/ hMem = stgmedium.unionField;
try {
switch (transferData.type) {
case CF_UNICODETEXTID: {
@@ -135,7 +135,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 /*long*/ ptr = OS.GlobalLock(hMem);
+ long /*int*/ ptr = OS.GlobalLock(hMem);
if (ptr == 0) return null;
try {
OS.MoveMemory(chars, ptr, size);
@@ -152,7 +152,7 @@ public Object nativeToJava(TransferData transferData){
}
}
case CF_TEXTID: {
- int /*long*/ lpMultiByteStr = OS.GlobalLock(hMem);
+ long /*int*/ 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 aa9fbe7418..b47362fdd3 100644
--- 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
@@ -104,7 +104,7 @@ public class TransferData {
*
* @noreference This field is not intended to be referenced by clients.
*/
- public int /*long*/ pIDataObject;
+ public long /*int*/ 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 645549a14f..43a794fd6e 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
@@ -87,7 +87,7 @@ public class TreeDragSourceEffect extends DragSourceEffect {
event.offsetX = shdi.ptOffset.x;
}
event.offsetY = shdi.ptOffset.y;
- int /*long*/ hImage = shdi.hbmpDragImage;
+ long /*int*/ hImage = shdi.hbmpDragImage;
if (hImage != 0) {
BITMAP bm = new BITMAP ();
OS.GetObject (hImage, BITMAP.sizeof, bm);
@@ -95,10 +95,10 @@ public class TreeDragSourceEffect extends DragSourceEffect {
int srcHeight = bm.bmHeight;
/* Create resources */
- int /*long*/ hdc = OS.GetDC (0);
- int /*long*/ srcHdc = OS.CreateCompatibleDC (hdc);
- int /*long*/ oldSrcBitmap = OS.SelectObject (srcHdc, hImage);
- int /*long*/ memHdc = OS.CreateCompatibleDC (hdc);
+ long /*int*/ hdc = OS.GetDC (0);
+ long /*int*/ srcHdc = OS.CreateCompatibleDC (hdc);
+ long /*int*/ oldSrcBitmap = OS.SelectObject (srcHdc, hImage);
+ long /*int*/ memHdc = OS.CreateCompatibleDC (hdc);
BITMAPINFOHEADER bmiHeader = new BITMAPINFOHEADER ();
bmiHeader.biSize = BITMAPINFOHEADER.sizeof;
bmiHeader.biWidth = srcWidth;
@@ -108,10 +108,10 @@ public class TreeDragSourceEffect extends DragSourceEffect {
bmiHeader.biCompression = OS.BI_RGB;
byte [] bmi = new byte[BITMAPINFOHEADER.sizeof];
OS.MoveMemory (bmi, bmiHeader, BITMAPINFOHEADER.sizeof);
- int /*long*/ [] pBits = new int /*long*/ [1];
- int /*long*/ memDib = OS.CreateDIBSection (0, bmi, OS.DIB_RGB_COLORS, pBits, 0, 0);
+ long /*int*/ [] pBits = new long /*int*/ [1];
+ long /*int*/ memDib = OS.CreateDIBSection (0, bmi, OS.DIB_RGB_COLORS, pBits, 0, 0);
if (memDib == 0) SWT.error (SWT.ERROR_NO_HANDLES);
- int /*long*/ oldMemBitmap = OS.SelectObject (memHdc, memDib);
+ long /*int*/ oldMemBitmap = OS.SelectObject (memHdc, memDib);
BITMAP dibBM = new BITMAP ();
OS.GetObject (memDib, BITMAP.sizeof, dibBM);
@@ -158,26 +158,26 @@ public class TreeDragSourceEffect extends DragSourceEffect {
if (tree.isListening (SWT.EraseItem) || tree.isListening (SWT.PaintItem)) return null;
TreeItem[] selection = tree.getSelection();
if (selection.length == 0) return null;
- int /*long*/ treeImageList = OS.SendMessage (tree.handle, OS.TVM_GETIMAGELIST, OS.TVSIL_NORMAL, 0);
+ long /*int*/ 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 /*long*/ hDC = OS.GetDC(tree.handle);
- int /*long*/ hDC1 = OS.CreateCompatibleDC(hDC);
- int /*long*/ bitmap = OS.CreateCompatibleBitmap(hDC, bounds.width, bounds.height);
- int /*long*/ hOldBitmap = OS.SelectObject(hDC1, bitmap);
+ long /*int*/ hDC = OS.GetDC(tree.handle);
+ long /*int*/ hDC1 = OS.CreateCompatibleDC(hDC);
+ long /*int*/ bitmap = OS.CreateCompatibleBitmap(hDC, bounds.width, bounds.height);
+ long /*int*/ hOldBitmap = OS.SelectObject(hDC1, bitmap);
RECT rect = new RECT();
rect.right = bounds.width;
rect.bottom = bounds.height;
- int /*long*/ hBrush = OS.GetStockObject(OS.WHITE_BRUSH);
+ long /*int*/ 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 /*long*/ imageList = OS.SendMessage(tree.handle, OS.TVM_CREATEDRAGIMAGE, 0, selected.handle);
+ long /*int*/ 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 04776faaac..f02c7e0c65 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
@@ -52,10 +52,10 @@ public class TreeDropTargetEffect extends DropTargetEffect {
static final int SCROLL_HYSTERESIS = 200; // milli seconds
static final int EXPAND_HYSTERESIS = 1000; // milli seconds
- int /*long*/ dropIndex;
- int /*long*/ scrollIndex;
+ long /*int*/ dropIndex;
+ long /*int*/ scrollIndex;
long scrollBeginTime;
- int /*long*/ expandIndex;
+ long /*int*/ expandIndex;
long expandBeginTime;
TreeItem insertItem;
boolean insertBefore;
@@ -116,7 +116,7 @@ public class TreeDropTargetEffect extends DropTargetEffect {
*/
public void dragLeave(DropTargetEvent event) {
Tree tree = (Tree) control;
- int /*long*/ handle = tree.handle;
+ long /*int*/ handle = tree.handle;
if (dropIndex != -1) {
TVITEM tvItem = new TVITEM ();
tvItem.hItem = dropIndex;
@@ -157,22 +157,22 @@ public class TreeDropTargetEffect extends DropTargetEffect {
public void dragOver(DropTargetEvent event) {
Tree tree = (Tree) getControl();
int effect = checkEffect(event.feedback);
- int /*long*/ handle = tree.handle;
+ long /*int*/ 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 /*long*/ hItem = lpht.hItem;
+ long /*int*/ 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 /*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);
+ long /*int*/ topItem = OS.SendMessage(handle, OS.TVM_GETNEXTITEM, OS.TVGN_FIRSTVISIBLE, 0);
+ long /*int*/ 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 223677b708..ea2631cb5d 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
@@ -69,7 +69,7 @@ public void javaToNative (Object object, TransferData transferData){
char[] chars = new char[charCount+1];
url.getChars (0, charCount, chars, 0);
int byteCount = chars.length * 2;
- int /*long*/ newPtr = OS.GlobalAlloc(COM.GMEM_FIXED | COM.GMEM_ZEROINIT, byteCount);
+ long /*int*/ 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;
@@ -87,7 +87,7 @@ public void javaToNative (Object object, TransferData transferData){
transferData.result = COM.DV_E_STGMEDIUM;
return;
}
- int /*long*/ lpMultiByteStr = OS.GlobalAlloc(OS.GMEM_FIXED | OS.GMEM_ZEROINIT, cchMultiByte);
+ long /*int*/ 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;
@@ -117,14 +117,14 @@ public Object nativeToJava(TransferData transferData){
transferData.result = getData(data, formatetc, stgmedium);
data.Release();
if (transferData.result != COM.S_OK) return null;
- int /*long*/ hMem = stgmedium.unionField;
+ long /*int*/ hMem = stgmedium.unionField;
try {
if (transferData.type == CFSTR_INETURLIDW) {
/* Ensure byteCount is a multiple of 2 bytes */
int size = OS.GlobalSize(hMem) / 2 * 2;
if (size == 0) return null;
char[] chars = new char[size/2];
- int /*long*/ ptr = OS.GlobalLock(hMem);
+ long /*int*/ ptr = OS.GlobalLock(hMem);
if (ptr == 0) return null;
try {
OS.MoveMemory(chars, ptr, size);
@@ -140,7 +140,7 @@ public Object nativeToJava(TransferData transferData){
OS.GlobalUnlock(hMem);
}
} else if (transferData.type == CFSTR_INETURLID) {
- int /*long*/ lpMultiByteStr = OS.GlobalLock(hMem);
+ long /*int*/ lpMultiByteStr = OS.GlobalLock(hMem);
if (lpMultiByteStr == 0) return null;
try {
int codePage = OS.GetACP();

Back to the top