diff options
Diffstat (limited to 'bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/win32/org')
16 files changed, 135 insertions, 135 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 a0c13fb230..3dee95c0eb 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 @@ -172,7 +172,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; - long /*int*/ newPtr = OS.GlobalAlloc(OS.GMEM_FIXED | OS.GMEM_ZEROINIT, size); + 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; @@ -203,10 +203,10 @@ protected Object nativeToJava(TransferData transferData) { transferData.result = getData(data, formatetc, stgmedium); data.Release(); if (transferData.result != COM.S_OK) return null; - long /*int*/ hMem = stgmedium.unionField; + long hMem = stgmedium.unionField; int size = OS.GlobalSize(hMem); byte[] buffer = new byte[size]; - long /*int*/ ptr = OS.GlobalLock(hMem); + 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 7a5ef22c0c..67b9b4b7eb 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 @@ -319,7 +319,7 @@ public Object getContents(Transfer transfer, int clipboards) { * the clipboard, use PeekMessage() to enable cross thread * message sends. */ - long /*int*/[] ppv = new long /*int*/[1]; + long[] ppv = new 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. @@ -522,20 +522,20 @@ 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}){ @Override - public long /*int*/ method0(long /*int*/[] args) {return QueryInterface(args[0], args[1]);} + public long method0(long[] args) {return QueryInterface(args[0], args[1]);} @Override - public long /*int*/ method1(long /*int*/[] args) {return AddRef();} + public long method1(long[] args) {return AddRef();} @Override - public long /*int*/ method2(long /*int*/[] args) {return Release();} + public long method2(long[] args) {return Release();} @Override - public long /*int*/ method3(long /*int*/[] args) {return GetData(args[0], args[1]);} + public long method3(long[] args) {return GetData(args[0], args[1]);} // method4 GetDataHere - not implemented @Override - public long /*int*/ method5(long /*int*/[] args) {return QueryGetData(args[0]);} + public long method5(long[] args) {return QueryGetData(args[0]);} // method6 GetCanonicalFormatEtc - not implemented // method7 SetData - not implemented @Override - public long /*int*/ method8(long /*int*/[] args) {return EnumFormatEtc((int)/*64*/args[0], args[1]);} + public long method8(long[] args) {return EnumFormatEtc((int)args[0], args[1]);} // method9 DAdvise - not implemented // method10 DUnadvise - not implemented // method11 EnumDAdvise - not implemented @@ -551,7 +551,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, long /*int*/ ppenumFormatetc) { +private int EnumFormatEtc(int dwDirection, 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? @@ -577,10 +577,10 @@ private int EnumFormatEtc(int dwDirection, long /*int*/ ppenumFormatetc) { dropeffect.tymed = COM.TYMED_HGLOBAL; formats[formats.length -1] = dropeffect; enumFORMATETC.setFormats(formats); - OS.MoveMemory(ppenumFormatetc, new long /*int*/[] {enumFORMATETC.getAddress()}, C.PTR_SIZEOF); + OS.MoveMemory(ppenumFormatetc, new long[] {enumFORMATETC.getAddress()}, C.PTR_SIZEOF); return COM.S_OK; } -private int GetData(long /*int*/ pFormatetc, long /*int*/ pmedium) { +private int GetData(long pFormatetc, 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. @@ -622,7 +622,7 @@ private int GetData(long /*int*/ pFormatetc, long /*int*/ pmedium) { return transferData.result; } -private int QueryGetData(long /*int*/ pFormatetc) { +private int QueryGetData(long pFormatetc) { if (transferAgents == null) return COM.E_FAIL; TransferData transferData = new TransferData(); transferData.formatetc = new FORMATETC(); @@ -641,16 +641,16 @@ private int QueryGetData(long /*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(long /*int*/ riid, long /*int*/ ppvObject) { +private int QueryInterface(long riid, 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 long /*int*/[] {iDataObject.getAddress()}, C.PTR_SIZEOF); + OS.MoveMemory(ppvObject, new long[] {iDataObject.getAddress()}, C.PTR_SIZEOF); AddRef(); return COM.S_OK; } - OS.MoveMemory(ppvObject, new long /*int*/[] {0}, C.PTR_SIZEOF); + OS.MoveMemory(ppvObject, new long[] {0}, C.PTR_SIZEOF); return COM.E_NOINTERFACE; } private int Release() { @@ -775,13 +775,13 @@ public String[] getAvailableTypeNames() { private FORMATETC[] _getAvailableTypes() { FORMATETC[] types = new FORMATETC[0]; - long /*int*/[] ppv = new long /*int*/[1]; + long[] ppv = new 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]); - long /*int*/[] ppFormatetc = new long /*int*/[1]; + long[] ppFormatetc = new long[1]; /* EnumFormatEtc([in] dwDirection, [out] ppenumFormatetc) * AddRef has already been called on ppenumFormatetc by the callee and must be released by the caller. */ @@ -790,7 +790,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 - long /*int*/ rgelt = OS.GlobalAlloc(OS.GMEM_FIXED | OS.GMEM_ZEROINIT, FORMATETC.sizeof); + 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 544fbac79b..8d509da04a 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 @@ -111,7 +111,7 @@ public class DragSource extends Widget { Transfer[] transferAgents = new Transfer[0]; DragSourceEffect dragEffect; Composite topControl; - long /*int*/ hwndDrag; + long hwndDrag; // ole interfaces COMObject iDropSource; @@ -244,34 +244,34 @@ private void createCOMInterfaces() { // register each of the interfaces that this object implements iDropSource = new COMObject(new int[]{2, 0, 0, 2, 1}){ @Override - public long /*int*/ method0(long /*int*/[] args) {return QueryInterface(args[0], args[1]);} + public long method0(long[] args) {return QueryInterface(args[0], args[1]);} @Override - public long /*int*/ method1(long /*int*/[] args) {return AddRef();} + public long method1(long[] args) {return AddRef();} @Override - public long /*int*/ method2(long /*int*/[] args) {return Release();} + public long method2(long[] args) {return Release();} @Override - public long /*int*/ method3(long /*int*/[] args) {return QueryContinueDrag((int)/*64*/args[0], (int)/*64*/args[1]);} + public long method3(long[] args) {return QueryContinueDrag((int)args[0], (int)args[1]);} @Override - public long /*int*/ method4(long /*int*/[] args) {return GiveFeedback((int)/*64*/args[0]);} + public long method4(long[] args) {return GiveFeedback((int)args[0]);} }; iDataObject = new COMObject(new int[]{2, 0, 0, 2, 2, 1, 2, 3, 2, 4, 1, 1}){ @Override - public long /*int*/ method0(long /*int*/[] args) {return QueryInterface(args[0], args[1]);} + public long method0(long[] args) {return QueryInterface(args[0], args[1]);} @Override - public long /*int*/ method1(long /*int*/[] args) {return AddRef();} + public long method1(long[] args) {return AddRef();} @Override - public long /*int*/ method2(long /*int*/[] args) {return Release();} + public long method2(long[] args) {return Release();} @Override - public long /*int*/ method3(long /*int*/[] args) {return GetData(args[0], args[1]);} + public long method3(long[] args) {return GetData(args[0], args[1]);} // method4 GetDataHere - not implemented @Override - public long /*int*/ method5(long /*int*/[] args) {return QueryGetData(args[0]);} + public long method5(long[] args) {return QueryGetData(args[0]);} // method6 GetCanonicalFormatEtc - not implemented @Override - public long /*int*/ method7(long /*int*/[] args) {return SetData(args[0], args[1], (int)/*64*/args[2]);} + public long method7(long[] args) {return SetData(args[0], args[1], (int)args[2]);} @Override - public long /*int*/ method8(long /*int*/[] args) {return EnumFormatEtc((int)/*64*/args[0], args[1]);} + public long method8(long[] args) {return EnumFormatEtc((int)args[0], args[1]);} // method9 DAdvise - not implemented // method10 DUnadvise - not implemented // method11 EnumDAdvise - not implemented @@ -401,7 +401,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, long /*int*/ ppenumFormatetc) { +private int EnumFormatEtc(int dwDirection, long ppenumFormatetc) { // only allow getting of data - SetData is not currently supported if (dwDirection == COM.DATADIR_SET) return COM.E_NOTIMPL; @@ -427,7 +427,7 @@ private int EnumFormatEtc(int dwDirection, long /*int*/ ppenumFormatetc) { } enumFORMATETC.setFormats(formats); - OS.MoveMemory(ppenumFormatetc, new long /*int*/[] {enumFORMATETC.getAddress()}, C.PTR_SIZEOF); + OS.MoveMemory(ppenumFormatetc, new long[] {enumFORMATETC.getAddress()}, C.PTR_SIZEOF); return COM.S_OK; } /** @@ -440,7 +440,7 @@ public Control getControl() { return control; } -private int GetData(long /*int*/ pFormatetc, long /*int*/ pmedium) { +private int GetData(long pFormatetc, 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. @@ -615,7 +615,7 @@ private int osToOp(int osOperation){ return operation; } -private int QueryGetData(long /*int*/ pFormatetc) { +private int QueryGetData(long pFormatetc) { if (transferAgents == null) return COM.E_FAIL; TransferData transferData = new TransferData(); transferData.formatetc = new FORMATETC(); @@ -636,25 +636,25 @@ private int QueryGetData(long /*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(long /*int*/ riid, long /*int*/ ppvObject) { +private int QueryInterface(long riid, 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 long /*int*/[] {iDropSource.getAddress()}, C.PTR_SIZEOF); + OS.MoveMemory(ppvObject, new long[] {iDropSource.getAddress()}, C.PTR_SIZEOF); AddRef(); return COM.S_OK; } if (COM.IsEqualGUID(guid, COM.IIDIDataObject) ) { - OS.MoveMemory(ppvObject, new long /*int*/[] {iDataObject.getAddress()}, C.PTR_SIZEOF); + OS.MoveMemory(ppvObject, new long[] {iDataObject.getAddress()}, C.PTR_SIZEOF); AddRef(); return COM.S_OK; } - OS.MoveMemory(ppvObject, new long /*int*/[] {0}, C.PTR_SIZEOF); + OS.MoveMemory(ppvObject, new long[] {0}, C.PTR_SIZEOF); return COM.E_NOINTERFACE; } @@ -694,7 +694,7 @@ public void removeDragListener(DragSourceListener listener) { removeListener(DND.DragEnd, listener); } -private int SetData(long /*int*/ pFormatetc, long /*int*/ pmedium, int fRelease) { +private int SetData(long pFormatetc, long pmedium, int fRelease) { if (pFormatetc == 0 || pmedium == 0) return COM.E_INVALIDARG; FORMATETC formatetc = new FORMATETC(); COM.MoveMemory(formatetc, pFormatetc, FORMATETC.sizeof); @@ -702,7 +702,7 @@ private int SetData(long /*int*/ pFormatetc, long /*int*/ pmedium, int fRelease) STGMEDIUM stgmedium = new STGMEDIUM(); COM.MoveMemory(stgmedium, pmedium,STGMEDIUM.sizeof); //TODO - this should be GlobalLock() - long /*int*/[] ptrEffect = new long /*int*/[1]; + long[] ptrEffect = new long[1]; OS.MoveMemory(ptrEffect, stgmedium.unionField, C.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 c97521a27c..177e3827bc 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 @@ -234,35 +234,35 @@ void createCOMInterfaces() { boolean is32 = C.PTR_SIZEOF == 4; iDropTarget = new COMObject(new int[]{2, 0, 0, is32 ? 5 : 4, is32 ? 4 : 3, 0, is32 ? 5 : 4}){ @Override - public long /*int*/ method0(long /*int*/[] args) {return QueryInterface(args[0], args[1]);} + public long method0(long[] args) {return QueryInterface(args[0], args[1]);} @Override - public long /*int*/ method1(long /*int*/[] args) {return AddRef();} + public long method1(long[] args) {return AddRef();} @Override - public long /*int*/ method2(long /*int*/[] args) {return Release();} + public long method2(long[] args) {return Release();} @Override - public long /*int*/ method3(long /*int*/[] args) { + public long method3(long[] args) { if (args.length == 5) { - return DragEnter(args[0], (int)/*64*/args[1], (int)/*64*/args[2], (int)/*64*/args[3], args[4]); + return DragEnter(args[0], (int)args[1], (int)args[2], (int)args[3], args[4]); } else { - return DragEnter_64(args[0], (int)/*64*/args[1], args[2], args[3]); + return DragEnter_64(args[0], (int)args[1], args[2], args[3]); } } @Override - public long /*int*/ method4(long /*int*/[] args) { + public long method4(long[] args) { if (args.length == 4) { - return DragOver((int)/*64*/args[0], (int)/*64*/args[1], (int)/*64*/args[2], args[3]); + return DragOver((int)args[0], (int)args[1], (int)args[2], args[3]); } else { - return DragOver_64((int)/*64*/args[0], args[1], args[2]); + return DragOver_64((int)args[0], args[1], args[2]); } } @Override - public long /*int*/ method5(long /*int*/[] args) {return DragLeave();} + public long method5(long[] args) {return DragLeave();} @Override - public long /*int*/ method6(long /*int*/[] args) { + public long method6(long[] args) { if (args.length == 5) { - return Drop(args[0], (int)/*64*/args[1], (int)/*64*/args[2], (int)/*64*/args[3], args[4]); + return Drop(args[0], (int)args[1], (int)args[2], (int)args[3], args[4]); } else { - return Drop_64(args[0], (int)/*64*/args[1], args[2], args[3]); + return Drop_64(args[0], (int)args[1], args[2], args[3]); } } }; @@ -274,13 +274,13 @@ void disposeCOMInterfaces() { iDropTarget = null; } -int DragEnter_64(long /*int*/ pDataObject, int grfKeyState, long pt, long /*int*/ pdwEffect) { +int DragEnter_64(long pDataObject, int grfKeyState, long pt, long pdwEffect) { POINT point = new POINT(); OS.MoveMemory(point, new long[]{pt}, 8); return DragEnter(pDataObject, grfKeyState, point.x, point.y, pdwEffect); } -int DragEnter(long /*int*/ pDataObject, int grfKeyState, int pt_x, int pt_y, long /*int*/ pdwEffect) { +int DragEnter(long pDataObject, int grfKeyState, int pt_x, int pt_y, long pdwEffect) { pt_x = DPIUtil.autoScaleDown(pt_x);// To Points pt_y = DPIUtil.autoScaleDown(pt_y);// To Points selectedDataType = null; @@ -341,13 +341,13 @@ int DragLeave() { return COM.S_OK; } -int DragOver_64(int grfKeyState, long pt, long /*int*/ pdwEffect) { +int DragOver_64(int grfKeyState, long pt, 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, long /*int*/ pdwEffect) { +int DragOver(int grfKeyState, int pt_x, int pt_y, long pdwEffect) { pt_x = DPIUtil.autoScaleDown(pt_x);// To Points pt_y = DPIUtil.autoScaleDown(pt_y);// To Points if (iDataObject == null) return COM.S_FALSE; @@ -395,13 +395,13 @@ int DragOver(int grfKeyState, int pt_x, int pt_y, long /*int*/ pdwEffect) { return COM.S_OK; } -int Drop_64(long /*int*/ pDataObject, int grfKeyState, long pt, long /*int*/ pdwEffect) { +int Drop_64(long pDataObject, int grfKeyState, long pt, long pdwEffect) { POINT point = new POINT(); OS.MoveMemory(point, new long[]{pt}, 8); return Drop(pDataObject, grfKeyState, point.x, point.y, pdwEffect); } -int Drop(long /*int*/ pDataObject, int grfKeyState, int pt_x, int pt_y, long /*int*/ pdwEffect) { +int Drop(long pDataObject, int grfKeyState, int pt_x, int pt_y, long pdwEffect) { pt_x = DPIUtil.autoScaleDown(pt_x);// To Points pt_y = DPIUtil.autoScaleDown(pt_y);// To Points DNDEvent event = new DNDEvent(); @@ -619,19 +619,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(long /*int*/ riid, long /*int*/ ppvObject) { +int QueryInterface(long riid, 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 long /*int*/[] {iDropTarget.getAddress()}, C.PTR_SIZEOF); + OS.MoveMemory(ppvObject, new long[] {iDropTarget.getAddress()}, C.PTR_SIZEOF); AddRef(); return COM.S_OK; } - OS.MoveMemory(ppvObject, new long /*int*/[] {0}, C.PTR_SIZEOF); + OS.MoveMemory(ppvObject, new long[] {0}, C.PTR_SIZEOF); return COM.E_NOINTERFACE; } @@ -650,7 +650,7 @@ int Release() { void refresh() { if (control == null || control.isDisposed()) return; - long /*int*/ handle = control.handle; + long handle = control.handle; RECT lpRect = new RECT(); if (OS.GetUpdateRect(handle, lpRect, false)) { OS.ImageList_DragShowNolock(false); @@ -700,7 +700,7 @@ public void setDropTargetEffect(DropTargetEffect effect) { dropEffect = effect; } -boolean setEventData(DNDEvent event, long /*int*/ pDataObject, int grfKeyState, int pt_x, int pt_y, long /*int*/ pdwEffect) { +boolean setEventData(DNDEvent event, long pDataObject, int grfKeyState, int pt_x, int pt_y, long pdwEffect) { if (pDataObject == 0 || pdwEffect == 0) return false; // get allowed operations @@ -726,14 +726,14 @@ boolean setEventData(DNDEvent event, long /*int*/ pDataObject, int grfKeyState, IDataObject dataObject = new IDataObject(pDataObject); dataObject.AddRef(); try { - long /*int*/[] address = new long /*int*/[1]; + long[] address = new 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 - long /*int*/ rgelt = OS.GlobalAlloc(OS.GMEM_FIXED | OS.GMEM_ZEROINIT, FORMATETC.sizeof); + 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 caab8e35bd..7f6ecfcf6f 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 @@ -87,7 +87,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; - long /*int*/ newPtr = OS.GlobalAlloc(COM.GMEM_FIXED | COM.GMEM_ZEROINIT, DROPFILES.sizeof + byteCount); + 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 313c54e01a..552ec74229 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 @@ -112,7 +112,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); - long /*int*/ lpMultiByteStr = OS.GlobalAlloc(OS.GMEM_FIXED | OS.GMEM_ZEROINIT, cchMultiByte); + long 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; @@ -143,10 +143,10 @@ public Object nativeToJava(TransferData transferData){ transferData.result = getData(data, formatetc, stgmedium); data.Release(); if (transferData.result != COM.S_OK) return null; - long /*int*/ hMem = stgmedium.unionField; + long hMem = stgmedium.unionField; try { - long /*int*/ lpMultiByteStr = OS.GlobalLock(hMem); + long 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 8fafa289d4..f5e21ec2a6 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 @@ -101,9 +101,9 @@ public void javaToNative(Object object, TransferData transferData) { offset += 4; } } - long /*int*/ newPtr = OS.GlobalAlloc(OS.GMEM_FIXED | OS.GMEM_ZEROINIT, BITMAPINFOHEADER.sizeof + colorSize + imageSize); + long newPtr = OS.GlobalAlloc(OS.GMEM_FIXED | OS.GMEM_ZEROINIT, BITMAPINFOHEADER.sizeof + colorSize + imageSize); OS.MoveMemory(newPtr, bmi, bmi.length); - long /*int*/ pBitDest = newPtr + BITMAPINFOHEADER.sizeof + colorSize; + long pBitDest = newPtr + BITMAPINFOHEADER.sizeof + colorSize; if (imageHeight <= 0) { OS.MoveMemory(pBitDest, imgData.data, imageSize); @@ -152,18 +152,18 @@ public Object nativeToJava(TransferData transferData) { transferData.result = getData(dataObject, formatetc, stgmedium); if (transferData.result != COM.S_OK) return null; - long /*int*/ hMem = stgmedium.unionField; + long hMem = stgmedium.unionField; dataObject.Release(); try { - long /*int*/ ptr = OS.GlobalLock(hMem); + long ptr = OS.GlobalLock(hMem); if (ptr == 0) return null; try { BITMAPINFOHEADER bmiHeader = new BITMAPINFOHEADER(); OS.MoveMemory(bmiHeader, ptr, BITMAPINFOHEADER.sizeof); - long /*int*/[] pBits = new long /*int*/[1]; - long /*int*/ memDib = OS.CreateDIBSection(0, ptr, OS.DIB_RGB_COLORS, pBits, 0, 0); + long[] pBits = new long[1]; + long memDib = OS.CreateDIBSection(0, ptr, OS.DIB_RGB_COLORS, pBits, 0, 0); if (memDib == 0) SWT.error(SWT.ERROR_NO_HANDLES); - long /*int*/ bits = ptr + bmiHeader.biSize; + long 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) { @@ -176,8 +176,8 @@ public Object nativeToJava(TransferData transferData) { OS.GetObject(memDib, DIBSECTION.sizeof, dib); int biHeight = dib.biHeight; int scanline = dib.biSizeImage / biHeight; - long /*int*/ pDestBits = pBits[0]; - long /*int*/ pSourceBits = bits + scanline * (biHeight - 1); + long pDestBits = pBits[0]; + long 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 dce84b050b..cb7278f958 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 @@ -38,17 +38,17 @@ int AddRef() { private void createCOMInterfaces() { iEnumFORMATETC = new COMObject(new int[] {2, 0, 0, 3, 1, 0, 1}){ @Override - public long /*int*/ method0(long /*int*/[] args) {return QueryInterface(args[0], args[1]);} + public long method0(long[] args) {return QueryInterface(args[0], args[1]);} @Override - public long /*int*/ method1(long /*int*/[] args) {return AddRef();} + public long method1(long[] args) {return AddRef();} @Override - public long /*int*/ method2(long /*int*/[] args) {return Release();} + public long method2(long[] args) {return Release();} @Override - public long /*int*/ method3(long /*int*/[] args) {return Next((int)/*64*/args[0], args[1], args[2]);} + public long method3(long[] args) {return Next((int)args[0], args[1], args[2]);} @Override - public long /*int*/ method4(long /*int*/[] args) {return Skip((int)/*64*/args[0]);} + public long method4(long[] args) {return Skip((int)args[0]);} @Override - public long /*int*/ method5(long /*int*/[] args) {return Reset();} + public long method5(long[] args) {return Reset();} // method6 Clone - not implemented }; } @@ -57,7 +57,7 @@ private void disposeCOMInterfaces() { iEnumFORMATETC.dispose(); iEnumFORMATETC = null; } -long /*int*/ getAddress() { +long getAddress() { return iEnumFORMATETC.getAddress(); } private FORMATETC[] getNextItems(int numItems){ @@ -76,7 +76,7 @@ private FORMATETC[] getNextItems(int numItems){ return items; } -private int Next(int celt, long /*int*/ rgelt, long /*int*/ pceltFetched) { +private int Next(int celt, long rgelt, 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. @@ -106,7 +106,7 @@ private int Next(int celt, long /*int*/ rgelt, long /*int*/ pceltFetched) { } return COM.S_FALSE; } -private int QueryInterface(long /*int*/ riid, long /*int*/ ppvObject) { +private int QueryInterface(long riid, long ppvObject) { if (riid == 0 || ppvObject == 0) return COM.E_NOINTERFACE; @@ -114,11 +114,11 @@ private int QueryInterface(long /*int*/ riid, long /*int*/ ppvObject) { COM.MoveMemory(guid, riid, GUID.sizeof); if (COM.IsEqualGUID(guid, COM.IIDIUnknown) || COM.IsEqualGUID(guid, COM.IIDIEnumFORMATETC)) { - OS.MoveMemory(ppvObject, new long /*int*/[] {iEnumFORMATETC.getAddress()}, C.PTR_SIZEOF); + OS.MoveMemory(ppvObject, new long[] {iEnumFORMATETC.getAddress()}, C.PTR_SIZEOF); AddRef(); return COM.S_OK; } - OS.MoveMemory(ppvObject, new long /*int*/[] {0}, C.PTR_SIZEOF); + OS.MoveMemory(ppvObject, new long[] {0}, C.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 48929ebca6..ab1fbb1f8d 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 @@ -74,7 +74,7 @@ public void javaToNative (Object object, TransferData transferData){ transferData.result = COM.DV_E_STGMEDIUM; return; } - long /*int*/ lpMultiByteStr = OS.GlobalAlloc(COM.GMEM_FIXED | COM.GMEM_ZEROINIT, cchMultiByte); + 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; @@ -105,9 +105,9 @@ public Object nativeToJava(TransferData transferData){ transferData.result = getData(data, formatetc, stgmedium); data.Release(); if (transferData.result != COM.S_OK) return null; - long /*int*/ hMem = stgmedium.unionField; + long hMem = stgmedium.unionField; try { - long /*int*/ lpMultiByteStr = OS.GlobalLock(hMem); + 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 ba16e8c618..8eac76a342 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 @@ -94,7 +94,7 @@ public class TableDragSourceEffect extends DragSourceEffect { event.offsetX = shdi.ptOffset.x; } event.offsetY = shdi.ptOffset.y; - long /*int*/ hImage = shdi.hbmpDragImage; + long hImage = shdi.hbmpDragImage; if (hImage != 0) { BITMAP bm = new BITMAP (); OS.GetObject (hImage, BITMAP.sizeof, bm); @@ -102,10 +102,10 @@ public class TableDragSourceEffect extends DragSourceEffect { int srcHeight = bm.bmHeight; /* Create resources */ - 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); + long hdc = OS.GetDC (0); + long srcHdc = OS.CreateCompatibleDC (hdc); + long oldSrcBitmap = OS.SelectObject (srcHdc, hImage); + long memHdc = OS.CreateCompatibleDC (hdc); BITMAPINFOHEADER bmiHeader = new BITMAPINFOHEADER (); bmiHeader.biSize = BITMAPINFOHEADER.sizeof; bmiHeader.biWidth = srcWidth; @@ -115,10 +115,10 @@ public class TableDragSourceEffect extends DragSourceEffect { bmiHeader.biCompression = OS.BI_RGB; byte [] bmi = new byte[BITMAPINFOHEADER.sizeof]; OS.MoveMemory (bmi, bmiHeader, BITMAPINFOHEADER.sizeof); - long /*int*/ [] pBits = new long /*int*/ [1]; - long /*int*/ memDib = OS.CreateDIBSection (0, bmi, OS.DIB_RGB_COLORS, pBits, 0, 0); + long [] pBits = new long [1]; + long memDib = OS.CreateDIBSection (0, bmi, OS.DIB_RGB_COLORS, pBits, 0, 0); if (memDib == 0) SWT.error (SWT.ERROR_NO_HANDLES); - long /*int*/ oldMemBitmap = OS.SelectObject (memHdc, memDib); + long oldMemBitmap = OS.SelectObject (memHdc, memDib); BITMAP dibBM = new BITMAP (); OS.GetObject (memDib, BITMAP.sizeof, dibBM); 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 adbb966ee2..42cb9d6b8f 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 @@ -110,7 +110,7 @@ public class TableDropTargetEffect extends DropTargetEffect { @Override public void dragLeave(DropTargetEvent event) { Table table = (Table) control; - long /*int*/ handle = table.handle; + long handle = table.handle; if (dropHighlight != null) { LVITEM lvItem = new LVITEM (); lvItem.stateMask = OS.LVIS_DROPHILITED; @@ -149,7 +149,7 @@ public class TableDropTargetEffect extends DropTargetEffect { public void dragOver(DropTargetEvent event) { Table table = (Table) getControl(); int effect = checkEffect(event.feedback); - long /*int*/ handle = table.handle; + long handle = table.handle; Point coordinates = new Point(event.x, event.y); coordinates = DPIUtil.autoScaleUp(table.toControl(coordinates)); // To Pixels LVHITTESTINFO pinfo = new LVHITTESTINFO(); @@ -162,8 +162,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, (int)/*64*/OS.SendMessage (handle, OS.LVM_GETTOPINDEX, 0, 0)); - int count = (int)/*64*/OS.SendMessage (handle, OS.LVM_GETITEMCOUNT, 0, 0); + int top = Math.max (0, (int)OS.SendMessage (handle, OS.LVM_GETTOPINDEX, 0, 0)); + int count = (int)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 af2fdef685..c9c233ecee 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 @@ -78,7 +78,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; - long /*int*/ newPtr = OS.GlobalAlloc(COM.GMEM_FIXED | COM.GMEM_ZEROINIT, byteCount); + 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; @@ -98,7 +98,7 @@ public void javaToNative (Object object, TransferData transferData){ transferData.result = COM.DV_E_STGMEDIUM; return; } - long /*int*/ lpMultiByteStr = OS.GlobalAlloc(COM.GMEM_FIXED | COM.GMEM_ZEROINIT, cchMultiByte); + 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; @@ -132,7 +132,7 @@ public Object nativeToJava(TransferData transferData){ transferData.result = getData(data, formatetc, stgmedium); data.Release(); if (transferData.result != COM.S_OK) return null; - long /*int*/ hMem = stgmedium.unionField; + long hMem = stgmedium.unionField; try { switch (transferData.type) { case CF_UNICODETEXTID: { @@ -140,7 +140,7 @@ public Object nativeToJava(TransferData transferData){ int size = OS.GlobalSize(hMem) / 2 * 2; if (size == 0) return null; char[] chars = new char[size/2]; - long /*int*/ ptr = OS.GlobalLock(hMem); + long ptr = OS.GlobalLock(hMem); if (ptr == 0) return null; try { OS.MoveMemory(chars, ptr, size); @@ -157,7 +157,7 @@ public Object nativeToJava(TransferData transferData){ } } case CF_TEXTID: { - long /*int*/ lpMultiByteStr = OS.GlobalLock(hMem); + 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 672b026229..80240e23d9 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 @@ -107,7 +107,7 @@ public class TransferData { * * @noreference This field is not intended to be referenced by clients. */ - public long /*int*/ pIDataObject; + public 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 411b45559b..363bf9c581 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 @@ -93,7 +93,7 @@ public class TreeDragSourceEffect extends DragSourceEffect { event.offsetX = shdi.ptOffset.x; } event.offsetY = shdi.ptOffset.y; - long /*int*/ hImage = shdi.hbmpDragImage; + long hImage = shdi.hbmpDragImage; if (hImage != 0) { BITMAP bm = new BITMAP (); OS.GetObject (hImage, BITMAP.sizeof, bm); @@ -101,10 +101,10 @@ public class TreeDragSourceEffect extends DragSourceEffect { int srcHeight = bm.bmHeight; /* Create resources */ - 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); + long hdc = OS.GetDC (0); + long srcHdc = OS.CreateCompatibleDC (hdc); + long oldSrcBitmap = OS.SelectObject (srcHdc, hImage); + long memHdc = OS.CreateCompatibleDC (hdc); BITMAPINFOHEADER bmiHeader = new BITMAPINFOHEADER (); bmiHeader.biSize = BITMAPINFOHEADER.sizeof; bmiHeader.biWidth = srcWidth; @@ -114,10 +114,10 @@ public class TreeDragSourceEffect extends DragSourceEffect { bmiHeader.biCompression = OS.BI_RGB; byte [] bmi = new byte[BITMAPINFOHEADER.sizeof]; OS.MoveMemory (bmi, bmiHeader, BITMAPINFOHEADER.sizeof); - long /*int*/ [] pBits = new long /*int*/ [1]; - long /*int*/ memDib = OS.CreateDIBSection (0, bmi, OS.DIB_RGB_COLORS, pBits, 0, 0); + long [] pBits = new long [1]; + long memDib = OS.CreateDIBSection (0, bmi, OS.DIB_RGB_COLORS, pBits, 0, 0); if (memDib == 0) SWT.error (SWT.ERROR_NO_HANDLES); - long /*int*/ oldMemBitmap = OS.SelectObject (memHdc, memDib); + long oldMemBitmap = OS.SelectObject (memHdc, memDib); BITMAP dibBM = new BITMAP (); OS.GetObject (memDib, BITMAP.sizeof, dibBM); 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 2b7883de89..87385adfdd 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 @@ -55,10 +55,10 @@ public class TreeDropTargetEffect extends DropTargetEffect { static final int SCROLL_HYSTERESIS = 200; // milli seconds static final int EXPAND_HYSTERESIS = 1000; // milli seconds - long /*int*/ dropIndex; - long /*int*/ scrollIndex; + long dropIndex; + long scrollIndex; long scrollBeginTime; - long /*int*/ expandIndex; + long expandIndex; long expandBeginTime; TreeItem insertItem; boolean insertBefore; @@ -121,7 +121,7 @@ public class TreeDropTargetEffect extends DropTargetEffect { @Override public void dragLeave(DropTargetEvent event) { Tree tree = (Tree) control; - long /*int*/ handle = tree.handle; + long handle = tree.handle; if (dropIndex != -1) { TVITEM tvItem = new TVITEM (); tvItem.hItem = dropIndex; @@ -163,22 +163,22 @@ public class TreeDropTargetEffect extends DropTargetEffect { public void dragOver(DropTargetEvent event) { Tree tree = (Tree) getControl(); int effect = checkEffect(event.feedback); - long /*int*/ handle = tree.handle; + long handle = tree.handle; Point coordinates = new Point(event.x, event.y); coordinates = DPIUtil.autoScaleUp(tree.toControl(coordinates)); // To Pixels TVHITTESTINFO lpht = new TVHITTESTINFO (); lpht.x = coordinates.x; lpht.y = coordinates.y; OS.SendMessage (handle, OS.TVM_HITTEST, 0, lpht); - long /*int*/ hItem = lpht.hItem; + 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) { - 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); + long topItem = OS.SendMessage(handle, OS.TVM_GETNEXTITEM, OS.TVGN_FIRSTVISIBLE, 0); + 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 fd1e22e170..1581e80a18 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 @@ -73,7 +73,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; - long /*int*/ newPtr = OS.GlobalAlloc(COM.GMEM_FIXED | COM.GMEM_ZEROINIT, byteCount); + 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; @@ -91,7 +91,7 @@ public void javaToNative (Object object, TransferData transferData){ transferData.result = COM.DV_E_STGMEDIUM; return; } - long /*int*/ lpMultiByteStr = OS.GlobalAlloc(OS.GMEM_FIXED | OS.GMEM_ZEROINIT, cchMultiByte); + 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; @@ -122,14 +122,14 @@ public Object nativeToJava(TransferData transferData){ transferData.result = getData(data, formatetc, stgmedium); data.Release(); if (transferData.result != COM.S_OK) return null; - long /*int*/ hMem = stgmedium.unionField; + long 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]; - long /*int*/ ptr = OS.GlobalLock(hMem); + long ptr = OS.GlobalLock(hMem); if (ptr == 0) return null; try { OS.MoveMemory(chars, ptr, size); @@ -145,7 +145,7 @@ public Object nativeToJava(TransferData transferData){ OS.GlobalUnlock(hMem); } } else if (transferData.type == CFSTR_INETURLID) { - long /*int*/ lpMultiByteStr = OS.GlobalLock(hMem); + long lpMultiByteStr = OS.GlobalLock(hMem); if (lpMultiByteStr == 0) return null; try { int codePage = OS.GetACP(); |