diff options
author | Alexander Kurtakov | 2017-09-27 07:44:06 +0000 |
---|---|---|
committer | Alexander Kurtakov | 2017-09-27 07:44:06 +0000 |
commit | aab6e35f45638c8e78f68696d4e0d73927332d5d (patch) | |
tree | 63d1f57b8b2b68fc99e878c6444050f918bdf564 | |
parent | 5b8fa75d1f7bd7eb02164c4992685338c6ecbba4 (diff) | |
download | eclipse.platform.swt-aab6e35f45638c8e78f68696d4e0d73927332d5d.tar.gz eclipse.platform.swt-aab6e35f45638c8e78f68696d4e0d73927332d5d.tar.xz eclipse.platform.swt-aab6e35f45638c8e78f68696d4e0d73927332d5d.zip |
Bug 525255 - Enable indirect static usage warnings
Cover win32.
Change-Id: Ifa0f68487fbcd57b84603c08ce5c388e74763706
Signed-off-by: Alexander Kurtakov <akurtako@redhat.com>
76 files changed, 715 insertions, 648 deletions
diff --git a/bundles/org.eclipse.swt/Eclipse SWT Accessibility/win32/org/eclipse/swt/accessibility/Accessible.java b/bundles/org.eclipse.swt/Eclipse SWT Accessibility/win32/org/eclipse/swt/accessibility/Accessible.java index 07b086e2a5..9f3c4ca63a 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT Accessibility/win32/org/eclipse/swt/accessibility/Accessible.java +++ b/bundles/org.eclipse.swt/Eclipse SWT Accessibility/win32/org/eclipse/swt/accessibility/Accessible.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2000, 2016 IBM Corporation and others. + * Copyright (c) 2000, 2017 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -15,6 +15,7 @@ import java.util.List; import org.eclipse.swt.*; import org.eclipse.swt.graphics.*; +import org.eclipse.swt.internal.*; import org.eclipse.swt.internal.ole.win32.*; import org.eclipse.swt.internal.win32.*; import org.eclipse.swt.ole.win32.*; @@ -123,7 +124,7 @@ public class Accessible { /* CreateStdAccessibleObject([in] hwnd, [in] idObject, [in] riidInterface, [out] ppvObject). * AddRef has already been called on ppvObject by the callee and must be released by the caller. */ - int result = (int)/*64*/COM.CreateStdAccessibleObject(control.handle, COM.OBJID_CLIENT, COM.IIDIAccessible, ppvObject); + int result = (int)/*64*/COM.CreateStdAccessibleObject(control.handle, OS.OBJID_CLIENT, COM.IIDIAccessible, ppvObject); /* The object needs to be checked, because if the CreateStdAccessibleObject() * symbol is not found, the return value is S_OK. */ @@ -206,9 +207,9 @@ public class Accessible { */ long /*int*/ ppVtable = objIAccessible.ppVtable; long /*int*/[] pVtable = new long /*int*/[1]; - COM.MoveMemory(pVtable, ppVtable, OS.PTR_SIZEOF); + OS.MoveMemory(pVtable, ppVtable, C.PTR_SIZEOF); long /*int*/[] funcs = new long /*int*/[28]; - COM.MoveMemory(funcs, pVtable[0], OS.PTR_SIZEOF * funcs.length); + OS.MoveMemory(funcs, pVtable[0], C.PTR_SIZEOF * funcs.length); funcs[9] = COM.get_accChild_CALLBACK(funcs[9]); funcs[10] = COM.get_accName_CALLBACK(funcs[10]); funcs[11] = COM.get_accValue_CALLBACK(funcs[11]); @@ -225,7 +226,7 @@ public class Accessible { funcs[25] = COM.accDoDefaultAction_CALLBACK(funcs[25]); funcs[26] = COM.put_accName_CALLBACK(funcs[26]); funcs[27] = COM.put_accValue_CALLBACK(funcs[27]); - COM.MoveMemory(pVtable[0], funcs, OS.PTR_SIZEOF * funcs.length); + OS.MoveMemory(pVtable[0], funcs, C.PTR_SIZEOF * funcs.length); } void createIAccessible2() { @@ -333,9 +334,9 @@ public class Accessible { */ long /*int*/ ppVtable = objIAccessible2.ppVtable; long /*int*/[] pVtable = new long /*int*/[1]; - COM.MoveMemory(pVtable, ppVtable, OS.PTR_SIZEOF); + OS.MoveMemory(pVtable, ppVtable, C.PTR_SIZEOF); long /*int*/[] funcs = new long /*int*/[28]; - COM.MoveMemory(funcs, pVtable[0], OS.PTR_SIZEOF * funcs.length); + OS.MoveMemory(funcs, pVtable[0], C.PTR_SIZEOF * funcs.length); funcs[9] = COM.get_accChild_CALLBACK(funcs[9]); funcs[10] = COM.get_accName_CALLBACK(funcs[10]); funcs[11] = COM.get_accValue_CALLBACK(funcs[11]); @@ -352,7 +353,7 @@ public class Accessible { funcs[25] = COM.accDoDefaultAction_CALLBACK(funcs[25]); funcs[26] = COM.put_accName_CALLBACK(funcs[26]); funcs[27] = COM.put_accValue_CALLBACK(funcs[27]); - COM.MoveMemory(pVtable[0], funcs, OS.PTR_SIZEOF * funcs.length); + OS.MoveMemory(pVtable[0], funcs, C.PTR_SIZEOF * funcs.length); } void createIAccessibleAction() { @@ -687,11 +688,11 @@ public class Accessible { /* Dereference VARIANT struct parameters. */ long /*int*/ ppVtable = objIAccessibleValue.ppVtable; long /*int*/[] pVtable = new long /*int*/[1]; - COM.MoveMemory(pVtable, ppVtable, OS.PTR_SIZEOF); + OS.MoveMemory(pVtable, ppVtable, C.PTR_SIZEOF); long /*int*/[] funcs = new long /*int*/[7]; - COM.MoveMemory(funcs, pVtable[0], OS.PTR_SIZEOF * funcs.length); + OS.MoveMemory(funcs, pVtable[0], C.PTR_SIZEOF * funcs.length); funcs[4] = COM.CALLBACK_setCurrentValue(funcs[4]); - COM.MoveMemory(pVtable[0], funcs, OS.PTR_SIZEOF * funcs.length); + OS.MoveMemory(pVtable[0], funcs, C.PTR_SIZEOF * funcs.length); } void createIEnumVARIANT() { @@ -1128,7 +1129,7 @@ public class Accessible { */ public long /*int*/ internal_WM_GETOBJECT (long /*int*/ wParam, long /*int*/ lParam) { if (objIAccessible == null) return 0; - if ((int)/*64*/lParam == COM.OBJID_CLIENT) { + if ((int)/*64*/lParam == OS.OBJID_CLIENT) { /* LresultFromObject([in] riid, [in] wParam, [in] pAcc) * The argument pAcc is owned by the caller so reference count does not * need to be incremented. @@ -1521,7 +1522,7 @@ public class Accessible { case ACC.EVENT_TABLE_CHANGED: { if (!(eventData instanceof int[] && ((int[])eventData).length == TABLE_MODEL_CHANGE_SIZE)) break; tableChange = (int[])eventData; - COM.NotifyWinEvent (COM.IA2_EVENT_TABLE_CHANGED, control.handle, COM.OBJID_CLIENT, eventChildID()); + OS.NotifyWinEvent (COM.IA2_EVENT_TABLE_CHANGED, control.handle, OS.OBJID_CLIENT, eventChildID()); break; } case ACC.EVENT_TEXT_CHANGED: { @@ -1531,11 +1532,11 @@ public class Accessible { switch (type) { case ACC.DELETE: textDeleted = (Object[])eventData; - COM.NotifyWinEvent (COM.IA2_EVENT_TEXT_REMOVED, control.handle, COM.OBJID_CLIENT, eventChildID()); + OS.NotifyWinEvent (COM.IA2_EVENT_TEXT_REMOVED, control.handle, OS.OBJID_CLIENT, eventChildID()); break; case ACC.INSERT: textInserted = (Object[])eventData; - COM.NotifyWinEvent (COM.IA2_EVENT_TEXT_INSERTED, control.handle, COM.OBJID_CLIENT, eventChildID()); + OS.NotifyWinEvent (COM.IA2_EVENT_TEXT_INSERTED, control.handle, OS.OBJID_CLIENT, eventChildID()); break; } break; @@ -1544,67 +1545,67 @@ public class Accessible { if (!(eventData instanceof Integer)) break; // int index = ((Integer)eventData).intValue(); // TODO: IA2 currently does not use the index, however the plan is to use it in future - COM.NotifyWinEvent (COM.IA2_EVENT_HYPERTEXT_LINK_SELECTED, control.handle, COM.OBJID_CLIENT, eventChildID()); + OS.NotifyWinEvent (COM.IA2_EVENT_HYPERTEXT_LINK_SELECTED, control.handle, OS.OBJID_CLIENT, eventChildID()); break; } case ACC.EVENT_VALUE_CHANGED: - COM.NotifyWinEvent (COM.EVENT_OBJECT_VALUECHANGE, control.handle, COM.OBJID_CLIENT, eventChildID()); break; + OS.NotifyWinEvent (COM.EVENT_OBJECT_VALUECHANGE, control.handle, OS.OBJID_CLIENT, eventChildID()); break; case ACC.EVENT_STATE_CHANGED: - COM.NotifyWinEvent (COM.EVENT_OBJECT_STATECHANGE, control.handle, COM.OBJID_CLIENT, eventChildID()); break; + OS.NotifyWinEvent (COM.EVENT_OBJECT_STATECHANGE, control.handle, OS.OBJID_CLIENT, eventChildID()); break; case ACC.EVENT_SELECTION_CHANGED: - COM.NotifyWinEvent (COM.EVENT_OBJECT_SELECTIONWITHIN, control.handle, COM.OBJID_CLIENT, eventChildID()); break; + OS.NotifyWinEvent (COM.EVENT_OBJECT_SELECTIONWITHIN, control.handle, OS.OBJID_CLIENT, eventChildID()); break; case ACC.EVENT_TEXT_SELECTION_CHANGED: - COM.NotifyWinEvent (COM.EVENT_OBJECT_TEXTSELECTIONCHANGED, control.handle, COM.OBJID_CLIENT, eventChildID()); break; + OS.NotifyWinEvent (COM.EVENT_OBJECT_TEXTSELECTIONCHANGED, control.handle, OS.OBJID_CLIENT, eventChildID()); break; case ACC.EVENT_LOCATION_CHANGED: - COM.NotifyWinEvent (COM.EVENT_OBJECT_LOCATIONCHANGE, control.handle, COM.OBJID_CLIENT, eventChildID()); break; + OS.NotifyWinEvent (COM.EVENT_OBJECT_LOCATIONCHANGE, control.handle, OS.OBJID_CLIENT, eventChildID()); break; case ACC.EVENT_NAME_CHANGED: - COM.NotifyWinEvent (COM.EVENT_OBJECT_NAMECHANGE, control.handle, COM.OBJID_CLIENT, eventChildID()); break; + OS.NotifyWinEvent (COM.EVENT_OBJECT_NAMECHANGE, control.handle, OS.OBJID_CLIENT, eventChildID()); break; case ACC.EVENT_DESCRIPTION_CHANGED: - COM.NotifyWinEvent (COM.EVENT_OBJECT_DESCRIPTIONCHANGE, control.handle, COM.OBJID_CLIENT, eventChildID()); break; + OS.NotifyWinEvent (COM.EVENT_OBJECT_DESCRIPTIONCHANGE, control.handle, OS.OBJID_CLIENT, eventChildID()); break; case ACC.EVENT_DOCUMENT_LOAD_COMPLETE: - COM.NotifyWinEvent (COM.IA2_EVENT_DOCUMENT_LOAD_COMPLETE, control.handle, COM.OBJID_CLIENT, eventChildID()); break; + OS.NotifyWinEvent (COM.IA2_EVENT_DOCUMENT_LOAD_COMPLETE, control.handle, OS.OBJID_CLIENT, eventChildID()); break; case ACC.EVENT_DOCUMENT_LOAD_STOPPED: - COM.NotifyWinEvent (COM.IA2_EVENT_DOCUMENT_LOAD_STOPPED, control.handle, COM.OBJID_CLIENT, eventChildID()); break; + OS.NotifyWinEvent (COM.IA2_EVENT_DOCUMENT_LOAD_STOPPED, control.handle, OS.OBJID_CLIENT, eventChildID()); break; case ACC.EVENT_DOCUMENT_RELOAD: - COM.NotifyWinEvent (COM.IA2_EVENT_DOCUMENT_RELOAD, control.handle, COM.OBJID_CLIENT, eventChildID()); break; + OS.NotifyWinEvent (COM.IA2_EVENT_DOCUMENT_RELOAD, control.handle, OS.OBJID_CLIENT, eventChildID()); break; case ACC.EVENT_PAGE_CHANGED: - COM.NotifyWinEvent (COM.IA2_EVENT_PAGE_CHANGED, control.handle, COM.OBJID_CLIENT, eventChildID()); break; + OS.NotifyWinEvent (COM.IA2_EVENT_PAGE_CHANGED, control.handle, OS.OBJID_CLIENT, eventChildID()); break; case ACC.EVENT_SECTION_CHANGED: - COM.NotifyWinEvent (COM.IA2_EVENT_SECTION_CHANGED, control.handle, COM.OBJID_CLIENT, eventChildID()); break; + OS.NotifyWinEvent (COM.IA2_EVENT_SECTION_CHANGED, control.handle, OS.OBJID_CLIENT, eventChildID()); break; case ACC.EVENT_ACTION_CHANGED: - COM.NotifyWinEvent (COM.IA2_EVENT_ACTION_CHANGED, control.handle, COM.OBJID_CLIENT, eventChildID()); break; + OS.NotifyWinEvent (COM.IA2_EVENT_ACTION_CHANGED, control.handle, OS.OBJID_CLIENT, eventChildID()); break; case ACC.EVENT_HYPERLINK_START_INDEX_CHANGED: - COM.NotifyWinEvent (COM.IA2_EVENT_HYPERLINK_START_INDEX_CHANGED, control.handle, COM.OBJID_CLIENT, eventChildID()); break; + OS.NotifyWinEvent (COM.IA2_EVENT_HYPERLINK_START_INDEX_CHANGED, control.handle, OS.OBJID_CLIENT, eventChildID()); break; case ACC.EVENT_HYPERLINK_END_INDEX_CHANGED: - COM.NotifyWinEvent (COM.IA2_EVENT_HYPERLINK_END_INDEX_CHANGED, control.handle, COM.OBJID_CLIENT, eventChildID()); break; + OS.NotifyWinEvent (COM.IA2_EVENT_HYPERLINK_END_INDEX_CHANGED, control.handle, OS.OBJID_CLIENT, eventChildID()); break; case ACC.EVENT_HYPERLINK_ANCHOR_COUNT_CHANGED: - COM.NotifyWinEvent (COM.IA2_EVENT_HYPERLINK_ANCHOR_COUNT_CHANGED, control.handle, COM.OBJID_CLIENT, eventChildID()); break; + OS.NotifyWinEvent (COM.IA2_EVENT_HYPERLINK_ANCHOR_COUNT_CHANGED, control.handle, OS.OBJID_CLIENT, eventChildID()); break; case ACC.EVENT_HYPERLINK_SELECTED_LINK_CHANGED: - COM.NotifyWinEvent (COM.IA2_EVENT_HYPERLINK_SELECTED_LINK_CHANGED, control.handle, COM.OBJID_CLIENT, eventChildID()); break; + OS.NotifyWinEvent (COM.IA2_EVENT_HYPERLINK_SELECTED_LINK_CHANGED, control.handle, OS.OBJID_CLIENT, eventChildID()); break; case ACC.EVENT_HYPERLINK_ACTIVATED: - COM.NotifyWinEvent (COM.IA2_EVENT_HYPERLINK_ACTIVATED, control.handle, COM.OBJID_CLIENT, eventChildID()); break; + OS.NotifyWinEvent (COM.IA2_EVENT_HYPERLINK_ACTIVATED, control.handle, OS.OBJID_CLIENT, eventChildID()); break; case ACC.EVENT_HYPERTEXT_LINK_COUNT_CHANGED: - COM.NotifyWinEvent (COM.IA2_EVENT_HYPERTEXT_LINK_COUNT_CHANGED, control.handle, COM.OBJID_CLIENT, eventChildID()); break; + OS.NotifyWinEvent (COM.IA2_EVENT_HYPERTEXT_LINK_COUNT_CHANGED, control.handle, OS.OBJID_CLIENT, eventChildID()); break; case ACC.EVENT_ATTRIBUTE_CHANGED: - COM.NotifyWinEvent (COM.IA2_EVENT_ATTRIBUTE_CHANGED, control.handle, COM.OBJID_CLIENT, eventChildID()); break; + OS.NotifyWinEvent (COM.IA2_EVENT_ATTRIBUTE_CHANGED, control.handle, OS.OBJID_CLIENT, eventChildID()); break; case ACC.EVENT_TABLE_CAPTION_CHANGED: - COM.NotifyWinEvent (COM.IA2_EVENT_TABLE_CAPTION_CHANGED, control.handle, COM.OBJID_CLIENT, eventChildID()); break; + OS.NotifyWinEvent (COM.IA2_EVENT_TABLE_CAPTION_CHANGED, control.handle, OS.OBJID_CLIENT, eventChildID()); break; case ACC.EVENT_TABLE_COLUMN_DESCRIPTION_CHANGED: - COM.NotifyWinEvent (COM.IA2_EVENT_TABLE_COLUMN_DESCRIPTION_CHANGED, control.handle, COM.OBJID_CLIENT, eventChildID()); break; + OS.NotifyWinEvent (COM.IA2_EVENT_TABLE_COLUMN_DESCRIPTION_CHANGED, control.handle, OS.OBJID_CLIENT, eventChildID()); break; case ACC.EVENT_TABLE_COLUMN_HEADER_CHANGED: - COM.NotifyWinEvent (COM.IA2_EVENT_TABLE_COLUMN_HEADER_CHANGED, control.handle, COM.OBJID_CLIENT, eventChildID()); break; + OS.NotifyWinEvent (COM.IA2_EVENT_TABLE_COLUMN_HEADER_CHANGED, control.handle, OS.OBJID_CLIENT, eventChildID()); break; case ACC.EVENT_TABLE_ROW_DESCRIPTION_CHANGED: - COM.NotifyWinEvent (COM.IA2_EVENT_TABLE_ROW_DESCRIPTION_CHANGED, control.handle, COM.OBJID_CLIENT, eventChildID()); break; + OS.NotifyWinEvent (COM.IA2_EVENT_TABLE_ROW_DESCRIPTION_CHANGED, control.handle, OS.OBJID_CLIENT, eventChildID()); break; case ACC.EVENT_TABLE_ROW_HEADER_CHANGED: - COM.NotifyWinEvent (COM.IA2_EVENT_TABLE_ROW_HEADER_CHANGED, control.handle, COM.OBJID_CLIENT, eventChildID()); break; + OS.NotifyWinEvent (COM.IA2_EVENT_TABLE_ROW_HEADER_CHANGED, control.handle, OS.OBJID_CLIENT, eventChildID()); break; case ACC.EVENT_TABLE_SUMMARY_CHANGED: - COM.NotifyWinEvent (COM.IA2_EVENT_TABLE_SUMMARY_CHANGED, control.handle, COM.OBJID_CLIENT, eventChildID()); break; + OS.NotifyWinEvent (COM.IA2_EVENT_TABLE_SUMMARY_CHANGED, control.handle, OS.OBJID_CLIENT, eventChildID()); break; case ACC.EVENT_TEXT_ATTRIBUTE_CHANGED: - COM.NotifyWinEvent (COM.IA2_EVENT_TEXT_ATTRIBUTE_CHANGED, control.handle, COM.OBJID_CLIENT, eventChildID()); break; + OS.NotifyWinEvent (COM.IA2_EVENT_TEXT_ATTRIBUTE_CHANGED, control.handle, OS.OBJID_CLIENT, eventChildID()); break; case ACC.EVENT_TEXT_CARET_MOVED: - COM.NotifyWinEvent (COM.IA2_EVENT_TEXT_CARET_MOVED, control.handle, COM.OBJID_CLIENT, eventChildID()); break; + OS.NotifyWinEvent (COM.IA2_EVENT_TEXT_CARET_MOVED, control.handle, OS.OBJID_CLIENT, eventChildID()); break; case ACC.EVENT_TEXT_COLUMN_CHANGED: - COM.NotifyWinEvent (COM.IA2_EVENT_TEXT_COLUMN_CHANGED, control.handle, COM.OBJID_CLIENT, eventChildID()); break; + OS.NotifyWinEvent (COM.IA2_EVENT_TEXT_COLUMN_CHANGED, control.handle, OS.OBJID_CLIENT, eventChildID()); break; } } @@ -1644,19 +1645,19 @@ public class Accessible { if (DEBUG) print(this + ".NotifyWinEvent " + getEventString(event) + " hwnd=" + control.handle + " childID=" + osChildID); switch (event) { case ACC.EVENT_STATE_CHANGED: - COM.NotifyWinEvent (COM.EVENT_OBJECT_STATECHANGE, control.handle, COM.OBJID_CLIENT, osChildID); break; + OS.NotifyWinEvent (COM.EVENT_OBJECT_STATECHANGE, control.handle, OS.OBJID_CLIENT, osChildID); break; case ACC.EVENT_NAME_CHANGED: - COM.NotifyWinEvent (COM.EVENT_OBJECT_NAMECHANGE, control.handle, COM.OBJID_CLIENT, osChildID); break; + OS.NotifyWinEvent (COM.EVENT_OBJECT_NAMECHANGE, control.handle, OS.OBJID_CLIENT, osChildID); break; case ACC.EVENT_VALUE_CHANGED: - COM.NotifyWinEvent (COM.EVENT_OBJECT_VALUECHANGE, control.handle, COM.OBJID_CLIENT, osChildID); break; + OS.NotifyWinEvent (COM.EVENT_OBJECT_VALUECHANGE, control.handle, OS.OBJID_CLIENT, osChildID); break; case ACC.EVENT_LOCATION_CHANGED: - COM.NotifyWinEvent (COM.EVENT_OBJECT_LOCATIONCHANGE, control.handle, COM.OBJID_CLIENT, osChildID); break; + OS.NotifyWinEvent (COM.EVENT_OBJECT_LOCATIONCHANGE, control.handle, OS.OBJID_CLIENT, osChildID); break; case ACC.EVENT_SELECTION_CHANGED: - COM.NotifyWinEvent (COM.EVENT_OBJECT_SELECTIONWITHIN, control.handle, COM.OBJID_CLIENT, osChildID); break; + OS.NotifyWinEvent (COM.EVENT_OBJECT_SELECTIONWITHIN, control.handle, OS.OBJID_CLIENT, osChildID); break; case ACC.EVENT_TEXT_SELECTION_CHANGED: - COM.NotifyWinEvent (COM.EVENT_OBJECT_TEXTSELECTIONCHANGED, control.handle, COM.OBJID_CLIENT, osChildID); break; + OS.NotifyWinEvent (COM.EVENT_OBJECT_TEXTSELECTIONCHANGED, control.handle, OS.OBJID_CLIENT, osChildID); break; case ACC.EVENT_DESCRIPTION_CHANGED: - COM.NotifyWinEvent (COM.EVENT_OBJECT_DESCRIPTIONCHANGE, control.handle, COM.OBJID_CLIENT, osChildID); break; + OS.NotifyWinEvent (COM.EVENT_OBJECT_DESCRIPTIONCHANGE, control.handle, OS.OBJID_CLIENT, osChildID); break; } } @@ -1676,7 +1677,7 @@ public class Accessible { checkWidget(); if (!isATRunning ()) return; if (DEBUG) print(this + ".NotifyWinEvent EVENT_OBJECT_SELECTIONWITHIN hwnd=" + control.handle + " childID=" + eventChildID()); - COM.NotifyWinEvent (COM.EVENT_OBJECT_SELECTIONWITHIN, control.handle, COM.OBJID_CLIENT, eventChildID()); + OS.NotifyWinEvent (COM.EVENT_OBJECT_SELECTIONWITHIN, control.handle, OS.OBJID_CLIENT, eventChildID()); } /** @@ -1695,7 +1696,7 @@ public class Accessible { if (!isATRunning ()) return; int osChildID = childID == ACC.CHILDID_SELF ? eventChildID() : childIDToOs(childID); if (DEBUG) print(this + ".NotifyWinEvent EVENT_OBJECT_FOCUS hwnd=" + control.handle + " childID=" + osChildID); - COM.NotifyWinEvent (COM.EVENT_OBJECT_FOCUS, control.handle, COM.OBJID_CLIENT, osChildID); + OS.NotifyWinEvent (OS.EVENT_OBJECT_FOCUS, control.handle, OS.OBJID_CLIENT, osChildID); } /** @@ -1719,10 +1720,10 @@ public class Accessible { public void run() { if (!isATRunning ()) return; if (DEBUG) print(this + ".NotifyWinEvent EVENT_OBJECT_LOCATIONCHANGE hwnd=" + control.handle + " childID=" + eventChildID()); - COM.NotifyWinEvent (COM.EVENT_OBJECT_LOCATIONCHANGE, control.handle, COM.OBJID_CARET, eventChildID()); + OS.NotifyWinEvent (COM.EVENT_OBJECT_LOCATIONCHANGE, control.handle, OS.OBJID_CARET, eventChildID()); if (!UseIA2) return; if (DEBUG) print(this + ".NotifyWinEvent IA2_EVENT_TEXT_CARET_MOVED hwnd=" + control.handle + " childID=" + eventChildID()); - COM.NotifyWinEvent (COM.IA2_EVENT_TEXT_CARET_MOVED, control.handle, COM.OBJID_CLIENT, eventChildID()); + OS.NotifyWinEvent (COM.IA2_EVENT_TEXT_CARET_MOVED, control.handle, OS.OBJID_CLIENT, eventChildID()); } }; } @@ -1770,7 +1771,7 @@ public class Accessible { return; } if (DEBUG) print(this + ".NotifyWinEvent EVENT_OBJECT_VALUECHANGE hwnd=" + control.handle + " childID=" + eventChildID()); - COM.NotifyWinEvent (COM.EVENT_OBJECT_VALUECHANGE, control.handle, COM.OBJID_CLIENT, eventChildID()); + OS.NotifyWinEvent (COM.EVENT_OBJECT_VALUECHANGE, control.handle, OS.OBJID_CLIENT, eventChildID()); } /** @@ -1788,7 +1789,7 @@ public class Accessible { checkWidget(); if (!isATRunning ()) return; if (DEBUG) print(this + ".NotifyWinEvent EVENT_OBJECT_TEXTSELECTIONCHANGED hwnd=" + control.handle + " childID=" + eventChildID()); - COM.NotifyWinEvent (COM.EVENT_OBJECT_TEXTSELECTIONCHANGED, control.handle, COM.OBJID_CLIENT, eventChildID()); + OS.NotifyWinEvent (COM.EVENT_OBJECT_TEXTSELECTIONCHANGED, control.handle, OS.OBJID_CLIENT, eventChildID()); } /* QueryInterface([in] iid, [out] ppvObject) @@ -1797,12 +1798,12 @@ public class Accessible { */ int QueryInterface(long /*int*/ iid, long /*int*/ ppvObject) { if (control != null && control.isDisposed()) return COM.CO_E_OBJNOTCONNECTED; - COM.MoveMemory(ppvObject, new long /*int*/[] { 0 }, OS.PTR_SIZEOF); + OS.MoveMemory(ppvObject, new long /*int*/[] { 0 }, C.PTR_SIZEOF); GUID guid = new GUID(); COM.MoveMemory(guid, iid, GUID.sizeof); if (COM.IsEqualGUID(guid, COM.IIDIUnknown)) { - COM.MoveMemory(ppvObject, new long /*int*/[] { getAddress() }, OS.PTR_SIZEOF); + OS.MoveMemory(ppvObject, new long /*int*/[] { getAddress() }, C.PTR_SIZEOF); AddRef(); if (DEBUG) print(this + ".QueryInterface guid=" + guidString(guid) + " returning " + getAddress() + hresult(COM.S_OK)); return COM.S_OK; @@ -1810,7 +1811,7 @@ public class Accessible { if (COM.IsEqualGUID(guid, COM.IIDIDispatch) || COM.IsEqualGUID(guid, COM.IIDIAccessible)) { if (objIAccessible == null) createIAccessible(); - COM.MoveMemory(ppvObject, new long /*int*/[] { objIAccessible.getAddress() }, OS.PTR_SIZEOF); + OS.MoveMemory(ppvObject, new long /*int*/[] { objIAccessible.getAddress() }, C.PTR_SIZEOF); AddRef(); if (DEBUG) print(this + ".QueryInterface guid=" + guidString(guid) + " returning " + objIAccessible.getAddress() + hresult(COM.S_OK)); return COM.S_OK; @@ -1818,7 +1819,7 @@ public class Accessible { if (COM.IsEqualGUID(guid, COM.IIDIEnumVARIANT)) { if (objIEnumVARIANT == null) createIEnumVARIANT(); - COM.MoveMemory(ppvObject, new long /*int*/[] { objIEnumVARIANT.getAddress() }, OS.PTR_SIZEOF); + OS.MoveMemory(ppvObject, new long /*int*/[] { objIEnumVARIANT.getAddress() }, C.PTR_SIZEOF); AddRef(); enumIndex = 0; if (DEBUG) print(this + ".QueryInterface guid=" + guidString(guid) + " returning " + objIEnumVARIANT.getAddress() + hresult(COM.S_OK)); @@ -1833,7 +1834,7 @@ public class Accessible { accessibleValueListenersSize() > 0 || accessibleControlListenersSize() > 0 || getRelationCount() > 0 || (control instanceof Button && ((control.getStyle() & SWT.RADIO) != 0)) || (control instanceof Composite)) { if (objIServiceProvider == null) createIServiceProvider(); - COM.MoveMemory(ppvObject, new long /*int*/[] { objIServiceProvider.getAddress() }, OS.PTR_SIZEOF); + OS.MoveMemory(ppvObject, new long /*int*/[] { objIServiceProvider.getAddress() }, C.PTR_SIZEOF); AddRef(); if (DEBUG) print(this + ".QueryInterface guid=" + guidString(guid) + " returning " + objIServiceProvider.getAddress() + hresult(COM.S_OK)); return COM.S_OK; @@ -1852,7 +1853,7 @@ public class Accessible { /* Forward any other GUIDs to the OS proxy. */ long /*int*/[] ppv = new long /*int*/[1]; code = iaccessible.QueryInterface(guid, ppv); - COM.MoveMemory(ppvObject, ppv, OS.PTR_SIZEOF); + OS.MoveMemory(ppvObject, ppv, C.PTR_SIZEOF); if (DEBUG) if (interesting(guid)) print("QueryInterface guid=" + guidString(guid) + " returning super" + hresult(code)); return code; } @@ -1986,7 +1987,7 @@ public class Accessible { /* QueryService([in] guidService, [in] riid, [out] ppvObject) */ int QueryService(long /*int*/ guidService, long /*int*/ riid, long /*int*/ ppvObject) { - COM.MoveMemory(ppvObject, new long /*int*/[] { 0 }, OS.PTR_SIZEOF); + OS.MoveMemory(ppvObject, new long /*int*/[] { 0 }, C.PTR_SIZEOF); GUID service = new GUID(); COM.MoveMemory(service, guidService, GUID.sizeof); GUID guid = new GUID(); @@ -1996,7 +1997,7 @@ public class Accessible { if (COM.IsEqualGUID(guid, COM.IIDIUnknown) || COM.IsEqualGUID(guid, COM.IIDIDispatch) | COM.IsEqualGUID(guid, COM.IIDIAccessible)) { if (objIAccessible == null) createIAccessible(); if (DEBUG) print(this + ".QueryService service=" + guidString(service) + " guid=" + guidString(guid) + " returning " + objIAccessible.getAddress() + hresult(COM.S_OK)); - COM.MoveMemory(ppvObject, new long /*int*/[] { objIAccessible.getAddress() }, OS.PTR_SIZEOF); + OS.MoveMemory(ppvObject, new long /*int*/[] { objIAccessible.getAddress() }, C.PTR_SIZEOF); AddRef(); return COM.S_OK; } @@ -2023,7 +2024,7 @@ public class Accessible { IServiceProvider iserviceProvider = new IServiceProvider(ppv[0]); long /*int*/ [] ppvx = new long /*int*/ [1]; code = iserviceProvider.QueryService(service, guid, ppvx); - COM.MoveMemory(ppvObject, ppvx, OS.PTR_SIZEOF); + OS.MoveMemory(ppvObject, ppvx, C.PTR_SIZEOF); if (DEBUG) if (interesting(service) && interesting(guid)) print("QueryService service=" + guidString(service) + " guid=" + guidString(guid) + " returning super" + hresult(code)); return code; } @@ -2042,7 +2043,7 @@ public class Accessible { accessibleValueListenersSize() > 0 || accessibleControlListenersSize() > 0 || getRelationCount() > 0 || (control instanceof Button && ((control.getStyle() & SWT.RADIO) != 0)) || (control instanceof Composite)) { if (objIAccessible2 == null) createIAccessible2(); - COM.MoveMemory(ppvObject, new long /*int*/[] { objIAccessible2.getAddress() }, OS.PTR_SIZEOF); + OS.MoveMemory(ppvObject, new long /*int*/[] { objIAccessible2.getAddress() }, C.PTR_SIZEOF); AddRef(); return COM.S_OK; } @@ -2052,7 +2053,7 @@ public class Accessible { if (COM.IsEqualGUID(guid, COM.IIDIAccessibleAction)) { if (accessibleActionListenersSize() > 0) { if (objIAccessibleAction == null) createIAccessibleAction(); - COM.MoveMemory(ppvObject, new long /*int*/[] { objIAccessibleAction.getAddress() }, OS.PTR_SIZEOF); + OS.MoveMemory(ppvObject, new long /*int*/[] { objIAccessibleAction.getAddress() }, C.PTR_SIZEOF); AddRef(); return COM.S_OK; } @@ -2061,7 +2062,7 @@ public class Accessible { if (COM.IsEqualGUID(guid, COM.IIDIAccessibleApplication)) { if (objIAccessibleApplication == null) createIAccessibleApplication(); - COM.MoveMemory(ppvObject, new long /*int*/[] { objIAccessibleApplication.getAddress() }, OS.PTR_SIZEOF); + OS.MoveMemory(ppvObject, new long /*int*/[] { objIAccessibleApplication.getAddress() }, C.PTR_SIZEOF); AddRef(); return COM.S_OK; } @@ -2080,7 +2081,7 @@ public class Accessible { if (COM.IsEqualGUID(guid, COM.IIDIAccessibleEditableText)) { if (accessibleEditableTextListenersSize() > 0) { if (objIAccessibleEditableText == null) createIAccessibleEditableText(); - COM.MoveMemory(ppvObject, new long /*int*/[] { objIAccessibleEditableText.getAddress() }, OS.PTR_SIZEOF); + OS.MoveMemory(ppvObject, new long /*int*/[] { objIAccessibleEditableText.getAddress() }, C.PTR_SIZEOF); AddRef(); return COM.S_OK; } @@ -2090,7 +2091,7 @@ public class Accessible { if (COM.IsEqualGUID(guid, COM.IIDIAccessibleHyperlink)) { if (accessibleHyperlinkListenersSize() > 0) { if (objIAccessibleHyperlink == null) createIAccessibleHyperlink(); - COM.MoveMemory(ppvObject, new long /*int*/[] { objIAccessibleHyperlink.getAddress() }, OS.PTR_SIZEOF); + OS.MoveMemory(ppvObject, new long /*int*/[] { objIAccessibleHyperlink.getAddress() }, C.PTR_SIZEOF); AddRef(); return COM.S_OK; } @@ -2100,7 +2101,7 @@ public class Accessible { if (COM.IsEqualGUID(guid, COM.IIDIAccessibleHypertext)) { if (accessibleTextExtendedListenersSize() > 0) { if (objIAccessibleHypertext == null) createIAccessibleHypertext(); - COM.MoveMemory(ppvObject, new long /*int*/[] { objIAccessibleHypertext.getAddress() }, OS.PTR_SIZEOF); + OS.MoveMemory(ppvObject, new long /*int*/[] { objIAccessibleHypertext.getAddress() }, C.PTR_SIZEOF); AddRef(); return COM.S_OK; } @@ -2126,7 +2127,7 @@ public class Accessible { if (COM.IsEqualGUID(guid, COM.IIDIAccessibleTable2)) { if (accessibleTableListenersSize() > 0) { if (objIAccessibleTable2 == null) createIAccessibleTable2(); - COM.MoveMemory(ppvObject, new long /*int*/[] { objIAccessibleTable2.getAddress() }, OS.PTR_SIZEOF); + OS.MoveMemory(ppvObject, new long /*int*/[] { objIAccessibleTable2.getAddress() }, C.PTR_SIZEOF); AddRef(); return COM.S_OK; } @@ -2136,7 +2137,7 @@ public class Accessible { if (COM.IsEqualGUID(guid, COM.IIDIAccessibleTableCell)) { if (accessibleTableCellListenersSize() > 0) { if (objIAccessibleTableCell == null) createIAccessibleTableCell(); - COM.MoveMemory(ppvObject, new long /*int*/[] { objIAccessibleTableCell.getAddress() }, OS.PTR_SIZEOF); + OS.MoveMemory(ppvObject, new long /*int*/[] { objIAccessibleTableCell.getAddress() }, C.PTR_SIZEOF); AddRef(); return COM.S_OK; } @@ -2146,7 +2147,7 @@ public class Accessible { if (COM.IsEqualGUID(guid, COM.IIDIAccessibleText)) { if (accessibleTextExtendedListenersSize() > 0 || accessibleAttributeListenersSize() > 0) { if (objIAccessibleText == null) createIAccessibleText(); - COM.MoveMemory(ppvObject, new long /*int*/[] { objIAccessibleText.getAddress() }, OS.PTR_SIZEOF); + OS.MoveMemory(ppvObject, new long /*int*/[] { objIAccessibleText.getAddress() }, C.PTR_SIZEOF); AddRef(); return COM.S_OK; } @@ -2156,7 +2157,7 @@ public class Accessible { if (COM.IsEqualGUID(guid, COM.IIDIAccessibleValue)) { if (accessibleValueListenersSize() > 0) { if (objIAccessibleValue == null) createIAccessibleValue(); - COM.MoveMemory(ppvObject, new long /*int*/[] { objIAccessibleValue.getAddress() }, OS.PTR_SIZEOF); + OS.MoveMemory(ppvObject, new long /*int*/[] { objIAccessibleValue.getAddress() }, C.PTR_SIZEOF); AddRef(); return COM.S_OK; } @@ -2250,10 +2251,10 @@ public class Accessible { } if (code == COM.S_OK) { int[] pLeft = new int[1], pTop = new int[1], pWidth = new int[1], pHeight = new int[1]; - COM.MoveMemory(pLeft, pxLeft, 4); - COM.MoveMemory(pTop, pyTop, 4); - COM.MoveMemory(pWidth, pcxWidth, 4); - COM.MoveMemory(pHeight, pcyHeight, 4); + OS.MoveMemory(pLeft, pxLeft, 4); + OS.MoveMemory(pTop, pyTop, 4); + OS.MoveMemory(pWidth, pcxWidth, 4); + OS.MoveMemory(pHeight, pcyHeight, 4); osLeft = pLeft[0]; osTop = pTop[0]; osWidth = pWidth[0]; osHeight = pHeight[0]; } } @@ -2313,7 +2314,7 @@ public class Accessible { if (v.lVal == COM.CHILDID_SELF) { if (DEBUG) print(this + ".IAccessible::get_accChild(" + v.lVal + ") returning " + getAddress() + hresult(COM.S_OK)); AddRef(); - COM.MoveMemory(ppdispChild, new long /*int*/[] { getAddress() }, OS.PTR_SIZEOF); + OS.MoveMemory(ppdispChild, new long /*int*/[] { getAddress() }, C.PTR_SIZEOF); return COM.S_OK; } final int childID = osToChildID(v.lVal); @@ -2328,7 +2329,7 @@ public class Accessible { final ToolItem item = toolBar.getItem(childID); if (item != null && (item.getStyle() & SWT.DROP_DOWN) != 0) { long /*int*/[] addr = new long /*int*/[1]; - COM.MoveMemory(addr, ppdispChild, OS.PTR_SIZEOF); + OS.MoveMemory(addr, ppdispChild, C.PTR_SIZEOF); boolean found = false; for (int i = 0; i < children.size(); i++) { Accessible accChild = children.get(i); @@ -2384,7 +2385,7 @@ public class Accessible { if (accessible != null) { if (DEBUG) print(this + ".IAccessible::get_accChild(" + v.lVal + ") returning " + accessible.getAddress() + hresult(COM.S_OK)); accessible.AddRef(); - COM.MoveMemory(ppdispChild, new long /*int*/[] { accessible.getAddress() }, OS.PTR_SIZEOF); + OS.MoveMemory(ppdispChild, new long /*int*/[] { accessible.getAddress() }, C.PTR_SIZEOF); return COM.S_OK; } if (DEBUG) print(this + ".IAccessible::get_accChild(" + v.lVal + ") returning from super" + hresult(code)); @@ -2399,7 +2400,7 @@ public class Accessible { int code = iaccessible.get_accChildCount(pcountChildren); if (code == COM.S_OK) { int[] pChildCount = new int[1]; - COM.MoveMemory(pChildCount, pcountChildren, 4); + OS.MoveMemory(pChildCount, pcountChildren, 4); osChildCount = pChildCount[0]; } if (accessibleControlListenersSize() == 0) { @@ -2416,7 +2417,7 @@ public class Accessible { listener.getChildCount(event); } if (DEBUG) print(this + ".IAccessible::get_accChildCount() returning " + event.detail + hresult(COM.S_OK)); - COM.MoveMemory(pcountChildren, new int[] { event.detail }, 4); + OS.MoveMemory(pcountChildren, new int[] { event.detail }, 4); return COM.S_OK; } @@ -2434,11 +2435,11 @@ public class Accessible { if (accessibleControlListenersSize() == 0) return code; if (code == COM.S_OK) { long /*int*/[] pDefaultAction = new long /*int*/[1]; - COM.MoveMemory(pDefaultAction, pszDefaultAction, OS.PTR_SIZEOF); + OS.MoveMemory(pDefaultAction, pszDefaultAction, C.PTR_SIZEOF); int size = COM.SysStringByteLen(pDefaultAction[0]); if (size > 0) { char[] buffer = new char[(size + 1) /2]; - COM.MoveMemory(buffer, pDefaultAction[0], size); + OS.MoveMemory(buffer, pDefaultAction[0], size); osDefaultAction = new String(buffer); } } @@ -2487,11 +2488,11 @@ public class Accessible { } if (code == COM.S_OK) { long /*int*/[] pDescription = new long /*int*/[1]; - COM.MoveMemory(pDescription, pszDescription, OS.PTR_SIZEOF); + OS.MoveMemory(pDescription, pszDescription, C.PTR_SIZEOF); int size = COM.SysStringByteLen(pDescription[0]); if (size > 0) { char[] buffer = new char[(size + 1) /2]; - COM.MoveMemory(buffer, pDescription[0], size); + OS.MoveMemory(buffer, pDescription[0], size); osDescription = new String(buffer); } } @@ -2604,11 +2605,11 @@ public class Accessible { if (accessibleListenersSize() == 0) return code; if (code == COM.S_OK) { long /*int*/[] pHelp = new long /*int*/[1]; - COM.MoveMemory(pHelp, pszHelp, OS.PTR_SIZEOF); + OS.MoveMemory(pHelp, pszHelp, C.PTR_SIZEOF); int size = COM.SysStringByteLen(pHelp[0]); if (size > 0) { char[] buffer = new char[(size + 1) /2]; - COM.MoveMemory(buffer, pHelp[0], size); + OS.MoveMemory(buffer, pHelp[0], size); osHelp = new String(buffer); } } @@ -2656,11 +2657,11 @@ public class Accessible { if (accessibleListenersSize() == 0 && !(control instanceof TabFolder)) return code; if (code == COM.S_OK) { long /*int*/[] pKeyboardShortcut = new long /*int*/[1]; - COM.MoveMemory(pKeyboardShortcut, pszKeyboardShortcut, OS.PTR_SIZEOF); + OS.MoveMemory(pKeyboardShortcut, pszKeyboardShortcut, C.PTR_SIZEOF); int size = COM.SysStringByteLen(pKeyboardShortcut[0]); if (size > 0) { char[] buffer = new char[(size + 1) /2]; - COM.MoveMemory(buffer, pKeyboardShortcut[0], size); + OS.MoveMemory(buffer, pKeyboardShortcut[0], size); osKeyboardShortcut = new String(buffer); } } @@ -2695,11 +2696,11 @@ public class Accessible { code = iaccessible.get_accName(varChild, pszName); if (code == COM.S_OK) { long /*int*/[] pName = new long /*int*/[1]; - COM.MoveMemory(pName, pszName, OS.PTR_SIZEOF); + OS.MoveMemory(pName, pszName, C.PTR_SIZEOF); int size = COM.SysStringByteLen(pName[0]); if (size > 0) { char[] buffer = new char[(size + 1) /2]; - COM.MoveMemory(buffer, pName[0], size); + OS.MoveMemory(buffer, pName[0], size); osName = new String(buffer); } } @@ -2747,7 +2748,7 @@ public class Accessible { if (parent != null) { /* For lightweight accessibles, return the accessible's parent. */ parent.AddRef(); - COM.MoveMemory(ppdispParent, new long /*int*/[] { parent.getAddress() }, OS.PTR_SIZEOF); + OS.MoveMemory(ppdispParent, new long /*int*/[] { parent.getAddress() }, C.PTR_SIZEOF); code = COM.S_OK; } if (DEBUG) print(this + ".IAccessible::get_accParent() returning" + (parent != null ? " " + parent.getAddress() : " from super") + hresult(code)); @@ -2918,11 +2919,11 @@ public class Accessible { code = iaccessible.get_accValue(varChild, pszValue); if (code == COM.S_OK) { long /*int*/[] pValue = new long /*int*/[1]; - COM.MoveMemory(pValue, pszValue, OS.PTR_SIZEOF); + OS.MoveMemory(pValue, pszValue, C.PTR_SIZEOF); int size = COM.SysStringByteLen(pValue[0]); if (size > 0) { char[] buffer = new char[(size + 1) /2]; - COM.MoveMemory(buffer, pValue[0], size); + OS.MoveMemory(buffer, pValue[0], size); osValue = new String(buffer); } } @@ -3024,7 +3025,7 @@ public class Accessible { int[] celtFetched = new int[1]; code = ienumvariant.Next(celt, rgvar, celtFetched); ienumvariant.Release(); - COM.MoveMemory(pceltFetched, celtFetched, 4); + OS.MoveMemory(pceltFetched, celtFetched, 4); return code; } @@ -3069,11 +3070,11 @@ public class Accessible { } } if (pceltFetched != 0) - COM.MoveMemory(pceltFetched, new int[] {nextItems.length}, 4); + OS.MoveMemory(pceltFetched, new int[] {nextItems.length}, 4); if (nextItems.length == celt) return COM.S_OK; } else { if (pceltFetched != 0) - COM.MoveMemory(pceltFetched, new int[] {0}, 4); + OS.MoveMemory(pceltFetched, new int[] {0}, 4); } return COM.S_FALSE; } @@ -3140,12 +3141,12 @@ public class Accessible { long /*int*/ [] pEnum = new long /*int*/ [1]; code = ienumvariant.Clone(pEnum); ienumvariant.Release(); - COM.MoveMemory(ppEnum, pEnum, OS.PTR_SIZEOF); + OS.MoveMemory(ppEnum, pEnum, C.PTR_SIZEOF); return code; } if (ppEnum == 0) return COM.E_INVALIDARG; - COM.MoveMemory(ppEnum, new long /*int*/[] { objIEnumVARIANT.getAddress() }, OS.PTR_SIZEOF); + OS.MoveMemory(ppEnum, new long /*int*/[] { objIEnumVARIANT.getAddress() }, C.PTR_SIZEOF); AddRef(); return COM.S_OK; } @@ -3154,7 +3155,7 @@ public class Accessible { int get_nRelations(long /*int*/ pNRelations) { int count = getRelationCount(); if (DEBUG) print(this + ".IAccessible2::get_nRelations returning " + count + hresult(COM.S_OK)); - COM.MoveMemory(pNRelations, new int [] { count }, 4); + OS.MoveMemory(pNRelations, new int [] { count }, 4); return COM.S_OK; } @@ -3167,7 +3168,7 @@ public class Accessible { if (i == relationIndex) { if (DEBUG) print(this + ".IAccessible2::get_relation(" + relationIndex + ") returning " + relation.getAddress() + hresult(COM.S_OK)); relation.AddRef(); - COM.MoveMemory(ppRelation, new long /*int*/[] { relation.getAddress() }, OS.PTR_SIZEOF); + OS.MoveMemory(ppRelation, new long /*int*/[] { relation.getAddress() }, C.PTR_SIZEOF); return COM.S_OK; } } @@ -3183,12 +3184,12 @@ public class Accessible { Relation relation = relations[type]; if (relation != null) { relation.AddRef(); - COM.MoveMemory(ppRelations + count * OS.PTR_SIZEOF, new long /*int*/[] { relation.getAddress() }, OS.PTR_SIZEOF); + OS.MoveMemory(ppRelations + count * C.PTR_SIZEOF, new long /*int*/[] { relation.getAddress() }, C.PTR_SIZEOF); count++; } } if (DEBUG) print(this + ".IAccessible2::get_relations(" + maxRelations + ") returning " + count + hresult(COM.S_OK)); - COM.MoveMemory(pNRelations, new int [] { count }, 4); + OS.MoveMemory(pNRelations, new int [] { count }, 4); return COM.S_OK; } @@ -3197,7 +3198,7 @@ public class Accessible { int role = getRole(); if (role == 0) role = getDefaultRole(); if (DEBUG) print(this + ".IAccessible2::get_role() returning " + getRoleString(role) + hresult(COM.S_OK)); - COM.MoveMemory(pRole, new int [] { role }, 4); + OS.MoveMemory(pRole, new int [] { role }, 4); return COM.S_OK; } @@ -3242,9 +3243,9 @@ public class Accessible { } } } - COM.MoveMemory(pGroupLevel, new int [] { groupLevel }, 4); - COM.MoveMemory(pSimilarItemsInGroup, new int [] { similarItemsInGroup }, 4); - COM.MoveMemory(pPositionInGroup, new int [] { positionInGroup }, 4); + OS.MoveMemory(pGroupLevel, new int [] { groupLevel }, 4); + OS.MoveMemory(pSimilarItemsInGroup, new int [] { similarItemsInGroup }, 4); + OS.MoveMemory(pPositionInGroup, new int [] { positionInGroup }, 4); if (DEBUG) print(this + ".IAccessible2::get_groupPosition() returning level=" + groupLevel + ", count=" + similarItemsInGroup + ", index=" + positionInGroup + hresult(groupLevel == 0 && similarItemsInGroup == 0 && positionInGroup == 0 ? COM.S_FALSE : COM.S_OK)); if (groupLevel == 0 && similarItemsInGroup == 0 && positionInGroup == 0) return COM.S_FALSE; return COM.S_OK; @@ -3275,7 +3276,7 @@ public class Accessible { ia2States |= COM.IA2_STATE_EDITABLE; } if (DEBUG) print(this + ".IAccessible2::get_states returning" + getIA2StatesString(ia2States) + hresult(COM.S_OK)); - COM.MoveMemory(pStates, new int [] { ia2States }, 4); + OS.MoveMemory(pStates, new int [] { ia2States }, 4); return COM.S_OK; } @@ -3296,7 +3297,7 @@ public class Accessible { /* IAccessible2::get_nExtendedStates([out] pNExtendedStates) */ int get_nExtendedStates(long /*int*/ pNExtendedStates) { /* This feature is not supported. */ - COM.MoveMemory(pNExtendedStates, new int [] { 0 }, 4); + OS.MoveMemory(pNExtendedStates, new int [] { 0 }, 4); return COM.S_OK; } @@ -3304,7 +3305,7 @@ public class Accessible { int get_extendedStates(int maxExtendedStates, long /*int*/ ppbstrExtendedStates, long /*int*/ pNExtendedStates) { /* This feature is not supported. */ setString(ppbstrExtendedStates, null); - COM.MoveMemory(pNExtendedStates, new int [] { 0 }, 4); + OS.MoveMemory(pNExtendedStates, new int [] { 0 }, 4); return COM.S_FALSE; } @@ -3312,7 +3313,7 @@ public class Accessible { int get_localizedExtendedStates(int maxLocalizedExtendedStates, long /*int*/ ppbstrLocalizedExtendedStates, long /*int*/ pNLocalizedExtendedStates) { /* This feature is not supported. */ setString(ppbstrLocalizedExtendedStates, null); - COM.MoveMemory(pNLocalizedExtendedStates, new int [] { 0 }, 4); + OS.MoveMemory(pNLocalizedExtendedStates, new int [] { 0 }, 4); return COM.S_FALSE; } @@ -3320,14 +3321,14 @@ public class Accessible { int get_uniqueID(long /*int*/ pUniqueID) { if (uniqueID == -1) uniqueID = UniqueID--; if (DEBUG) print(this + ".IAccessible2::get_uniqueID returning " + uniqueID + hresult(COM.S_OK)); - COM.MoveMemory(pUniqueID, new long /*int*/ [] { uniqueID }, 4); + OS.MoveMemory(pUniqueID, new long /*int*/ [] { uniqueID }, 4); return COM.S_OK; } /* IAccessible2::get_windowHandle([out] pWindowHandle) */ int get_windowHandle(long /*int*/ pWindowHandle) { if (DEBUG) print(this + ".IAccessible2::get_windowHandle returning " + control.handle + hresult(COM.S_OK)); - COM.MoveMemory(pWindowHandle, new long /*int*/ [] { control.handle }, OS.PTR_SIZEOF); + OS.MoveMemory(pWindowHandle, new long /*int*/ [] { control.handle }, C.PTR_SIZEOF); return COM.S_OK; } @@ -3387,7 +3388,7 @@ public class Accessible { } if (DEBUG) print(this + ".IAccessible2::get_indexInParent returning " + indexInParent + hresult(indexInParent == -1 ? COM.S_FALSE : COM.S_OK)); - COM.MoveMemory(pIndexInParent, new int [] { indexInParent }, 4); + OS.MoveMemory(pIndexInParent, new int [] { indexInParent }, 4); return indexInParent == -1 ? COM.S_FALSE : COM.S_OK; } @@ -3398,15 +3399,15 @@ public class Accessible { char[] data = (locale.getLanguage()+"\0").toCharArray(); long /*int*/ ptr = COM.SysAllocString(data); - COM.MoveMemory(pLocale, new long /*int*/[] {ptr}, OS.PTR_SIZEOF); + OS.MoveMemory(pLocale, new long /*int*/[] {ptr}, C.PTR_SIZEOF); data = (locale.getCountry()+"\0").toCharArray(); ptr = COM.SysAllocString(data); - COM.MoveMemory(pLocale + OS.PTR_SIZEOF, new long /*int*/[] {ptr}, OS.PTR_SIZEOF); + OS.MoveMemory(pLocale + C.PTR_SIZEOF, new long /*int*/[] {ptr}, C.PTR_SIZEOF); data = (locale.getVariant()+"\0").toCharArray(); ptr = COM.SysAllocString(data); - COM.MoveMemory(pLocale + 2 * OS.PTR_SIZEOF, new long /*int*/[] {ptr}, OS.PTR_SIZEOF); + OS.MoveMemory(pLocale + 2 * C.PTR_SIZEOF, new long /*int*/[] {ptr}, C.PTR_SIZEOF); if (DEBUG) print(this + ".IAccessible2::get_locale() returning" + hresult(COM.S_OK)); return COM.S_OK; @@ -3456,7 +3457,7 @@ public class Accessible { listener.getActionCount(event); } if (DEBUG) print(this + ".IAccessibleAction::get_nActions() returning " + event.count + hresult(COM.S_OK)); - COM.MoveMemory(pNActions, new int [] { event.count }, 4); + OS.MoveMemory(pNActions, new int [] { event.count }, 4); return COM.S_OK; } @@ -3505,13 +3506,13 @@ public class Accessible { if (j == -1) j = length; String keyBinding = keyBindings.substring(i, j); if (keyBinding.length() > 0) { - setString(ppbstrKeyBindings + count * OS.PTR_SIZEOF, keyBinding); + setString(ppbstrKeyBindings + count * C.PTR_SIZEOF, keyBinding); count++; } i = j + 1; } if (DEBUG) print(this + ".IAccessibleAction::get_keyBinding(index=" + actionIndex + " max=" + nMaxBindings + ") returning count=" + count + hresult(count == 0 ? COM.S_FALSE : COM.S_OK)); - COM.MoveMemory(pNBindings, new int [] { count }, 4); + OS.MoveMemory(pNBindings, new int [] { count }, 4); if (count == 0) { setString(ppbstrKeyBindings, null); return COM.S_FALSE; @@ -3869,7 +3870,7 @@ public class Accessible { AccessibleHyperlinkListener listener = accessibleHyperlinkListeners.get(i); listener.getStartIndex(event); } - COM.MoveMemory(pIndex, new int [] { event.index }, 4); + OS.MoveMemory(pIndex, new int [] { event.index }, 4); return COM.S_OK; } @@ -3881,7 +3882,7 @@ public class Accessible { AccessibleHyperlinkListener listener = accessibleHyperlinkListeners.get(i); listener.getEndIndex(event); } - COM.MoveMemory(pIndex, new int [] { event.index }, 4); + OS.MoveMemory(pIndex, new int [] { event.index }, 4); return COM.S_OK; } @@ -3899,7 +3900,7 @@ public class Accessible { AccessibleTextExtendedListener listener = accessibleTextExtendedListeners.get(i); listener.getHyperlinkCount(event); } - COM.MoveMemory(pHyperlinkCount, new int [] { event.count }, 4); + OS.MoveMemory(pHyperlinkCount, new int [] { event.count }, 4); return COM.S_OK; } @@ -3918,7 +3919,7 @@ public class Accessible { return COM.E_INVALIDARG; } accessible.AddRef(); - COM.MoveMemory(ppHyperlink, new long /*int*/[] { accessible.getAddress() }, OS.PTR_SIZEOF); + OS.MoveMemory(ppHyperlink, new long /*int*/[] { accessible.getAddress() }, C.PTR_SIZEOF); return COM.S_OK; } @@ -3932,7 +3933,7 @@ public class Accessible { AccessibleTextExtendedListener listener = accessibleTextExtendedListeners.get(i); listener.getHyperlinkIndex(event); } - COM.MoveMemory(pHyperlinkIndex, new int [] { event.index }, 4); + OS.MoveMemory(pHyperlinkIndex, new int [] { event.index }, 4); if (event.index == -1) return COM.S_FALSE; return COM.S_OK; } @@ -3995,7 +3996,7 @@ public class Accessible { if (DEBUG) print(this + ".IAccessibleTable2::get_cellAt(row=" + row + ", column=" + column + ") returning " + accessible); if (accessible == null) return COM.E_INVALIDARG; accessible.AddRef(); - COM.MoveMemory(ppCell, new long /*int*/[] { accessible.getAddress() }, OS.PTR_SIZEOF); + OS.MoveMemory(ppCell, new long /*int*/[] { accessible.getAddress() }, C.PTR_SIZEOF); return COM.S_OK; } @@ -4009,11 +4010,11 @@ public class Accessible { Accessible accessible = event.accessible; if (DEBUG) print(this + ".IAccessibleTable2::get_caption() returning " + accessible); if (accessible == null) { - COM.MoveMemory(ppAccessible, new long /*int*/[] { 0 }, OS.PTR_SIZEOF); + OS.MoveMemory(ppAccessible, new long /*int*/[] { 0 }, C.PTR_SIZEOF); return COM.S_FALSE; } accessible.AddRef(); - COM.MoveMemory(ppAccessible, new long /*int*/[] { accessible.getAddress() }, OS.PTR_SIZEOF); + OS.MoveMemory(ppAccessible, new long /*int*/[] { accessible.getAddress() }, C.PTR_SIZEOF); return COM.S_OK; } @@ -4039,7 +4040,7 @@ public class Accessible { listener.getColumnCount(event); } if (DEBUG) print(this + ".IAccessibleTable2::get_nColumns() returning " + event.count); - COM.MoveMemory(pColumnCount, new int [] { event.count }, 4); + OS.MoveMemory(pColumnCount, new int [] { event.count }, 4); return COM.S_OK; } @@ -4051,7 +4052,7 @@ public class Accessible { listener.getRowCount(event); } if (DEBUG) print(this + ".IAccessibleTable2::get_nRows() returning " + event.count); - COM.MoveMemory(pRowCount, new int [] { event.count }, 4); + OS.MoveMemory(pRowCount, new int [] { event.count }, 4); return COM.S_OK; } @@ -4063,7 +4064,7 @@ public class Accessible { listener.getSelectedCellCount(event); } if (DEBUG) print(this + ".IAccessibleTable2::get_nSelectedCells() returning " + event.count); - COM.MoveMemory(pCellCount, new int [] { event.count }, 4); + OS.MoveMemory(pCellCount, new int [] { event.count }, 4); return COM.S_OK; } @@ -4075,7 +4076,7 @@ public class Accessible { listener.getSelectedColumnCount(event); } if (DEBUG) print(this + ".IAccessibleTable2::get_nSelectedColumns() returning " + event.count); - COM.MoveMemory(pColumnCount, new int [] { event.count }, 4); + OS.MoveMemory(pColumnCount, new int [] { event.count }, 4); return COM.S_OK; } @@ -4087,7 +4088,7 @@ public class Accessible { listener.getSelectedRowCount(event); } if (DEBUG) print(this + ".IAccessibleTable2::get_nSelectedRows() returning " + event.count); - COM.MoveMemory(pRowCount, new int [] { event.count }, 4); + OS.MoveMemory(pRowCount, new int [] { event.count }, 4); return COM.S_OK; } @@ -4114,23 +4115,23 @@ public class Accessible { } if (DEBUG) print(this + ".IAccessibleTable2::get_selectedCells() returning " + (event.accessibles == null ? "null" : "accessibles[" + event.accessibles.length + "]")); if (event.accessibles == null || event.accessibles.length == 0) { - COM.MoveMemory(ppCells, new long /*int*/[] { 0 }, OS.PTR_SIZEOF); - COM.MoveMemory(pNSelectedCells, new int [] { 0 }, 4); + OS.MoveMemory(ppCells, new long /*int*/[] { 0 }, C.PTR_SIZEOF); + OS.MoveMemory(pNSelectedCells, new int [] { 0 }, 4); return COM.S_FALSE; } int length = event.accessibles.length; - long /*int*/ pv = COM.CoTaskMemAlloc(length * OS.PTR_SIZEOF); + long /*int*/ pv = OS.CoTaskMemAlloc(length * C.PTR_SIZEOF); int count = 0; for (int i = 0; i < length; i++) { Accessible accessible = event.accessibles[i]; if (accessible != null) { accessible.AddRef(); - COM.MoveMemory(pv + i * OS.PTR_SIZEOF, new long /*int*/[] { accessible.getAddress() }, OS.PTR_SIZEOF); + OS.MoveMemory(pv + i * C.PTR_SIZEOF, new long /*int*/[] { accessible.getAddress() }, C.PTR_SIZEOF); count++; } } - COM.MoveMemory(ppCells, new long /*int*/ [] { pv }, OS.PTR_SIZEOF); - COM.MoveMemory(pNSelectedCells, new int [] { count }, 4); + OS.MoveMemory(ppCells, new long /*int*/ [] { pv }, C.PTR_SIZEOF); + OS.MoveMemory(pNSelectedCells, new int [] { count }, 4); return COM.S_OK; } @@ -4144,14 +4145,14 @@ public class Accessible { int count = event.selected == null ? 0 : event.selected.length; if (DEBUG) print(this + ".IAccessibleTable2::get_selectedColumns() returning " + (count == 0 ? "null" : "selected[" + count + "]")); if (count == 0) { - COM.MoveMemory(ppSelectedColumns, new long /*int*/[] { 0 }, OS.PTR_SIZEOF); - COM.MoveMemory(pNColumns, new int [] { 0 }, 4); + OS.MoveMemory(ppSelectedColumns, new long /*int*/[] { 0 }, C.PTR_SIZEOF); + OS.MoveMemory(pNColumns, new int [] { 0 }, 4); return COM.S_FALSE; } - long /*int*/ pv = COM.CoTaskMemAlloc(count * 4); - COM.MoveMemory(pv, event.selected, count * 4); - COM.MoveMemory(ppSelectedColumns, new long /*int*/ [] { pv }, OS.PTR_SIZEOF); - COM.MoveMemory(pNColumns, new int [] { count }, 4); + long /*int*/ pv = OS.CoTaskMemAlloc(count * 4); + OS.MoveMemory(pv, event.selected, count * 4); + OS.MoveMemory(ppSelectedColumns, new long /*int*/ [] { pv }, C.PTR_SIZEOF); + OS.MoveMemory(pNColumns, new int [] { count }, 4); return COM.S_OK; } @@ -4165,14 +4166,14 @@ public class Accessible { int count = event.selected == null ? 0 : event.selected.length; if (DEBUG) print(this + ".IAccessibleTable2::get_selectedRows() returning " + (count == 0 ? "null" : "selected[" + count + "]")); if (count == 0) { - COM.MoveMemory(ppSelectedRows, new long /*int*/[] { 0 }, OS.PTR_SIZEOF); - COM.MoveMemory(pNRows, new int [] { 0 }, 4); + OS.MoveMemory(ppSelectedRows, new long /*int*/[] { 0 }, C.PTR_SIZEOF); + OS.MoveMemory(pNRows, new int [] { 0 }, 4); return COM.S_FALSE; } - long /*int*/ pv = COM.CoTaskMemAlloc(count * 4); - COM.MoveMemory(pv, event.selected, count * 4); - COM.MoveMemory(ppSelectedRows, new long /*int*/ [] { pv }, OS.PTR_SIZEOF); - COM.MoveMemory(pNRows, new int [] { count }, 4); + long /*int*/ pv = OS.CoTaskMemAlloc(count * 4); + OS.MoveMemory(pv, event.selected, count * 4); + OS.MoveMemory(ppSelectedRows, new long /*int*/ [] { pv }, C.PTR_SIZEOF); + OS.MoveMemory(pNRows, new int [] { count }, 4); return COM.S_OK; } @@ -4186,11 +4187,11 @@ public class Accessible { Accessible accessible = event.accessible; if (DEBUG) print(this + ".IAccessibleTable2::get_summary() returning " + accessible); if (accessible == null) { - COM.MoveMemory(ppAccessible, new long /*int*/[] { 0 }, OS.PTR_SIZEOF); + OS.MoveMemory(ppAccessible, new long /*int*/[] { 0 }, C.PTR_SIZEOF); return COM.S_FALSE; } accessible.AddRef(); - COM.MoveMemory(ppAccessible, new long /*int*/[] { accessible.getAddress() }, OS.PTR_SIZEOF); + OS.MoveMemory(ppAccessible, new long /*int*/[] { accessible.getAddress() }, C.PTR_SIZEOF); return COM.S_OK; } @@ -4203,7 +4204,7 @@ public class Accessible { listener.isColumnSelected(event); } if (DEBUG) print(this + ".IAccessibleTable2::get_isColumnSelected() returning " + event.isSelected); - COM.MoveMemory(pIsSelected, new int [] {event.isSelected ? 1 : 0}, 4); + OS.MoveMemory(pIsSelected, new int [] {event.isSelected ? 1 : 0}, 4); return COM.S_OK; } @@ -4216,7 +4217,7 @@ public class Accessible { listener.isRowSelected(event); } if (DEBUG) print(this + ".IAccessibleTable2::get_isRowSelected() returning " + event.isSelected); - COM.MoveMemory(pIsSelected, new int [] {event.isSelected ? 1 : 0}, 4); + OS.MoveMemory(pIsSelected, new int [] {event.isSelected ? 1 : 0}, 4); return COM.S_OK; } @@ -4276,10 +4277,10 @@ public class Accessible { int get_modelChange(long /*int*/ pModelChange) { if (DEBUG) print(this + ".IAccessibleTable2::get_modelChange() returning " + (tableChange == null ? "null" : "tableChange=" + tableChange[0] + ", " + tableChange[1] + ", " + tableChange[2] + ", " + tableChange[3])); if (tableChange == null) { - COM.MoveMemory(pModelChange, new long /*int*/ [] { 0 }, OS.PTR_SIZEOF); + OS.MoveMemory(pModelChange, new long /*int*/ [] { 0 }, C.PTR_SIZEOF); return COM.S_FALSE; } - COM.MoveMemory(pModelChange, tableChange, tableChange.length * 4); + OS.MoveMemory(pModelChange, tableChange, tableChange.length * 4); return COM.S_OK; } @@ -4291,7 +4292,7 @@ public class Accessible { listener.getColumnSpan(event); } if (DEBUG) print(this + ".IAccessibleTableCell::get_columnExtent() returning " + event.count); - COM.MoveMemory(pNColumnsSpanned, new int [] { event.count }, 4); + OS.MoveMemory(pNColumnsSpanned, new int [] { event.count }, 4); return COM.S_OK; } @@ -4304,23 +4305,23 @@ public class Accessible { } if (DEBUG) print(this + ".IAccessibleTableCell::get_columnHeaderCells() returning " + (event.accessibles == null ? "null" : "accessibles[" + event.accessibles.length + "]")); if (event.accessibles == null || event.accessibles.length == 0) { - COM.MoveMemory(ppCellAccessibles, new long /*int*/[] { 0 }, OS.PTR_SIZEOF); - COM.MoveMemory(pNColumnHeaderCells, new int [] { 0 }, 4); + OS.MoveMemory(ppCellAccessibles, new long /*int*/[] { 0 }, C.PTR_SIZEOF); + OS.MoveMemory(pNColumnHeaderCells, new int [] { 0 }, 4); return COM.S_FALSE; } int length = event.accessibles.length; - long /*int*/ pv = COM.CoTaskMemAlloc(length * OS.PTR_SIZEOF); + long /*int*/ pv = OS.CoTaskMemAlloc(length * C.PTR_SIZEOF); int count = 0; for (int i = 0; i < length; i++) { Accessible accessible = event.accessibles[i]; if (accessible != null) { accessible.AddRef(); - COM.MoveMemory(pv + i * OS.PTR_SIZEOF, new long /*int*/[] { accessible.getAddress() }, OS.PTR_SIZEOF); + OS.MoveMemory(pv + i * C.PTR_SIZEOF, new long /*int*/[] { accessible.getAddress() }, C.PTR_SIZEOF); count++; } } - COM.MoveMemory(ppCellAccessibles, new long /*int*/ [] { pv }, OS.PTR_SIZEOF); - COM.MoveMemory(pNColumnHeaderCells, new int [] { count }, 4); + OS.MoveMemory(ppCellAccessibles, new long /*int*/ [] { pv }, C.PTR_SIZEOF); + OS.MoveMemory(pNColumnHeaderCells, new int [] { count }, 4); return COM.S_OK; } @@ -4332,7 +4333,7 @@ public class Accessible { listener.getColumnIndex(event); } if (DEBUG) print(this + ".IAccessibleTableCell::get_columnIndex() returning " + event.index); - COM.MoveMemory(pColumnIndex, new int [] { event.index }, 4); + OS.MoveMemory(pColumnIndex, new int [] { event.index }, 4); return COM.S_OK; } @@ -4344,7 +4345,7 @@ public class Accessible { listener.getRowSpan(event); } if (DEBUG) print(this + ".IAccessibleTableCell::get_rowExtent() returning " + event.count); - COM.MoveMemory(pNRowsSpanned, new int [] { event.count }, 4); + OS.MoveMemory(pNRowsSpanned, new int [] { event.count }, 4); return COM.S_OK; } @@ -4357,23 +4358,23 @@ public class Accessible { } if (DEBUG) print(this + ".IAccessibleTableCell::get_rowHeaderCells() returning " + (event.accessibles == null ? "null" : "accessibles[" + event.accessibles.length + "]")); if (event.accessibles == null || event.accessibles.length == 0) { - COM.MoveMemory(ppCellAccessibles, new long /*int*/[] { 0 }, OS.PTR_SIZEOF); - COM.MoveMemory(pNRowHeaderCells, new int [] { 0 }, 4); + OS.MoveMemory(ppCellAccessibles, new long /*int*/[] { 0 }, C.PTR_SIZEOF); + OS.MoveMemory(pNRowHeaderCells, new int [] { 0 }, 4); return COM.S_FALSE; } int length = event.accessibles.length; - long /*int*/ pv = COM.CoTaskMemAlloc(length * OS.PTR_SIZEOF); + long /*int*/ pv = OS.CoTaskMemAlloc(length * C.PTR_SIZEOF); int count = 0; for (int i = 0; i < length; i++) { Accessible accessible = event.accessibles[i]; if (accessible != null) { accessible.AddRef(); - COM.MoveMemory(pv + i * OS.PTR_SIZEOF, new long /*int*/[] { accessible.getAddress() }, OS.PTR_SIZEOF); + OS.MoveMemory(pv + i * C.PTR_SIZEOF, new long /*int*/[] { accessible.getAddress() }, C.PTR_SIZEOF); count++; } } - COM.MoveMemory(ppCellAccessibles, new long /*int*/ [] { pv }, OS.PTR_SIZEOF); - COM.MoveMemory(pNRowHeaderCells, new int [] { count }, 4); + OS.MoveMemory(ppCellAccessibles, new long /*int*/ [] { pv }, C.PTR_SIZEOF); + OS.MoveMemory(pNRowHeaderCells, new int [] { count }, 4); return COM.S_OK; } @@ -4385,7 +4386,7 @@ public class Accessible { listener.getRowIndex(event); } if (DEBUG) print(this + ".IAccessibleTableCell::get_rowIndex() returning " + event.index); - COM.MoveMemory(pRowIndex, new int [] { event.index }, 4); + OS.MoveMemory(pRowIndex, new int [] { event.index }, 4); return COM.S_OK; } @@ -4397,7 +4398,7 @@ public class Accessible { listener.isSelected(event); } if (DEBUG) print(this + ".IAccessibleTableCell::get_isSelected() returning " + event.isSelected); - COM.MoveMemory(pIsSelected, new int [] {event.isSelected ? 1 : 0}, 4); + OS.MoveMemory(pIsSelected, new int [] {event.isSelected ? 1 : 0}, 4); return COM.S_OK; } @@ -4429,11 +4430,11 @@ public class Accessible { if (DEBUG) print(this + ".IAccessibleTableCell::get_table() returning " + accessible); if (accessible == null) { // TODO: This is not supposed to return S_FALSE. We need to lookup the table role parent and return that. - COM.MoveMemory(ppTable, new long /*int*/[] { 0 }, OS.PTR_SIZEOF); + OS.MoveMemory(ppTable, new long /*int*/[] { 0 }, C.PTR_SIZEOF); return COM.S_FALSE; } accessible.AddRef(); - COM.MoveMemory(ppTable, new long /*int*/[] { accessible.getAddress() }, OS.PTR_SIZEOF); + OS.MoveMemory(ppTable, new long /*int*/[] { accessible.getAddress() }, C.PTR_SIZEOF); return COM.S_OK; } @@ -4505,8 +4506,8 @@ public class Accessible { } } if (DEBUG) print(this + ".IAccessibleText::get_attributes(" + offset + ") returning start = " + event.start + ", end = " + event.end + ", attributes = " + textAttributes); - COM.MoveMemory(pStartOffset, new int [] { event.start }, 4); - COM.MoveMemory(pEndOffset, new int [] { event.end }, 4); + OS.MoveMemory(pStartOffset, new int [] { event.start }, 4); + OS.MoveMemory(pEndOffset, new int [] { event.end }, 4); setString(pbstrTextAttributes, textAttributes); if (textAttributes.length() == 0) return COM.S_FALSE; return COM.S_OK; @@ -4516,7 +4517,7 @@ public class Accessible { int get_caretOffset(long /*int*/ pOffset) { int offset = getCaretOffset(); if (DEBUG) print(this + ".IAccessibleText::get_caretOffset returning " + offset + hresult(offset == -1 ? COM.S_FALSE : COM.S_OK)); - COM.MoveMemory(pOffset, new int [] { offset }, 4); + OS.MoveMemory(pOffset, new int [] { offset }, 4); if (offset == -1) return COM.S_FALSE; return COM.S_OK; } @@ -4533,10 +4534,10 @@ public class Accessible { } /* Note: event.rectangles is not used here, because IAccessibleText::get_characterExtents is just for one character. */ if (DEBUG) print(this + ".IAccessibleText::get_characterExtents(" + offset + ") returning " + event.x + ", " + event.y + ", " + event.width + ", " + event.height); - COM.MoveMemory(pX, new int [] { event.x }, 4); - COM.MoveMemory(pY, new int [] { event.y }, 4); - COM.MoveMemory(pWidth, new int [] { event.width }, 4); - COM.MoveMemory(pHeight, new int [] { event.height }, 4); + OS.MoveMemory(pX, new int [] { event.x }, 4); + OS.MoveMemory(pY, new int [] { event.y }, 4); + OS.MoveMemory(pWidth, new int [] { event.width }, 4); + OS.MoveMemory(pHeight, new int [] { event.height }, 4); if (event.width == 0 && event.height == 0) return COM.E_INVALIDARG; return COM.S_OK; } @@ -4560,7 +4561,7 @@ public class Accessible { event.count = event.offset != -1 && event.length > 0 ? 1 : 0; } if (DEBUG) print(this + ".IAccessibleText::get_nSelections returning " + event.count); - COM.MoveMemory(pNSelections, new int [] { event.count }, 4); + OS.MoveMemory(pNSelections, new int [] { event.count }, 4); return COM.S_OK; } @@ -4579,7 +4580,7 @@ public class Accessible { * Note that the current IA2 spec says to return 0 when there's nothing to return, * but since 0 is a valid return value, the spec is going to be updated to return -1. */ - COM.MoveMemory(pOffset, new int [] { event.offset }, 4); + OS.MoveMemory(pOffset, new int [] { event.offset }, 4); if (event.offset == -1) return COM.S_FALSE; return COM.S_OK; } @@ -4606,8 +4607,8 @@ public class Accessible { event.end = event.offset + event.length; } if (DEBUG) print(this + ".IAccessibleText::get_selection(" + selectionIndex + ") returning " + event.start + ", " + event.end); - COM.MoveMemory(pStartOffset, new int [] { event.start }, 4); - COM.MoveMemory(pEndOffset, new int [] { event.end }, 4); + OS.MoveMemory(pStartOffset, new int [] { event.start }, 4); + OS.MoveMemory(pEndOffset, new int [] { event.end }, 4); /* * Note that the current IA2 spec says to return 0,0 when there's nothing to return, * but since 0 is a valid return value, the spec is going to be updated to return -1,-1. @@ -4698,8 +4699,8 @@ public class Accessible { } } if (DEBUG) print(this + ".IAccessibleText::get_textBeforeOffset(" + offset + ") returning start=" + event.start + ", end=" + event.end + " " + event.result + hresult(event.result == null ? COM.S_FALSE : COM.S_OK)); - COM.MoveMemory(pStartOffset, new int [] { event.start }, 4); - COM.MoveMemory(pEndOffset, new int [] { event.end }, 4); + OS.MoveMemory(pStartOffset, new int [] { event.start }, 4); + OS.MoveMemory(pEndOffset, new int [] { event.end }, 4); setString(pbstrText, event.result); if (event.result == null) return COM.S_FALSE; return COM.S_OK; @@ -4751,8 +4752,8 @@ public class Accessible { } } if (DEBUG) print(this + ".IAccessibleText::get_textAfterOffset(" + offset + ") returning start=" + event.start + ", end=" + event.end + " " + event.result + hresult(event.result == null ? COM.S_FALSE : COM.S_OK)); - COM.MoveMemory(pStartOffset, new int [] { event.start }, 4); - COM.MoveMemory(pEndOffset, new int [] { event.end }, 4); + OS.MoveMemory(pStartOffset, new int [] { event.start }, 4); + OS.MoveMemory(pEndOffset, new int [] { event.end }, 4); setString(pbstrText, event.result); if (event.result == null) return COM.S_FALSE; return COM.S_OK; @@ -4811,8 +4812,8 @@ public class Accessible { } } if (DEBUG) print(this + ".IAccessibleText::get_textAtOffset(" + offset + ") returning start=" + event.start + ", end=" + event.end + " " + event.result + hresult(event.result == null ? COM.S_FALSE : COM.S_OK)); - COM.MoveMemory(pStartOffset, new int [] { event.start }, 4); - COM.MoveMemory(pEndOffset, new int [] { event.end }, 4); + OS.MoveMemory(pStartOffset, new int [] { event.start }, 4); + OS.MoveMemory(pEndOffset, new int [] { event.end }, 4); setString(pbstrText, event.result); if (event.result == null) return COM.S_FALSE; return COM.S_OK; @@ -4862,7 +4863,7 @@ public class Accessible { /* IAccessibleText::get_nCharacters([out] pNCharacters) */ int get_nCharacters(long /*int*/ pNCharacters) { int count = getCharacterCount(); - COM.MoveMemory(pNCharacters, new int [] { count }, 4); + OS.MoveMemory(pNCharacters, new int [] { count }, 4); if (DEBUG) print(this + ".IAccessibleText::get_nCharacters returning " + count); return COM.S_OK; } @@ -4919,8 +4920,8 @@ public class Accessible { end = ((Integer)textInserted[2]).intValue(); } setString(pNewText, text); - COM.MoveMemory(pNewText + OS.PTR_SIZEOF, new int [] {start}, 4); - COM.MoveMemory(pNewText + OS.PTR_SIZEOF + 4, new int [] {end}, 4); + OS.MoveMemory(pNewText + C.PTR_SIZEOF, new int [] {start}, 4); + OS.MoveMemory(pNewText + C.PTR_SIZEOF + 4, new int [] {end}, 4); if (textInserted == null) return COM.S_FALSE; return COM.S_OK; } @@ -4937,8 +4938,8 @@ public class Accessible { end = ((Integer)textDeleted[2]).intValue(); } setString(pOldText, text); - COM.MoveMemory(pOldText + OS.PTR_SIZEOF, new int [] {start}, 4); - COM.MoveMemory(pOldText + OS.PTR_SIZEOF + 4, new int [] {end}, 4); + OS.MoveMemory(pOldText + C.PTR_SIZEOF, new int [] {start}, 4); + OS.MoveMemory(pOldText + C.PTR_SIZEOF + 4, new int [] {end}, 4); if (textDeleted == null) return COM.S_FALSE; return COM.S_OK; } @@ -5295,7 +5296,7 @@ public class Accessible { String getString(long /*int*/ psz) { long /*int*/ [] ptr = new long /*int*/ [1]; - OS.MoveMemory (ptr, psz, OS.PTR_SIZEOF); + OS.MoveMemory (ptr, psz, C.PTR_SIZEOF); int size = COM.SysStringByteLen(ptr [0]); if (size == 0) return ""; char [] buffer = new char [(size + 1) / 2]; @@ -5318,34 +5319,34 @@ public class Accessible { void setIntVARIANT(long /*int*/ variant, short vt, int lVal) { if (vt == COM.VT_I4 || vt == COM.VT_EMPTY) { - COM.MoveMemory(variant, new short[] { vt }, 2); - COM.MoveMemory(variant + 8, new int[] { lVal }, 4); + OS.MoveMemory(variant, new short[] { vt }, 2); + OS.MoveMemory(variant + 8, new int[] { lVal }, 4); } } void setPtrVARIANT(long /*int*/ variant, short vt, long /*int*/ lVal) { if (vt == COM.VT_DISPATCH || vt == COM.VT_UNKNOWN) { - COM.MoveMemory(variant, new short[] { vt }, 2); - COM.MoveMemory(variant + 8, new long /*int*/ [] { lVal }, OS.PTR_SIZEOF); + OS.MoveMemory(variant, new short[] { vt }, 2); + OS.MoveMemory(variant + 8, new long /*int*/ [] { lVal }, C.PTR_SIZEOF); } } void setNumberVARIANT(long /*int*/ variant, Number number) { if (number == null) { - COM.MoveMemory(variant, new short[] { COM.VT_EMPTY }, 2); - COM.MoveMemory(variant + 8, new int[] { 0 }, 4); + OS.MoveMemory(variant, new short[] { COM.VT_EMPTY }, 2); + OS.MoveMemory(variant + 8, new int[] { 0 }, 4); } else if (number instanceof Double) { - COM.MoveMemory(variant, new short[] { COM.VT_R8 }, 2); - COM.MoveMemory(variant + 8, new double[] { number.doubleValue() }, 8); + OS.MoveMemory(variant, new short[] { COM.VT_R8 }, 2); + OS.MoveMemory(variant + 8, new double[] { number.doubleValue() }, 8); } else if (number instanceof Float) { - COM.MoveMemory(variant, new short[] { COM.VT_R4 }, 2); - COM.MoveMemory(variant + 8, new float[] { number.floatValue() }, 4); + OS.MoveMemory(variant, new short[] { COM.VT_R4 }, 2); + OS.MoveMemory(variant + 8, new float[] { number.floatValue() }, 4); } else if (number instanceof Long) { - COM.MoveMemory(variant, new short[] { COM.VT_I8 }, 2); - COM.MoveMemory(variant + 8, new long[] { number.longValue() }, 8); + OS.MoveMemory(variant, new short[] { COM.VT_I8 }, 2); + OS.MoveMemory(variant + 8, new long[] { number.longValue() }, 8); } else { - COM.MoveMemory(variant, new short[] { COM.VT_I4 }, 2); - COM.MoveMemory(variant + 8, new int[] { number.intValue() }, 4); + OS.MoveMemory(variant, new short[] { COM.VT_I4 }, 2); + OS.MoveMemory(variant + 8, new int[] { number.intValue() }, 4); } } @@ -5355,7 +5356,7 @@ public class Accessible { char[] data = (string + "\0").toCharArray(); ptr = COM.SysAllocString(data); } - COM.MoveMemory(psz, new long /*int*/ [] { ptr }, OS.PTR_SIZEOF); + OS.MoveMemory(psz, new long /*int*/ [] { ptr }, C.PTR_SIZEOF); } void setStringVARIANT(long /*int*/ variant, String string) { @@ -5364,8 +5365,8 @@ public class Accessible { char[] data = (string + "\0").toCharArray(); ptr = COM.SysAllocString(data); } - COM.MoveMemory(variant, new short[] { ptr == 0 ? COM.VT_EMPTY : COM.VT_BSTR }, 2); - COM.MoveMemory(variant + 8, new long /*int*/ [] { ptr }, OS.PTR_SIZEOF); + OS.MoveMemory(variant, new short[] { ptr == 0 ? COM.VT_EMPTY : COM.VT_BSTR }, 2); + OS.MoveMemory(variant + 8, new long /*int*/ [] { ptr }, C.PTR_SIZEOF); } /* checkWidget was copied from Widget, and rewritten to work in this package */ @@ -5539,7 +5540,7 @@ public class Accessible { case COM.E_NOTIMPL: return " E_NOTIMPL"; case COM.E_NOTSUPPORTED: return " E_NOTSUPPORTED"; case COM.E_OUTOFMEMORY: return " E_OUTOFMEMORY"; - case COM.E_POINTER: return " E_POINTER"; + case OS.E_POINTER: return " E_POINTER"; case COM.DISP_E_EXCEPTION: return " DISP_E_EXCEPTION"; case COM.DISP_E_MEMBERNOTFOUND: return " DISP_E_MEMBERNOTFOUND"; case COM.DISP_E_UNKNOWNINTERFACE: return " DISP_E_UNKNOWNINTERFACE"; diff --git a/bundles/org.eclipse.swt/Eclipse SWT Accessibility/win32/org/eclipse/swt/accessibility/Relation.java b/bundles/org.eclipse.swt/Eclipse SWT Accessibility/win32/org/eclipse/swt/accessibility/Relation.java index 00a6ca2b1f..22d0fb9925 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT Accessibility/win32/org/eclipse/swt/accessibility/Relation.java +++ b/bundles/org.eclipse.swt/Eclipse SWT Accessibility/win32/org/eclipse/swt/accessibility/Relation.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2009, 2012 IBM Corporation and others. + * Copyright (c) 2009, 2017 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -11,8 +11,9 @@ package org.eclipse.swt.accessibility; import org.eclipse.swt.*; -import org.eclipse.swt.internal.win32.*; +import org.eclipse.swt.internal.*; import org.eclipse.swt.internal.ole.win32.*; +import org.eclipse.swt.internal.win32.*; class Relation { Accessible accessible; @@ -98,7 +99,7 @@ class Relation { COM.MoveMemory(guid, iid, GUID.sizeof); if (COM.IsEqualGUID(guid, COM.IIDIUnknown) || COM.IsEqualGUID(guid, COM.IIDIAccessibleRelation)) { - COM.MoveMemory(ppvObject, new long /*int*/[] { getAddress() }, OS.PTR_SIZEOF); + OS.MoveMemory(ppvObject, new long /*int*/[] { getAddress() }, C.PTR_SIZEOF); AddRef(); return COM.S_OK; } @@ -136,7 +137,7 @@ class Relation { /* IAccessibleRelation::get_nTargets([out] pNTargets) */ int get_nTargets(long /*int*/ pNTargets) { - COM.MoveMemory(pNTargets, new int [] { targets.length }, 4); + OS.MoveMemory(pNTargets, new int [] { targets.length }, 4); return COM.S_OK; } @@ -145,7 +146,7 @@ class Relation { if (targetIndex < 0 || targetIndex >= targets.length) return COM.E_INVALIDARG; Accessible target = targets[targetIndex]; target.AddRef(); - COM.MoveMemory(ppTarget, new long /*int*/[] { target.getAddress() }, OS.PTR_SIZEOF); + OS.MoveMemory(ppTarget, new long /*int*/[] { target.getAddress() }, C.PTR_SIZEOF); return COM.S_OK; } @@ -155,9 +156,9 @@ class Relation { for (int i = 0; i < count; i++) { Accessible target = targets[i]; target.AddRef(); - COM.MoveMemory(ppTargets + i * OS.PTR_SIZEOF, new long /*int*/[] { target.getAddress() }, OS.PTR_SIZEOF); + OS.MoveMemory(ppTargets + i * C.PTR_SIZEOF, new long /*int*/[] { target.getAddress() }, C.PTR_SIZEOF); } - COM.MoveMemory(pNTargets, new int [] { count }, 4); + OS.MoveMemory(pNTargets, new int [] { count }, 4); return COM.S_OK; } @@ -196,6 +197,6 @@ class Relation { void setString(long /*int*/ psz, String string) { char[] data = (string + "\0").toCharArray(); long /*int*/ ptr = COM.SysAllocString(data); - COM.MoveMemory(psz, new long /*int*/ [] { ptr }, OS.PTR_SIZEOF); + OS.MoveMemory(psz, new long /*int*/ [] { ptr }, C.PTR_SIZEOF); } } diff --git a/bundles/org.eclipse.swt/Eclipse SWT Browser/win32/org/eclipse/swt/browser/IE.java b/bundles/org.eclipse.swt/Eclipse SWT Browser/win32/org/eclipse/swt/browser/IE.java index 7c1d8d1131..0f790edd2d 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT Browser/win32/org/eclipse/swt/browser/IE.java +++ b/bundles/org.eclipse.swt/Eclipse SWT Browser/win32/org/eclipse/swt/browser/IE.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2003, 2016 IBM Corporation and others. + * Copyright (c) 2003, 2017 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -476,7 +476,7 @@ public void create(Composite parent, int style) { Variant cancel1 = event.arguments[6]; if (cancel1 != null) { long /*int*/ pCancel1 = cancel1.getByRef(); - COM.MoveMemory(pCancel1, new short[] {COM.VARIANT_FALSE}, 2); + OS.MoveMemory(pCancel1, new short[] {OS.VARIANT_FALSE}, 2); } isAboutBlank = false; break; @@ -511,7 +511,7 @@ public void create(Composite parent, int style) { Variant cancel2 = event.arguments[6]; if (cancel2 != null) { long /*int*/ pCancel2 = cancel2.getByRef(); - COM.MoveMemory(pCancel2, new short[] {COM.VARIANT_TRUE}, 2); + OS.MoveMemory(pCancel2, new short[] {OS.VARIANT_TRUE}, 2); } break; } @@ -528,7 +528,7 @@ public void create(Composite parent, int style) { Variant cancel3 = event.arguments[6]; if (cancel3 != null) { long /*int*/ pCancel3 = cancel3.getByRef(); - COM.MoveMemory(pCancel3, new short[] {doit1 ? COM.VARIANT_FALSE : COM.VARIANT_TRUE}, 2); + OS.MoveMemory(pCancel3, new short[] {doit1 ? OS.VARIANT_FALSE : OS.VARIANT_TRUE}, 2); } if (doit1) { varResult1 = event.arguments[0]; @@ -801,7 +801,7 @@ public void create(Composite parent, int style) { Variant cancel4 = event.arguments[4]; if (cancel4 != null) { long /*int*/ pCancel4 = cancel4.getByRef(); - COM.MoveMemory(pCancel4, new short[] {COM.VARIANT_TRUE}, 2); + OS.MoveMemory(pCancel4, new short[] {OS.VARIANT_TRUE}, 2); } browser.getDisplay().asyncExec(() -> { if (browser.isDisposed()) return; @@ -851,10 +851,10 @@ public void create(Composite parent, int style) { IDispatch iDispatch = variant5.getDispatch(); Variant ppDisp = event.arguments[0]; long /*int*/ byref = ppDisp.getByRef(); - if (byref != 0) COM.MoveMemory(byref, new long /*int*/[] {iDispatch.getAddress()}, OS.PTR_SIZEOF); + if (byref != 0) OS.MoveMemory(byref, new long /*int*/[] {iDispatch.getAddress()}, C.PTR_SIZEOF); } if (newEvent2.required) { - COM.MoveMemory(pCancel5, new short[]{doit2 ? COM.VARIANT_FALSE : COM.VARIANT_TRUE}, 2); + OS.MoveMemory(pCancel5, new short[]{doit2 ? OS.VARIANT_FALSE : OS.VARIANT_TRUE}, 2); } break; } @@ -1000,7 +1000,7 @@ public void create(Composite parent, int style) { long /*int*/ pCancel6 = cancel6.getByRef(); Variant arg15 = event.arguments[0]; boolean isChildWindow = arg15.getBoolean(); - COM.MoveMemory(pCancel6, new short[]{isChildWindow ? COM.VARIANT_FALSE : COM.VARIANT_TRUE}, 2); + OS.MoveMemory(pCancel6, new short[]{isChildWindow ? OS.VARIANT_FALSE : OS.VARIANT_TRUE}, 2); break; } case WindowSetHeight: { diff --git a/bundles/org.eclipse.swt/Eclipse SWT Browser/win32/org/eclipse/swt/browser/WebSite.java b/bundles/org.eclipse.swt/Eclipse SWT Browser/win32/org/eclipse/swt/browser/WebSite.java index 676f9a3f63..0266918897 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT Browser/win32/org/eclipse/swt/browser/WebSite.java +++ b/bundles/org.eclipse.swt/Eclipse SWT Browser/win32/org/eclipse/swt/browser/WebSite.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2000, 2016 IBM Corporation and others. + * Copyright (c) 2000, 2017 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -164,7 +164,7 @@ protected void createCOMInterfaces () { GUID guid = new GUID (); COM.MoveMemory (guid, args[0], GUID.sizeof); if (COM.IsEqualGUID (guid, COM.IIDIDispatch)) { - COM.MoveMemory (args[1], new long /*int*/[] {iDispatch.getAddress ()}, OS.PTR_SIZEOF); + OS.MoveMemory (args[1], new long /*int*/[] {iDispatch.getAddress ()}, C.PTR_SIZEOF); AddRef (); return COM.S_OK; } @@ -232,31 +232,31 @@ protected int QueryInterface(long /*int*/ riid, long /*int*/ ppvObject) { GUID guid = new GUID(); COM.MoveMemory(guid, riid, GUID.sizeof); if (COM.IsEqualGUID(guid, COM.IIDIDocHostUIHandler)) { - COM.MoveMemory(ppvObject, new long /*int*/[] {iDocHostUIHandler.getAddress()}, OS.PTR_SIZEOF); + OS.MoveMemory(ppvObject, new long /*int*/[] {iDocHostUIHandler.getAddress()}, C.PTR_SIZEOF); AddRef(); return COM.S_OK; } if (COM.IsEqualGUID(guid, COM.IIDIDocHostShowUI)) { - COM.MoveMemory(ppvObject, new long /*int*/[] {iDocHostShowUI.getAddress()}, OS.PTR_SIZEOF); + OS.MoveMemory(ppvObject, new long /*int*/[] {iDocHostShowUI.getAddress()}, C.PTR_SIZEOF); AddRef(); return COM.S_OK; } if (COM.IsEqualGUID(guid, COM.IIDIServiceProvider)) { - COM.MoveMemory(ppvObject, new long /*int*/[] {iServiceProvider.getAddress()}, OS.PTR_SIZEOF); + OS.MoveMemory(ppvObject, new long /*int*/[] {iServiceProvider.getAddress()}, C.PTR_SIZEOF); AddRef(); return COM.S_OK; } if (COM.IsEqualGUID(guid, COM.IIDIInternetSecurityManager)) { - COM.MoveMemory(ppvObject, new long /*int*/[] {iInternetSecurityManager.getAddress()}, OS.PTR_SIZEOF); + OS.MoveMemory(ppvObject, new long /*int*/[] {iInternetSecurityManager.getAddress()}, C.PTR_SIZEOF); AddRef(); return COM.S_OK; } if (COM.IsEqualGUID(guid, COM.IIDIOleCommandTarget)) { - COM.MoveMemory(ppvObject, new long /*int*/[] {iOleCommandTarget.getAddress()}, OS.PTR_SIZEOF); + OS.MoveMemory(ppvObject, new long /*int*/[] {iOleCommandTarget.getAddress()}, C.PTR_SIZEOF); AddRef(); return COM.S_OK; } - COM.MoveMemory(ppvObject, new long /*int*/[] {0}, OS.PTR_SIZEOF); + OS.MoveMemory(ppvObject, new long /*int*/[] {0}, C.PTR_SIZEOF); return COM.E_NOINTERFACE; } @@ -533,16 +533,16 @@ int QueryService(long /*int*/ guidService, long /*int*/ riid, long /*int*/ ppvOb GUID guid = new GUID(); COM.MoveMemory(guid, riid, GUID.sizeof); if (COM.IsEqualGUID(guid, COM.IIDIInternetSecurityManager)) { - COM.MoveMemory(ppvObject, new long /*int*/[] {iInternetSecurityManager.getAddress()}, OS.PTR_SIZEOF); + OS.MoveMemory(ppvObject, new long /*int*/[] {iInternetSecurityManager.getAddress()}, C.PTR_SIZEOF); AddRef(); return COM.S_OK; } if (COM.IsEqualGUID(guid, COM.IIDIAuthenticate)) { - COM.MoveMemory(ppvObject, new long /*int*/[] {iAuthenticate.getAddress()}, OS.PTR_SIZEOF); + OS.MoveMemory(ppvObject, new long /*int*/[] {iAuthenticate.getAddress()}, C.PTR_SIZEOF); AddRef(); return COM.S_OK; } - COM.MoveMemory(ppvObject, new long /*int*/[] {0}, OS.PTR_SIZEOF); + OS.MoveMemory(ppvObject, new long /*int*/[] {0}, C.PTR_SIZEOF); return COM.E_NOINTERFACE; } @@ -569,7 +569,7 @@ int MapUrlToZone(long /*int*/ pwszUrl, long /*int*/ pdwZone, int dwFlags) { * been disposed. To detect this case check for ie.auto != null. */ if (ie.auto != null && ie.isAboutBlank && !ie.untrustedText) { - COM.MoveMemory(pdwZone, new int[] {IE.URLZONE_INTRANET}, 4); + OS.MoveMemory(pdwZone, new int[] {IE.URLZONE_INTRANET}, 4); return COM.S_OK; } return IE.INET_E_DEFAULT_ACTION; @@ -589,7 +589,7 @@ int ProcessUrlAction(long /*int*/ pwszUrl, int dwAction, long /*int*/ pPolicy, i if (dwAction == IE.URLACTION_FEATURE_ZONE_ELEVATION) { IE ie = (IE)((Browser)getParent().getParent()).webBrowser; if (ie.auto != null && ie._getUrl().startsWith(IE.ABOUT_BLANK) && !ie.untrustedText) { - if (cbPolicy >= 4) COM.MoveMemory(pPolicy, new int[] {IE.URLPOLICY_ALLOW}, 4); + if (cbPolicy >= 4) OS.MoveMemory(pPolicy, new int[] {IE.URLPOLICY_ALLOW}, 4); return COM.S_OK; } } @@ -622,7 +622,7 @@ int ProcessUrlAction(long /*int*/ pwszUrl, int dwAction, long /*int*/ pPolicy, i } if (policy == IE.INET_E_DEFAULT_ACTION) return IE.INET_E_DEFAULT_ACTION; - if (cbPolicy >= 4) COM.MoveMemory(pPolicy, new int[] {policy}, 4); + if (cbPolicy >= 4) OS.MoveMemory(pPolicy, new int[] {policy}, 4); return policy == IE.URLPOLICY_ALLOW ? COM.S_OK : COM.S_FALSE; } @@ -719,11 +719,11 @@ int Authenticate (long /*int*/ hwnd, long /*int*/ szUsername, long /*int*/ szPas if (event.user != null && event.password != null) { TCHAR user = new TCHAR (0, event.user, true); int size = user.length () * TCHAR.sizeof; - long /*int*/ userPtr = COM.CoTaskMemAlloc (size); + long /*int*/ userPtr = OS.CoTaskMemAlloc (size); OS.MoveMemory (userPtr, user, size); TCHAR password = new TCHAR (0, event.password, true); size = password.length () * TCHAR.sizeof; - long /*int*/ passwordPtr = COM.CoTaskMemAlloc (size); + long /*int*/ passwordPtr = OS.CoTaskMemAlloc (size); OS.MoveMemory (passwordPtr, password, size); C.memmove (hwnd, new long /*int*/[] {0}, C.PTR_SIZEOF); C.memmove (szUsername, new long /*int*/[] {userPtr}, C.PTR_SIZEOF); @@ -776,7 +776,7 @@ int Invoke (int dispIdMember, long /*int*/ riid, int lcid, int dwFlags, long /*i Map<Integer, BrowserFunction> functions = ie.functions; if (functions == null) { if (pVarResult != 0) { - COM.MoveMemory (pVarResult, new long /*int*/[] {0}, C.PTR_SIZEOF); + OS.MoveMemory (pVarResult, new long /*int*/[] {0}, C.PTR_SIZEOF); } return COM.S_OK; } @@ -785,7 +785,7 @@ int Invoke (int dispIdMember, long /*int*/ riid, int lcid, int dwFlags, long /*i COM.MoveMemory (dispParams, pDispParams, DISPPARAMS.sizeof); if (dispParams.cArgs != 3) { if (pVarResult != 0) { - COM.MoveMemory (pVarResult, new long /*int*/[] {0}, C.PTR_SIZEOF); + OS.MoveMemory (pVarResult, new long /*int*/[] {0}, C.PTR_SIZEOF); } return COM.S_OK; } @@ -795,7 +795,7 @@ int Invoke (int dispIdMember, long /*int*/ riid, int lcid, int dwFlags, long /*i if (variant.getType () != COM.VT_I4) { variant.dispose (); if (pVarResult != 0) { - COM.MoveMemory (pVarResult, new long /*int*/[] {0}, C.PTR_SIZEOF); + OS.MoveMemory (pVarResult, new long /*int*/[] {0}, C.PTR_SIZEOF); } return COM.S_OK; } @@ -803,7 +803,7 @@ int Invoke (int dispIdMember, long /*int*/ riid, int lcid, int dwFlags, long /*i variant.dispose (); if (index <= 0) { if (pVarResult != 0) { - COM.MoveMemory (pVarResult, new long /*int*/[] {0}, C.PTR_SIZEOF); + OS.MoveMemory (pVarResult, new long /*int*/[] {0}, C.PTR_SIZEOF); } return COM.S_OK; } @@ -814,7 +814,7 @@ int Invoke (int dispIdMember, long /*int*/ riid, int lcid, int dwFlags, long /*i if (type != COM.VT_BSTR) { variant.dispose (); if (pVarResult != 0) { - COM.MoveMemory (pVarResult, new long /*int*/[] {0}, C.PTR_SIZEOF); + OS.MoveMemory (pVarResult, new long /*int*/[] {0}, C.PTR_SIZEOF); } return COM.S_OK; } 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 0727504839..1adfdb52d9 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 @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2000, 2012 IBM Corporation and others. + * Copyright (c) 2000, 2017 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -12,9 +12,10 @@ package org.eclipse.swt.dnd; import org.eclipse.swt.*; -import org.eclipse.swt.widgets.*; -import org.eclipse.swt.internal.win32.*; +import org.eclipse.swt.internal.*; import org.eclipse.swt.internal.ole.win32.*; +import org.eclipse.swt.internal.win32.*; +import org.eclipse.swt.widgets.*; /** * The <code>Clipboard</code> provides a mechanism for transferring data from one @@ -573,7 +574,7 @@ 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()}, OS.PTR_SIZEOF); + OS.MoveMemory(ppenumFormatetc, new long /*int*/[] {enumFORMATETC.getAddress()}, C.PTR_SIZEOF); return COM.S_OK; } private int GetData(long /*int*/ pFormatetc, long /*int*/ pmedium) { @@ -642,11 +643,11 @@ private int QueryInterface(long /*int*/ riid, long /*int*/ ppvObject) { 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()}, OS.PTR_SIZEOF); + OS.MoveMemory(ppvObject, new long /*int*/[] {iDataObject.getAddress()}, C.PTR_SIZEOF); AddRef(); return COM.S_OK; } - OS.MoveMemory(ppvObject, new long /*int*/[] {0}, OS.PTR_SIZEOF); + OS.MoveMemory(ppvObject, new long /*int*/[] {0}, C.PTR_SIZEOF); return COM.E_NOINTERFACE; } private int Release() { 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 416f9a5c06..823fae4599 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 @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2000, 2016 IBM Corporation and others. + * Copyright (c) 2000, 2017 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -428,7 +428,7 @@ private int EnumFormatEtc(int dwDirection, long /*int*/ ppenumFormatetc) { } enumFORMATETC.setFormats(formats); - OS.MoveMemory(ppenumFormatetc, new long /*int*/[] {enumFORMATETC.getAddress()}, OS.PTR_SIZEOF); + OS.MoveMemory(ppenumFormatetc, new long /*int*/[] {enumFORMATETC.getAddress()}, C.PTR_SIZEOF); return COM.S_OK; } /** @@ -644,18 +644,18 @@ 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.IIDIDropSource)) { - OS.MoveMemory(ppvObject, new long /*int*/[] {iDropSource.getAddress()}, OS.PTR_SIZEOF); + OS.MoveMemory(ppvObject, new long /*int*/[] {iDropSource.getAddress()}, C.PTR_SIZEOF); AddRef(); return COM.S_OK; } if (COM.IsEqualGUID(guid, COM.IIDIDataObject) ) { - OS.MoveMemory(ppvObject, new long /*int*/[] {iDataObject.getAddress()}, OS.PTR_SIZEOF); + OS.MoveMemory(ppvObject, new long /*int*/[] {iDataObject.getAddress()}, C.PTR_SIZEOF); AddRef(); return COM.S_OK; } - OS.MoveMemory(ppvObject, new long /*int*/[] {0}, OS.PTR_SIZEOF); + OS.MoveMemory(ppvObject, new long /*int*/[] {0}, C.PTR_SIZEOF); return COM.E_NOINTERFACE; } @@ -704,7 +704,7 @@ private int SetData(long /*int*/ pFormatetc, long /*int*/ pmedium, int fRelease) COM.MoveMemory(stgmedium, pmedium,STGMEDIUM.sizeof); //TODO - this should be GlobalLock() long /*int*/[] ptrEffect = new long /*int*/[1]; - OS.MoveMemory(ptrEffect, stgmedium.unionField, OS.PTR_SIZEOF); + OS.MoveMemory(ptrEffect, stgmedium.unionField, C.PTR_SIZEOF); int[] effect = new int[1]; OS.MoveMemory(effect, ptrEffect[0], 4); dataEffect = osToOp(effect[0]); 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 56e1cf614c..0ee13545ca 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 @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2000, 2016 IBM Corporation and others. + * Copyright (c) 2000, 2017 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -623,12 +623,12 @@ int QueryInterface(long /*int*/ riid, long /*int*/ ppvObject) { 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 long /*int*/[] {iDropTarget.getAddress()}, OS.PTR_SIZEOF); + OS.MoveMemory(ppvObject, new long /*int*/[] {iDropTarget.getAddress()}, C.PTR_SIZEOF); AddRef(); return COM.S_OK; } - COM.MoveMemory(ppvObject, new long /*int*/[] {0}, OS.PTR_SIZEOF); + OS.MoveMemory(ppvObject, new long /*int*/[] {0}, C.PTR_SIZEOF); return COM.E_NOINTERFACE; } 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 c6ef598e6e..ebb5404786 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 @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2000, 2012 IBM Corporation and others. + * Copyright (c) 2000, 2017 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -10,6 +10,7 @@ *******************************************************************************/ package org.eclipse.swt.dnd; +import org.eclipse.swt.internal.*; import org.eclipse.swt.internal.ole.win32.*; import org.eclipse.swt.internal.win32.*; @@ -176,7 +177,7 @@ public Object nativeToJava(TransferData transferData){ break; } } - if (fragmentEnd <= fragmentStart || fragmentEnd > OS.strlen(lpMultiByteStr)) return null; + if (fragmentEnd <= fragmentStart || fragmentEnd > C.strlen(lpMultiByteStr)) return null; cchWideChar = OS.MultiByteToWideChar (OS.CP_UTF8, 0, lpMultiByteStr+fragmentStart, fragmentEnd - fragmentStart, lpWideCharStr, lpWideCharStr.length); if (cchWideChar == 0) return null; String s = new String(lpWideCharStr, 0, cchWideChar); 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 76267260ad..ebc53ddf3f 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 @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2000, 2012 IBM Corporation and others. + * Copyright (c) 2000, 2017 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -10,8 +10,9 @@ *******************************************************************************/ package org.eclipse.swt.dnd; -import org.eclipse.swt.internal.win32.*; +import org.eclipse.swt.internal.*; import org.eclipse.swt.internal.ole.win32.*; +import org.eclipse.swt.internal.win32.*; final class OleEnumFORMATETC { @@ -105,13 +106,13 @@ private int Next(int celt, long /*int*/ rgelt, long /*int*/ pceltFetched) { } if (pceltFetched != 0) - COM.MoveMemory(pceltFetched, new int[] {nextItems.length}, 4); + OS.MoveMemory(pceltFetched, new int[] {nextItems.length}, 4); if (nextItems.length == celt) return COM.S_OK; } else { if (pceltFetched != 0) - COM.MoveMemory(pceltFetched, new int[] {0}, 4); + OS.MoveMemory(pceltFetched, new int[] {0}, 4); COM.MoveMemory(rgelt, new FORMATETC(), FORMATETC.sizeof); } @@ -125,16 +126,16 @@ private int QueryInterface(long /*int*/ riid, long /*int*/ ppvObject) { COM.MoveMemory(guid, riid, GUID.sizeof); if (COM.IsEqualGUID(guid, COM.IIDIUnknown)) { - COM.MoveMemory(ppvObject, new long /*int*/[] {iUnknown.getAddress()}, OS.PTR_SIZEOF); + OS.MoveMemory(ppvObject, new long /*int*/[] {iUnknown.getAddress()}, C.PTR_SIZEOF); AddRef(); return COM.S_OK; } if (COM.IsEqualGUID(guid, COM.IIDIEnumFORMATETC)) { - COM.MoveMemory(ppvObject, new long /*int*/[] {iEnumFORMATETC.getAddress()}, OS.PTR_SIZEOF); + OS.MoveMemory(ppvObject, new long /*int*/[] {iEnumFORMATETC.getAddress()}, C.PTR_SIZEOF); AddRef(); return COM.S_OK; } - COM.MoveMemory(ppvObject, new long /*int*/[] {0}, OS.PTR_SIZEOF); + OS.MoveMemory(ppvObject, new long /*int*/[] {0}, C.PTR_SIZEOF); return COM.E_NOINTERFACE; } int Release() { diff --git a/bundles/org.eclipse.swt/Eclipse SWT OLE Win32/win32/org/eclipse/swt/internal/ole/win32/COMObject.java b/bundles/org.eclipse.swt/Eclipse SWT OLE Win32/win32/org/eclipse/swt/internal/ole/win32/COMObject.java index 7ec3047ed8..3df5083104 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT OLE Win32/win32/org/eclipse/swt/internal/ole/win32/COMObject.java +++ b/bundles/org.eclipse.swt/Eclipse SWT OLE Win32/win32/org/eclipse/swt/internal/ole/win32/COMObject.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2000, 2016 IBM Corporation and others. + * Copyright (c) 2000, 2017 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -37,10 +37,10 @@ public COMObject(int[] argCounts) { } } - long /*int*/ pVtable = OS.GlobalAlloc(COM.GMEM_FIXED | COM.GMEM_ZEROINIT, OS.PTR_SIZEOF * argCounts.length); - COM.MoveMemory(pVtable, callbackAddresses, OS.PTR_SIZEOF * argCounts.length); - ppVtable = OS.GlobalAlloc(COM.GMEM_FIXED | COM.GMEM_ZEROINIT, OS.PTR_SIZEOF); - COM.MoveMemory(ppVtable, new long /*int*/[] {pVtable}, OS.PTR_SIZEOF); + long /*int*/ pVtable = OS.GlobalAlloc(COM.GMEM_FIXED | COM.GMEM_ZEROINIT, C.PTR_SIZEOF * argCounts.length); + OS.MoveMemory(pVtable, callbackAddresses, C.PTR_SIZEOF * argCounts.length); + ppVtable = OS.GlobalAlloc(COM.GMEM_FIXED | COM.GMEM_ZEROINIT, C.PTR_SIZEOF); + OS.MoveMemory(ppVtable, new long /*int*/[] {pVtable}, C.PTR_SIZEOF); ObjectMap.put(new LONG(ppVtable), this); } @@ -778,7 +778,7 @@ static long /*int*/ callback79(long /*int*/[] callbackArgs) { public void dispose() { // free the memory for this reference long /*int*/[] pVtable = new long /*int*/[1]; - OS.MoveMemory(pVtable, ppVtable, OS.PTR_SIZEOF); + OS.MoveMemory(pVtable, ppVtable, C.PTR_SIZEOF); OS.GlobalFree(pVtable[0]); OS.GlobalFree(ppVtable); diff --git a/bundles/org.eclipse.swt/Eclipse SWT OLE Win32/win32/org/eclipse/swt/ole/win32/OleAutomation.java b/bundles/org.eclipse.swt/Eclipse SWT OLE Win32/win32/org/eclipse/swt/ole/win32/OleAutomation.java index 264b8d9627..73b2c923a9 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT OLE Win32/win32/org/eclipse/swt/ole/win32/OleAutomation.java +++ b/bundles/org.eclipse.swt/Eclipse SWT OLE Win32/win32/org/eclipse/swt/ole/win32/OleAutomation.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2000, 2012 IBM Corporation and others. + * Copyright (c) 2000, 2017 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -12,6 +12,7 @@ package org.eclipse.swt.ole.win32; import org.eclipse.swt.*; +import org.eclipse.swt.internal.*; import org.eclipse.swt.internal.ole.win32.*; import org.eclipse.swt.internal.win32.*; @@ -266,7 +267,7 @@ public OlePropertyDescription getPropertyDescription(int index) { data.type = vardesc.elemdescVar_tdesc_vt; if (data.type == OLE.VT_PTR) { short[] vt = new short[1]; - COM.MoveMemory(vt, vardesc.elemdescVar_tdesc_union + OS.PTR_SIZEOF, 2); + OS.MoveMemory(vt, vardesc.elemdescVar_tdesc_union + C.PTR_SIZEOF, 2); data.type = vt[0]; } data.flags = vardesc.wVarFlags; @@ -314,24 +315,24 @@ public OleFunctionDescription getFunctionDescription(int index) { } //TODO 0- use structures short[] vt = new short[1]; - COM.MoveMemory(vt, funcdesc.lprgelemdescParam + i * COM.ELEMDESC_sizeof() + OS.PTR_SIZEOF, 2); + OS.MoveMemory(vt, funcdesc.lprgelemdescParam + i * COM.ELEMDESC_sizeof() + C.PTR_SIZEOF, 2); if (vt[0] == OLE.VT_PTR) { long /*int*/ [] pTypedesc = new long /*int*/ [1]; - COM.MoveMemory(pTypedesc, funcdesc.lprgelemdescParam + i * COM.ELEMDESC_sizeof(), OS.PTR_SIZEOF); + OS.MoveMemory(pTypedesc, funcdesc.lprgelemdescParam + i * COM.ELEMDESC_sizeof(), C.PTR_SIZEOF); short[] vt2 = new short[1]; - COM.MoveMemory(vt2, pTypedesc[0] + OS.PTR_SIZEOF, 2); + OS.MoveMemory(vt2, pTypedesc[0] + C.PTR_SIZEOF, 2); vt[0] = (short)(vt2[0] | COM.VT_BYREF); } data.args[i].type = vt[0]; short[] wParamFlags = new short[1]; - COM.MoveMemory(wParamFlags, funcdesc.lprgelemdescParam + i * COM.ELEMDESC_sizeof() + COM.TYPEDESC_sizeof () + OS.PTR_SIZEOF, 2); + OS.MoveMemory(wParamFlags, funcdesc.lprgelemdescParam + i * COM.ELEMDESC_sizeof() + COM.TYPEDESC_sizeof () + C.PTR_SIZEOF, 2); data.args[i].flags = wParamFlags[0]; } data.returnType = funcdesc.elemdescFunc_tdesc_vt; if (data.returnType == OLE.VT_PTR) { short[] vt = new short[1]; - COM.MoveMemory(vt, funcdesc.elemdescFunc_tdesc_union + OS.PTR_SIZEOF, 2); + OS.MoveMemory(vt, funcdesc.elemdescFunc_tdesc_union + C.PTR_SIZEOF, 2); data.returnType = vt[0]; } @@ -559,7 +560,7 @@ private int invoke(int dispIdMember, int wFlags, Variant[] rgvarg, int[] rgdispi pDispParams.rgdispidNamedArgs = OS.GlobalAlloc(COM.GMEM_FIXED | COM.GMEM_ZEROINIT, 4 * rgdispidNamedArgs.length); int offset = 0; for (int i = rgdispidNamedArgs.length; i > 0; i--) { - COM.MoveMemory(pDispParams.rgdispidNamedArgs + offset, new int[] {rgdispidNamedArgs[i-1]}, 4); + OS.MoveMemory(pDispParams.rgdispidNamedArgs + offset, new int[] {rgdispidNamedArgs[i-1]}, 4); offset += 4; } } @@ -674,7 +675,7 @@ private void manageExcepinfo(int hResult, EXCEPINFO excepInfo) { if (excepInfo.bstrDescription != 0){ int size = COM.SysStringByteLen(excepInfo.bstrDescription); char[] buffer = new char[(size + 1) /2]; - COM.MoveMemory(buffer, excepInfo.bstrDescription, size); + OS.MoveMemory(buffer, excepInfo.bstrDescription, size); exceptionDescription = new String(buffer); } else { exceptionDescription = "OLE Automation Error Exception "; //$NON-NLS-1$ diff --git a/bundles/org.eclipse.swt/Eclipse SWT OLE Win32/win32/org/eclipse/swt/ole/win32/OleClientSite.java b/bundles/org.eclipse.swt/Eclipse SWT OLE Win32/win32/org/eclipse/swt/ole/win32/OleClientSite.java index cf4e1d1918..0e976be49a 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT OLE Win32/win32/org/eclipse/swt/ole/win32/OleClientSite.java +++ b/bundles/org.eclipse.swt/Eclipse SWT OLE Win32/win32/org/eclipse/swt/ole/win32/OleClientSite.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2000, 2016 IBM Corporation and others. + * Copyright (c) 2000, 2017 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -188,7 +188,7 @@ public OleClientSite(Composite parent, int style, File file) { try { if (file == null || file.isDirectory() || !file.exists()) - OLE.error(OLE.ERROR_INVALID_ARGUMENT); + OLE.error(SWT.ERROR_INVALID_ARGUMENT); // Is there an associated CLSID? GUID fileClsid = new GUID(); @@ -298,7 +298,7 @@ public OleClientSite(Composite parent, int style, String progId) { public OleClientSite(Composite parent, int style, String progId, File file) { this(parent, style); try { - if (file == null || file.isDirectory() || !file.exists()) OLE.error(OLE.ERROR_INVALID_ARGUMENT); + if (file == null || file.isDirectory() || !file.exists()) OLE.error(SWT.ERROR_INVALID_ARGUMENT); appClsid = getClassID(progId); if (appClsid == null) OLE.error(OLE.ERROR_INVALID_CLASSID); @@ -369,10 +369,10 @@ void OleCreate(GUID appClsid, GUID fileClsid, char[] fileName, File file) { byte[] buffer = new byte[increment]; int count = 0; while((count = fileInput.read(buffer)) > 0){ - long /*int*/ pv = COM.CoTaskMemAlloc(count); + long /*int*/ pv = OS.CoTaskMemAlloc(count); OS.MoveMemory(pv, buffer, count); result = stream.Write(pv, count, null) ; - COM.CoTaskMemFree(pv); + OS.CoTaskMemFree(pv); if (result != COM.S_OK) { fileInput.close(); stream.Release(); @@ -740,7 +740,7 @@ private int GetContainer(long /*int*/ ppContainer) { * they can return E_NOINTERFACE and set ppContainer to NULL. */ if (ppContainer != 0) - COM.MoveMemory(ppContainer, new long /*int*/[]{0}, OS.PTR_SIZEOF); + OS.MoveMemory(ppContainer, new long /*int*/[]{0}, C.PTR_SIZEOF); return COM.E_NOINTERFACE; } private SIZE getExtent() { @@ -782,7 +782,7 @@ String getProgID(GUID clsid) { int length = OS.GlobalSize(hMem); long /*int*/ ptr = OS.GlobalLock(hMem); char[] buffer = new char[length]; - COM.MoveMemory(buffer, ptr, length); + OS.MoveMemory(buffer, ptr, length); OS.GlobalUnlock(hMem); OS.GlobalFree(hMem); @@ -817,12 +817,12 @@ protected int GetWindow(long /*int*/ phwnd) { if (phwnd == 0) return COM.E_INVALIDARG; if (frame == null) { - COM.MoveMemory(phwnd, new long /*int*/[] {0}, OS.PTR_SIZEOF); + OS.MoveMemory(phwnd, new long /*int*/[] {0}, C.PTR_SIZEOF); return COM.E_NOTIMPL; } // Copy the Window's handle into the memory passed in - COM.MoveMemory(phwnd, new long /*int*/[] {handle}, OS.PTR_SIZEOF); + OS.MoveMemory(phwnd, new long /*int*/[] {handle}, C.PTR_SIZEOF); return COM.S_OK; } RECT getRect() { @@ -840,11 +840,11 @@ private int GetWindowContext(long /*int*/ ppFrame, long /*int*/ ppDoc, long /*in // fill in frame handle long /*int*/ iOleInPlaceFrame = frame.getIOleInPlaceFrame(); - COM.MoveMemory(ppFrame, new long /*int*/[] {iOleInPlaceFrame}, OS.PTR_SIZEOF); + OS.MoveMemory(ppFrame, new long /*int*/[] {iOleInPlaceFrame}, C.PTR_SIZEOF); frame.AddRef(); // null out document handle - if (ppDoc != 0) COM.MoveMemory(ppDoc, new long /*int*/[] {0}, OS.PTR_SIZEOF); + if (ppDoc != 0) OS.MoveMemory(ppDoc, new long /*int*/[] {0}, C.PTR_SIZEOF); // fill in position and clipping info RECT rect = getRect(); @@ -1085,34 +1085,34 @@ protected int QueryInterface(long /*int*/ riid, long /*int*/ ppvObject) { COM.MoveMemory(guid, riid, GUID.sizeof); if (COM.IsEqualGUID(guid, COM.IIDIUnknown)) { - COM.MoveMemory(ppvObject, new long /*int*/[] {iUnknown.getAddress()}, OS.PTR_SIZEOF); + OS.MoveMemory(ppvObject, new long /*int*/[] {iUnknown.getAddress()}, C.PTR_SIZEOF); AddRef(); return COM.S_OK; } if (COM.IsEqualGUID(guid, COM.IIDIAdviseSink)) { - COM.MoveMemory(ppvObject, new long /*int*/[] {iAdviseSink.getAddress()}, OS.PTR_SIZEOF); + OS.MoveMemory(ppvObject, new long /*int*/[] {iAdviseSink.getAddress()}, C.PTR_SIZEOF); AddRef(); return COM.S_OK; } if (COM.IsEqualGUID(guid, COM.IIDIOleClientSite)) { - COM.MoveMemory(ppvObject, new long /*int*/[] {iOleClientSite.getAddress()}, OS.PTR_SIZEOF); + OS.MoveMemory(ppvObject, new long /*int*/[] {iOleClientSite.getAddress()}, C.PTR_SIZEOF); AddRef(); return COM.S_OK; } if (COM.IsEqualGUID(guid, COM.IIDIOleInPlaceSite)) { - COM.MoveMemory(ppvObject, new long /*int*/[] {iOleInPlaceSite.getAddress()}, OS.PTR_SIZEOF); + OS.MoveMemory(ppvObject, new long /*int*/[] {iOleInPlaceSite.getAddress()}, C.PTR_SIZEOF); AddRef(); return COM.S_OK; } if (COM.IsEqualGUID(guid, COM.IIDIOleDocumentSite )) { String progID = getProgramID(); if (!progID.startsWith("PowerPoint")) { //$NON-NLS-1$ - COM.MoveMemory(ppvObject, new long /*int*/[] {iOleDocumentSite.getAddress()}, OS.PTR_SIZEOF); + OS.MoveMemory(ppvObject, new long /*int*/[] {iOleDocumentSite.getAddress()}, C.PTR_SIZEOF); AddRef(); return COM.S_OK; } } - COM.MoveMemory(ppvObject, new long /*int*/[] {0}, OS.PTR_SIZEOF); + OS.MoveMemory(ppvObject, new long /*int*/[] {0}, C.PTR_SIZEOF); return COM.E_NOINTERFACE; } /** @@ -1224,7 +1224,7 @@ private boolean saveFromContents(long /*int*/ address, File file) { FileOutputStream writer = new FileOutputStream(file); int increment = 1024 * 4; - long /*int*/ pv = COM.CoTaskMemAlloc(increment); + long /*int*/ pv = OS.CoTaskMemAlloc(increment); int[] pcbWritten = new int[1]; while (tempContents.Read(pv, increment, pcbWritten) == COM.S_OK && pcbWritten[0] > 0) { byte[] buffer = new byte[ pcbWritten[0]]; @@ -1233,7 +1233,7 @@ private boolean saveFromContents(long /*int*/ address, File file) { // first time it is called success = true; } - COM.CoTaskMemFree(pv); + OS.CoTaskMemFree(pv); writer.close(); @@ -1253,19 +1253,19 @@ private boolean saveFromOle10Native(long /*int*/ address, File file) { // The "\1Ole10Native" stream contains a DWORD header whose value is the length // of the native data that follows. - long /*int*/ pv = COM.CoTaskMemAlloc(4); + long /*int*/ pv = OS.CoTaskMemAlloc(4); int[] size = new int[1]; int rc = tempContents.Read(pv, 4, null); OS.MoveMemory(size, pv, 4); - COM.CoTaskMemFree(pv); + OS.CoTaskMemFree(pv); if (rc == COM.S_OK && size[0] > 0) { // Read the data byte[] buffer = new byte[size[0]]; - pv = COM.CoTaskMemAlloc(size[0]); + pv = OS.CoTaskMemAlloc(size[0]); rc = tempContents.Read(pv, size[0], null); OS.MoveMemory(buffer, pv, size[0]); - COM.CoTaskMemFree(pv); + OS.CoTaskMemFree(pv); // open the file and write data into it try { @@ -1487,7 +1487,7 @@ public void showProperties(String title) { result = COM.OleCreatePropertyFrame(frame.handle, 10, 10, chTitle, 1, new long /*int*/[] {objIUnknown.getAddress()}, caGUID.cElems, caGUID.pElems, COM.LOCALE_USER_DEFAULT, 0, 0); // free the property page information - COM.CoTaskMemFree(caGUID.pElems); + OS.CoTaskMemFree(caGUID.pElems); } private boolean updateStorage() { diff --git a/bundles/org.eclipse.swt/Eclipse SWT OLE Win32/win32/org/eclipse/swt/ole/win32/OleControlSite.java b/bundles/org.eclipse.swt/Eclipse SWT OLE Win32/win32/org/eclipse/swt/ole/win32/OleControlSite.java index 1fd5b3d597..8262e39f88 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT OLE Win32/win32/org/eclipse/swt/ole/win32/OleControlSite.java +++ b/bundles/org.eclipse.swt/Eclipse SWT OLE Win32/win32/org/eclipse/swt/ole/win32/OleControlSite.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2000, 2013 IBM Corporation and others. + * Copyright (c) 2000, 2017 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -13,10 +13,11 @@ package org.eclipse.swt.ole.win32; import java.io.*; import org.eclipse.swt.*; -import org.eclipse.swt.internal.ole.win32.*; import org.eclipse.swt.graphics.*; -import org.eclipse.swt.widgets.*; +import org.eclipse.swt.internal.*; +import org.eclipse.swt.internal.ole.win32.*; import org.eclipse.swt.internal.win32.*; +import org.eclipse.swt.widgets.*; /** * OleControlSite provides a site to manage an embedded ActiveX Control within a container. @@ -620,18 +621,18 @@ protected int GetWindow(long /*int*/ phwnd) { if (phwnd == 0) return COM.E_INVALIDARG; if (frame == null) { - COM.MoveMemory(phwnd, new long /*int*/[] {0}, OS.PTR_SIZEOF); + OS.MoveMemory(phwnd, new long /*int*/[] {0}, C.PTR_SIZEOF); return COM.E_NOTIMPL; } // Copy the Window's handle into the memory passed in - COM.MoveMemory(phwnd, new long /*int*/[] {handle}, OS.PTR_SIZEOF); + OS.MoveMemory(phwnd, new long /*int*/[] {handle}, C.PTR_SIZEOF); return COM.S_OK; } private int Invoke(int dispIdMember, long /*int*/ riid, int lcid, int dwFlags, long /*int*/ pDispParams, long /*int*/ pVarResult, long /*int*/ pExcepInfo, long /*int*/ pArgErr) { if (pVarResult == 0 || dwFlags != COM.DISPATCH_PROPERTYGET) { - if (pExcepInfo != 0) COM.MoveMemory(pExcepInfo, new long /*int*/ [] {0}, OS.PTR_SIZEOF); - if (pArgErr != 0) COM.MoveMemory(pArgErr, new int[] {0}, 4); + if (pExcepInfo != 0) OS.MoveMemory(pExcepInfo, new long /*int*/ [] {0}, C.PTR_SIZEOF); + if (pArgErr != 0) OS.MoveMemory(pArgErr, new int[] {0}, 4); return COM.DISP_E_MEMBERNOTFOUND; } Variant result = getSiteProperty(dispIdMember); @@ -644,9 +645,9 @@ private int Invoke(int dispIdMember, long /*int*/ riid, int lcid, int dwFlags, l case COM.DISPID_AMBIENT_SUPPORTSMNEMONICS : case COM.DISPID_AMBIENT_SHOWGRABHANDLES : case COM.DISPID_AMBIENT_SHOWHATCHING : - if (pVarResult != 0) COM.MoveMemory(pVarResult, new long /*int*/ [] {0}, OS.PTR_SIZEOF); - if (pExcepInfo != 0) COM.MoveMemory(pExcepInfo, new long /*int*/ [] {0}, OS.PTR_SIZEOF); - if (pArgErr != 0) COM.MoveMemory(pArgErr, new int[] {0}, 4); + if (pVarResult != 0) OS.MoveMemory(pVarResult, new long /*int*/ [] {0}, C.PTR_SIZEOF); + if (pExcepInfo != 0) OS.MoveMemory(pExcepInfo, new long /*int*/ [] {0}, C.PTR_SIZEOF); + if (pArgErr != 0) OS.MoveMemory(pArgErr, new int[] {0}, 4); return COM.S_FALSE; // not implemented @@ -657,15 +658,15 @@ private int Invoke(int dispIdMember, long /*int*/ riid, int lcid, int dwFlags, l case COM.DISPID_AMBIENT_LOCALEID : case COM.DISPID_AMBIENT_SILENT : case COM.DISPID_AMBIENT_MESSAGEREFLECT : - if (pVarResult != 0) COM.MoveMemory(pVarResult, new long /*int*/ [] {0}, OS.PTR_SIZEOF); - if (pExcepInfo != 0) COM.MoveMemory(pExcepInfo, new long /*int*/ [] {0}, OS.PTR_SIZEOF); - if (pArgErr != 0) COM.MoveMemory(pArgErr, new int[] {0}, 4); + if (pVarResult != 0) OS.MoveMemory(pVarResult, new long /*int*/ [] {0}, C.PTR_SIZEOF); + if (pExcepInfo != 0) OS.MoveMemory(pExcepInfo, new long /*int*/ [] {0}, C.PTR_SIZEOF); + if (pArgErr != 0) OS.MoveMemory(pArgErr, new int[] {0}, 4); return COM.E_NOTIMPL; default : - if (pVarResult != 0) COM.MoveMemory(pVarResult, new long /*int*/ [] {0}, OS.PTR_SIZEOF); - if (pExcepInfo != 0) COM.MoveMemory(pExcepInfo,new long /*int*/ [] {0}, OS.PTR_SIZEOF); - if (pArgErr != 0) COM.MoveMemory(pArgErr, new int[] {0}, 4); + if (pVarResult != 0) OS.MoveMemory(pVarResult, new long /*int*/ [] {0}, C.PTR_SIZEOF); + if (pExcepInfo != 0) OS.MoveMemory(pExcepInfo,new long /*int*/ [] {0}, C.PTR_SIZEOF); + if (pArgErr != 0) OS.MoveMemory(pArgErr, new int[] {0}, 4); return COM.DISP_E_MEMBERNOTFOUND; } } @@ -768,16 +769,16 @@ protected int QueryInterface(long /*int*/ riid, long /*int*/ ppvObject) { GUID guid = new GUID(); COM.MoveMemory(guid, riid, GUID.sizeof); if (COM.IsEqualGUID(guid, COM.IIDIOleControlSite)) { - COM.MoveMemory(ppvObject, new long /*int*/[] {iOleControlSite.getAddress()}, OS.PTR_SIZEOF); + OS.MoveMemory(ppvObject, new long /*int*/[] {iOleControlSite.getAddress()}, C.PTR_SIZEOF); AddRef(); return COM.S_OK; } if (COM.IsEqualGUID(guid, COM.IIDIDispatch)) { - COM.MoveMemory(ppvObject, new long /*int*/[] {iDispatch.getAddress()}, OS.PTR_SIZEOF); + OS.MoveMemory(ppvObject, new long /*int*/[] {iDispatch.getAddress()}, C.PTR_SIZEOF); AddRef(); return COM.S_OK; } - COM.MoveMemory(ppvObject, new long /*int*/[] {0}, OS.PTR_SIZEOF); + OS.MoveMemory(ppvObject, new long /*int*/[] {0}, C.PTR_SIZEOF); return COM.E_NOINTERFACE; } @Override diff --git a/bundles/org.eclipse.swt/Eclipse SWT OLE Win32/win32/org/eclipse/swt/ole/win32/OleEventSink.java b/bundles/org.eclipse.swt/Eclipse SWT OLE Win32/win32/org/eclipse/swt/ole/win32/OleEventSink.java index f39e1cce69..d304da67e2 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT OLE Win32/win32/org/eclipse/swt/ole/win32/OleEventSink.java +++ b/bundles/org.eclipse.swt/Eclipse SWT OLE Win32/win32/org/eclipse/swt/ole/win32/OleEventSink.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2000, 2013 IBM Corporation and others. + * Copyright (c) 2000, 2017 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -11,8 +11,9 @@ package org.eclipse.swt.ole.win32; import org.eclipse.swt.*; -import org.eclipse.swt.internal.win32.*; +import org.eclipse.swt.internal.*; import org.eclipse.swt.internal.ole.win32.*; +import org.eclipse.swt.internal.win32.*; final class OleEventSink { @@ -164,12 +165,12 @@ private int QueryInterface(long /*int*/ riid, long /*int*/ ppvObject) { if ( COM.IsEqualGUID(guid, COM.IIDIUnknown) || COM.IsEqualGUID(guid, COM.IIDIDispatch) || COM.IsEqualGUID(guid, eventGuid)) { - COM.MoveMemory(ppvObject, new long /*int*/[] {iDispatch.getAddress()}, OS.PTR_SIZEOF); + OS.MoveMemory(ppvObject, new long /*int*/[] {iDispatch.getAddress()}, C.PTR_SIZEOF); AddRef(); return OLE.S_OK; } - COM.MoveMemory(ppvObject, new long /*int*/[] {0}, OS.PTR_SIZEOF); + OS.MoveMemory(ppvObject, new long /*int*/[] {0}, C.PTR_SIZEOF); return COM.E_NOINTERFACE; } int Release() { diff --git a/bundles/org.eclipse.swt/Eclipse SWT OLE Win32/win32/org/eclipse/swt/ole/win32/OleFrame.java b/bundles/org.eclipse.swt/Eclipse SWT OLE Win32/win32/org/eclipse/swt/ole/win32/OleFrame.java index 38d6d64512..7ec7bbd7e1 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT OLE Win32/win32/org/eclipse/swt/ole/win32/OleFrame.java +++ b/bundles/org.eclipse.swt/Eclipse SWT OLE Win32/win32/org/eclipse/swt/ole/win32/OleFrame.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2000, 2016 IBM Corporation and others. + * Copyright (c) 2000, 2017 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -444,7 +444,7 @@ private long /*int*/ getMenuItemID(long /*int*/ hMenu, int index) { } private int GetWindow(long /*int*/ phwnd) { if (phwnd != 0) { - COM.MoveMemory(phwnd, new long /*int*/[] {handle}, OS.PTR_SIZEOF); + OS.MoveMemory(phwnd, new long /*int*/[] {handle}, C.PTR_SIZEOF); } return COM.S_OK; } @@ -470,7 +470,7 @@ private int InsertMenus(long /*int*/ hmenuShared, long /*int*/ lpMenuWidths) { // locate menu bar Menu menubar = getShell().getMenuBar(); if (menubar == null || menubar.isDisposed()) { - COM.MoveMemory(lpMenuWidths, new int[] {0}, 4); + OS.MoveMemory(lpMenuWidths, new int[] {0}, 4); return COM.S_OK; } long /*int*/ hMenu = menubar.handle; @@ -511,7 +511,7 @@ private int InsertMenus(long /*int*/ hmenuShared, long /*int*/ lpMenuWidths) { } // copy the menu item count information to the pointer - COM.MoveMemory(lpMenuWidths, new int[] {fileMenuCount}, 4); + OS.MoveMemory(lpMenuWidths, new int[] {fileMenuCount}, 4); // Loop over all "Container-like" menus in the menubar and get information about the // item from the OS. @@ -536,7 +536,7 @@ private int InsertMenus(long /*int*/ hmenuShared, long /*int*/ lpMenuWidths) { } // copy the menu item count information to the pointer - COM.MoveMemory(lpMenuWidths + 8, new int[] {containerMenuCount}, 4); + OS.MoveMemory(lpMenuWidths + 8, new int[] {containerMenuCount}, 4); // Loop over all "Window-like" menus in the menubar and get information about the // item from the OS. @@ -561,7 +561,7 @@ private int InsertMenus(long /*int*/ hmenuShared, long /*int*/ lpMenuWidths) { } // copy the menu item count information to the pointer - COM.MoveMemory(lpMenuWidths + 16, new int[] {windowMenuCount}, 4); + OS.MoveMemory(lpMenuWidths + 16, new int[] {windowMenuCount}, 4); // free resources used in querying the OS if (pszText != 0) @@ -615,12 +615,12 @@ private int QueryInterface(long /*int*/ riid, long /*int*/ ppvObject) { GUID guid = new GUID(); COM.MoveMemory(guid, riid, GUID.sizeof); if (COM.IsEqualGUID(guid, COM.IIDIUnknown) || COM.IsEqualGUID(guid, COM.IIDIOleInPlaceFrame) ) { - COM.MoveMemory(ppvObject, new long /*int*/ [] {iOleInPlaceFrame.getAddress()}, OS.PTR_SIZEOF); + OS.MoveMemory(ppvObject, new long /*int*/ [] {iOleInPlaceFrame.getAddress()}, C.PTR_SIZEOF); AddRef(); return COM.S_OK; } - COM.MoveMemory(ppvObject, new long /*int*/ [] {0}, OS.PTR_SIZEOF); + OS.MoveMemory(ppvObject, new long /*int*/ [] {0}, C.PTR_SIZEOF); return COM.E_NOINTERFACE; } /** diff --git a/bundles/org.eclipse.swt/Eclipse SWT OLE Win32/win32/org/eclipse/swt/ole/win32/OlePropertyChangeSink.java b/bundles/org.eclipse.swt/Eclipse SWT OLE Win32/win32/org/eclipse/swt/ole/win32/OlePropertyChangeSink.java index 1191c290b4..0e33d570ee 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT OLE Win32/win32/org/eclipse/swt/ole/win32/OlePropertyChangeSink.java +++ b/bundles/org.eclipse.swt/Eclipse SWT OLE Win32/win32/org/eclipse/swt/ole/win32/OlePropertyChangeSink.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2000, 2012 IBM Corporation and others. + * Copyright (c) 2000, 2017 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -11,9 +11,10 @@ package org.eclipse.swt.ole.win32; +import org.eclipse.swt.*; +import org.eclipse.swt.internal.*; import org.eclipse.swt.internal.ole.win32.*; import org.eclipse.swt.internal.win32.*; -import org.eclipse.swt.*; final class OlePropertyChangeSink { @@ -154,16 +155,16 @@ private int QueryInterface(long /*int*/ riid, long /*int*/ ppvObject) { GUID guid = new GUID(); COM.MoveMemory(guid, riid, GUID.sizeof); if (COM.IsEqualGUID(guid, COM.IIDIUnknown)) { - COM.MoveMemory(ppvObject, new long /*int*/[] {iUnknown.getAddress()}, OS.PTR_SIZEOF); + OS.MoveMemory(ppvObject, new long /*int*/[] {iUnknown.getAddress()}, C.PTR_SIZEOF); AddRef(); return COM.S_OK; } if (COM.IsEqualGUID(guid, COM.IIDIPropertyNotifySink)) { - COM.MoveMemory(ppvObject, new long /*int*/[] {iPropertyNotifySink.getAddress()}, OS.PTR_SIZEOF); + OS.MoveMemory(ppvObject, new long /*int*/[] {iPropertyNotifySink.getAddress()}, C.PTR_SIZEOF); AddRef(); return COM.S_OK; } - COM.MoveMemory(ppvObject, new long /*int*/[] {0}, OS.PTR_SIZEOF); + OS.MoveMemory(ppvObject, new long /*int*/[] {0}, C.PTR_SIZEOF); return COM.E_NOINTERFACE; } int Release() { diff --git a/bundles/org.eclipse.swt/Eclipse SWT OLE Win32/win32/org/eclipse/swt/ole/win32/Variant.java b/bundles/org.eclipse.swt/Eclipse SWT OLE Win32/win32/org/eclipse/swt/ole/win32/Variant.java index 9fdcc9008d..ef92ad8b76 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT OLE Win32/win32/org/eclipse/swt/ole/win32/Variant.java +++ b/bundles/org.eclipse.swt/Eclipse SWT OLE Win32/win32/org/eclipse/swt/ole/win32/Variant.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2000, 2014 IBM Corporation and others. + * Copyright (c) 2000, 2017 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -11,6 +11,7 @@ package org.eclipse.swt.ole.win32; import org.eclipse.swt.*; +import org.eclipse.swt.internal.*; import org.eclipse.swt.internal.ole.win32.*; import org.eclipse.swt.internal.win32.*; /** @@ -484,63 +485,63 @@ void getData(long /*int*/ pData){ if ((type & COM.VT_BYREF) == COM.VT_BYREF) { //TODO - use VARIANT structure - COM.MoveMemory(pData, new short[] {type}, 2); - COM.MoveMemory(pData + 8, new long /*int*/[]{byRefPtr}, OS.PTR_SIZEOF); + OS.MoveMemory(pData, new short[] {type}, 2); + OS.MoveMemory(pData + 8, new long /*int*/[]{byRefPtr}, C.PTR_SIZEOF); return; } switch (type) { case COM.VT_EMPTY : case COM.VT_NULL : - COM.MoveMemory(pData, new short[] {type}, 2); + OS.MoveMemory(pData, new short[] {type}, 2); break; case COM.VT_BOOL : - COM.MoveMemory(pData, new short[] {type}, 2); - COM.MoveMemory(pData + 8, new short[]{(booleanData) ? COM.VARIANT_TRUE : COM.VARIANT_FALSE}, 2); + OS.MoveMemory(pData, new short[] {type}, 2); + OS.MoveMemory(pData + 8, new short[]{(booleanData) ? OS.VARIANT_TRUE : OS.VARIANT_FALSE}, 2); break; case COM.VT_I1 : - COM.MoveMemory(pData, new short[] {type}, 2); - COM.MoveMemory(pData + 8, new byte[]{byteData}, 1); + OS.MoveMemory(pData, new short[] {type}, 2); + OS.MoveMemory(pData + 8, new byte[]{byteData}, 1); break; case COM.VT_I2 : - COM.MoveMemory(pData, new short[] {type}, 2); - COM.MoveMemory(pData + 8, new short[]{shortData}, 2); + OS.MoveMemory(pData, new short[] {type}, 2); + OS.MoveMemory(pData + 8, new short[]{shortData}, 2); break; case COM.VT_UI2 : - COM.MoveMemory(pData, new short[] {type}, 2); - COM.MoveMemory(pData + 8, new char[]{charData}, 2); + OS.MoveMemory(pData, new short[] {type}, 2); + OS.MoveMemory(pData + 8, new char[]{charData}, 2); break; case COM.VT_I4 : - COM.MoveMemory(pData, new short[] {type}, 2); - COM.MoveMemory(pData + 8, new int[]{intData}, 4); + OS.MoveMemory(pData, new short[] {type}, 2); + OS.MoveMemory(pData + 8, new int[]{intData}, 4); break; case COM.VT_I8 : - COM.MoveMemory(pData, new short[] {type}, 2); - COM.MoveMemory(pData + 8, new long[]{longData}, 8); + OS.MoveMemory(pData, new short[] {type}, 2); + OS.MoveMemory(pData + 8, new long[]{longData}, 8); break; case COM.VT_R4 : - COM.MoveMemory(pData, new short[] {type}, 2); - COM.MoveMemory(pData + 8, new float[]{floatData}, 4); + OS.MoveMemory(pData, new short[] {type}, 2); + OS.MoveMemory(pData + 8, new float[]{floatData}, 4); break; case COM.VT_R8 : - COM.MoveMemory(pData, new short[] {type}, 2); - COM.MoveMemory(pData + 8, new double[]{doubleData}, 8); + OS.MoveMemory(pData, new short[] {type}, 2); + OS.MoveMemory(pData + 8, new double[]{doubleData}, 8); break; case COM.VT_DISPATCH : dispatchData.AddRef(); - COM.MoveMemory(pData, new short[] {type}, 2); - COM.MoveMemory(pData + 8, new long /*int*/[]{dispatchData.getAddress()}, OS.PTR_SIZEOF); + OS.MoveMemory(pData, new short[] {type}, 2); + OS.MoveMemory(pData + 8, new long /*int*/[]{dispatchData.getAddress()}, C.PTR_SIZEOF); break; case COM.VT_UNKNOWN : unknownData.AddRef(); - COM.MoveMemory(pData, new short[] {type}, 2); - COM.MoveMemory(pData + 8, new long /*int*/[]{unknownData.getAddress()}, OS.PTR_SIZEOF); + OS.MoveMemory(pData, new short[] {type}, 2); + OS.MoveMemory(pData + 8, new long /*int*/[]{unknownData.getAddress()}, C.PTR_SIZEOF); break; case COM.VT_BSTR : - COM.MoveMemory(pData, new short[] {type}, 2); + OS.MoveMemory(pData, new short[] {type}, 2); char[] data = (stringData+"\0").toCharArray(); long /*int*/ ptr = COM.SysAllocString(data); - COM.MoveMemory(pData + 8, new long /*int*/[] {ptr}, OS.PTR_SIZEOF); + OS.MoveMemory(pData + 8, new long /*int*/[] {ptr}, C.PTR_SIZEOF); break; default : @@ -855,7 +856,7 @@ public void setByRef(boolean val) { if ((type & COM.VT_BYREF) == 0 || (type & COM.VT_BOOL) == 0) { OLE.error(OLE.ERROR_CANNOT_CHANGE_VARIANT_TYPE); } - COM.MoveMemory(byRefPtr, new short[]{val ? COM.VARIANT_TRUE : COM.VARIANT_FALSE}, 2); + OS.MoveMemory(byRefPtr, new short[]{val ? OS.VARIANT_TRUE : OS.VARIANT_FALSE}, 2); } /** * Update the by reference value of this variant with a new float value. @@ -873,7 +874,7 @@ public void setByRef(float val) { if ((type & COM.VT_BYREF) == 0 || (type & COM.VT_R4) == 0) { OLE.error(OLE.ERROR_CANNOT_CHANGE_VARIANT_TYPE); } - COM.MoveMemory(byRefPtr, new float[]{val}, 4); + OS.MoveMemory(byRefPtr, new float[]{val}, 4); } /** * Update the by reference value of this variant with a new integer value. @@ -888,11 +889,11 @@ public void setByRef(float val) { */ public void setByRef(long /*int*/ val) { if ((type & COM.VT_BYREF) == 0 - || (OS.PTR_SIZEOF == 4 && (type & COM.VT_I4) == 0) - || (OS.PTR_SIZEOF == 8 && (type & COM.VT_I8) == 0)) { + || (C.PTR_SIZEOF == 4 && (type & COM.VT_I4) == 0) + || (C.PTR_SIZEOF == 8 && (type & COM.VT_I8) == 0)) { OLE.error(OLE.ERROR_CANNOT_CHANGE_VARIANT_TYPE); } - COM.MoveMemory(byRefPtr, new long /*int*/[]{val}, OS.PTR_SIZEOF); + OS.MoveMemory(byRefPtr, new long /*int*/[]{val}, C.PTR_SIZEOF); } /** * Update the by reference value of this variant with a new short value. @@ -909,19 +910,19 @@ public void setByRef(short val) { if ((type & COM.VT_BYREF) == 0 || (type & COM.VT_I2) == 0) { OLE.error(OLE.ERROR_CANNOT_CHANGE_VARIANT_TYPE); } - COM.MoveMemory(byRefPtr, new short[]{val}, 2); + OS.MoveMemory(byRefPtr, new short[]{val}, 2); } void setData(long /*int*/ pData){ - if (pData == 0) OLE.error(OLE.ERROR_INVALID_ARGUMENT); + if (pData == 0) OLE.error(SWT.ERROR_INVALID_ARGUMENT); //TODO - use VARIANT structure short[] dataType = new short[1]; - COM.MoveMemory(dataType, pData, 2); + OS.MoveMemory(dataType, pData, 2); type = dataType[0]; if ((type & COM.VT_BYREF) == COM.VT_BYREF) { long /*int*/[] newByRefPtr = new long /*int*/[1]; - OS.MoveMemory(newByRefPtr, pData + 8, OS.PTR_SIZEOF); + OS.MoveMemory(newByRefPtr, pData + 8, C.PTR_SIZEOF); byRefPtr = newByRefPtr[0]; return; } @@ -932,22 +933,22 @@ void setData(long /*int*/ pData){ break; case COM.VT_BOOL : short[] newBooleanData = new short[1]; - COM.MoveMemory(newBooleanData, pData + 8, 2); - booleanData = (newBooleanData[0] != COM.VARIANT_FALSE); + OS.MoveMemory(newBooleanData, pData + 8, 2); + booleanData = (newBooleanData[0] != OS.VARIANT_FALSE); break; case COM.VT_I1 : byte[] newByteData = new byte[1]; - COM.MoveMemory(newByteData, pData + 8, 1); + OS.MoveMemory(newByteData, pData + 8, 1); byteData = newByteData[0]; break; case COM.VT_I2 : short[] newShortData = new short[1]; - COM.MoveMemory(newShortData, pData + 8, 2); + OS.MoveMemory(newShortData, pData + 8, 2); shortData = newShortData[0]; break; case COM.VT_UI2 : char[] newCharData = new char[1]; - COM.MoveMemory(newCharData, pData + 8, 2); + OS.MoveMemory(newCharData, pData + 8, 2); charData = newCharData[0]; break; case COM.VT_I4 : @@ -962,17 +963,17 @@ void setData(long /*int*/ pData){ break; case COM.VT_R4 : float[] newFloatData = new float[1]; - COM.MoveMemory(newFloatData, pData + 8, 4); + OS.MoveMemory(newFloatData, pData + 8, 4); floatData = newFloatData[0]; break; case COM.VT_R8 : double[] newDoubleData = new double[1]; - COM.MoveMemory(newDoubleData, pData + 8, 8); + OS.MoveMemory(newDoubleData, pData + 8, 8); doubleData = newDoubleData[0]; break; case COM.VT_DISPATCH : { long /*int*/[] ppvObject = new long /*int*/[1]; - OS.MoveMemory(ppvObject, pData + 8, OS.PTR_SIZEOF); + OS.MoveMemory(ppvObject, pData + 8, C.PTR_SIZEOF); if (ppvObject[0] == 0) { type = COM.VT_EMPTY; break; @@ -983,7 +984,7 @@ void setData(long /*int*/ pData){ } case COM.VT_UNKNOWN : { long /*int*/[] ppvObject = new long /*int*/[1]; - OS.MoveMemory(ppvObject, pData + 8, OS.PTR_SIZEOF); + OS.MoveMemory(ppvObject, pData + 8, C.PTR_SIZEOF); if (ppvObject[0] == 0) { type = COM.VT_EMPTY; break; @@ -995,7 +996,7 @@ void setData(long /*int*/ pData){ case COM.VT_BSTR : // get the address of the memory in which the string resides long /*int*/[] hMem = new long /*int*/[1]; - OS.MoveMemory(hMem, pData + 8, OS.PTR_SIZEOF); + OS.MoveMemory(hMem, pData + 8, C.PTR_SIZEOF); if (hMem[0] == 0) { type = COM.VT_EMPTY; break; @@ -1006,7 +1007,7 @@ void setData(long /*int*/ pData){ if (size > 0){ // get the unicode character array from the global memory and create a String char[] buffer = new char[(size + 1) /2]; // add one to avoid rounding errors - COM.MoveMemory(buffer, hMem[0], size); + OS.MoveMemory(buffer, hMem[0], size); stringData = new String(buffer); } else { stringData = ""; //$NON-NLS-1$ diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/ole/win32/IAccessible.java b/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/ole/win32/IAccessible.java index 9144c40c3e..212462f09e 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/ole/win32/IAccessible.java +++ b/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/ole/win32/IAccessible.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2000, 2012 IBM Corporation and others. + * Copyright (c) 2000, 2017 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -10,6 +10,7 @@ *******************************************************************************/ package org.eclipse.swt.internal.ole.win32; +import org.eclipse.swt.internal.win32.*; public class IAccessible extends IDispatch { @@ -18,10 +19,10 @@ public IAccessible(long /*int*/ address) { } public int get_accParent(long /*int*/ ppdispParent) { - return COM.VtblCall(7, address, ppdispParent); + return OS.VtblCall(7, address, ppdispParent); } public int get_accChildCount(long /*int*/ pcountChildren) { - return COM.VtblCall(8, address, pcountChildren); + return OS.VtblCall(8, address, pcountChildren); } public int get_accChild(long /*int*/ variant, long /*int*/ ppdispChild) { return COM.VtblCall_VARIANTP(9, address, variant, ppdispChild); @@ -51,10 +52,10 @@ public int get_accKeyboardShortcut(long /*int*/ variant, long /*int*/ pszKeyboar return COM.VtblCall_VARIANTP(17, address, variant, pszKeyboardShortcut); } public int get_accFocus(long /*int*/ pvarChild) { - return COM.VtblCall(18, address, pvarChild); + return OS.VtblCall(18, address, pvarChild); } public int get_accSelection(long /*int*/ pvarChildren) { - return COM.VtblCall(19, address, pvarChildren); + return OS.VtblCall(19, address, pvarChildren); } public int get_accDefaultAction(long /*int*/ variant, long /*int*/ pszDefaultAction) { return COM.VtblCall_VARIANTP(20, address, variant, pszDefaultAction); diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/ole/win32/IClassFactory2.java b/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/ole/win32/IClassFactory2.java index b5e31005fa..9ea6aa1171 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/ole/win32/IClassFactory2.java +++ b/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/ole/win32/IClassFactory2.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2000, 2012 IBM Corporation and others. + * Copyright (c) 2000, 2017 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -10,6 +10,8 @@ *******************************************************************************/ package org.eclipse.swt.internal.ole.win32; +import org.eclipse.swt.internal.win32.*; + public class IClassFactory2 extends IUnknown { public IClassFactory2(long /*int*/ address) { @@ -22,6 +24,6 @@ public int GetLicInfo(LICINFO licInfo) { return COM.VtblCall(5, address, licInfo); } public int RequestLicKey(int dwReserved, long /*int*/[] pBstrKey) { - return COM.VtblCall(6, address, dwReserved, pBstrKey); + return OS.VtblCall(6, address, dwReserved, pBstrKey); } } diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/ole/win32/IConnectionPoint.java b/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/ole/win32/IConnectionPoint.java index 7cbc3c2371..c0db06a754 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/ole/win32/IConnectionPoint.java +++ b/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/ole/win32/IConnectionPoint.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2000, 2012 IBM Corporation and others. + * Copyright (c) 2000, 2017 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -10,15 +10,17 @@ *******************************************************************************/ package org.eclipse.swt.internal.ole.win32; +import org.eclipse.swt.internal.win32.*; + public class IConnectionPoint extends IUnknown { public IConnectionPoint(long /*int*/ address) { super(address); } public int Advise(long /*int*/ pUnk, int[] pdwCookie) { - return COM.VtblCall(5, address, pUnk, pdwCookie); + return OS.VtblCall(5, address, pUnk, pdwCookie); } public int Unadvise(int dwCookie) { - return COM.VtblCall(6, address, dwCookie); + return OS.VtblCall(6, address, dwCookie); } } diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/ole/win32/IDataObject.java b/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/ole/win32/IDataObject.java index 4179159b22..f3aadbcfc5 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/ole/win32/IDataObject.java +++ b/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/ole/win32/IDataObject.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2000, 2012 IBM Corporation and others. + * Copyright (c) 2000, 2017 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -10,12 +10,14 @@ *******************************************************************************/ package org.eclipse.swt.internal.ole.win32; +import org.eclipse.swt.internal.win32.*; + public class IDataObject extends IUnknown { public IDataObject(long /*int*/ address) { super(address); } public int EnumFormatEtc(int dwDirection, long /*int*/[] ppenumFormatetc) { - return COM.VtblCall(8, address, dwDirection, ppenumFormatetc); + return OS.VtblCall(8, address, dwDirection, ppenumFormatetc); } public int GetData(FORMATETC pFormatetc, STGMEDIUM pmedium) { //Called by a data consumer to obtain data from a source data object. diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/ole/win32/IDispatch.java b/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/ole/win32/IDispatch.java index 9243eb6df4..26dda83679 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/ole/win32/IDispatch.java +++ b/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/ole/win32/IDispatch.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2000, 2012 IBM Corporation and others. + * Copyright (c) 2000, 2017 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -10,6 +10,7 @@ *******************************************************************************/ package org.eclipse.swt.internal.ole.win32; +import org.eclipse.swt.internal.*; import org.eclipse.swt.internal.win32.*; public class IDispatch extends IUnknown { @@ -24,7 +25,7 @@ public int GetIDsOfNames(GUID riid, String[] rgszNames, int cNames, int lcid, in // create an array to hold the addresses long /*int*/ hHeap = OS.GetProcessHeap(); - long /*int*/ ppNames = OS.HeapAlloc(hHeap, OS.HEAP_ZERO_MEMORY, size * OS.PTR_SIZEOF); + long /*int*/ ppNames = OS.HeapAlloc(hHeap, OS.HEAP_ZERO_MEMORY, size * C.PTR_SIZEOF); long /*int*/[] memTracker = new long /*int*/[size]; try { @@ -39,7 +40,7 @@ public int GetIDsOfNames(GUID riid, String[] rgszNames, int cNames, int lcid, in long /*int*/ pName = OS.HeapAlloc(hHeap, OS.HEAP_ZERO_MEMORY, buffer.length * 2); OS.MoveMemory(pName, buffer, buffer.length * 2); // copy the address to the array of addresses - COM.MoveMemory(ppNames + OS.PTR_SIZEOF * i, new long /*int*/[]{pName}, OS.PTR_SIZEOF); + OS.MoveMemory(ppNames + C.PTR_SIZEOF * i, new long /*int*/[]{pName}, C.PTR_SIZEOF); // keep track of the Global Memory so we can free it memTracker[i] = pName; } @@ -58,7 +59,7 @@ public int GetTypeInfo(int iTInfo, int lcid, long /*int*/[] ppTInfo ){ return COM.VtblCall(4, address, iTInfo, lcid, ppTInfo); } public int GetTypeInfoCount(int [] pctinfo ){ - return COM.VtblCall(3, address, pctinfo); + return OS.VtblCall(3, address, pctinfo); } public int Invoke(int dispIdMember, GUID riid, int lcid, int dwFlags, DISPPARAMS pDispParams, long /*int*/ pVarResult, EXCEPINFO pExcepInfo, int[] pArgErr) { return COM.VtblCall(6, address, dispIdMember, riid, lcid, dwFlags, pDispParams, pVarResult, pExcepInfo, pArgErr); diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/ole/win32/IDispatchEx.java b/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/ole/win32/IDispatchEx.java index cf5bf49cbf..5e3ad393f1 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/ole/win32/IDispatchEx.java +++ b/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/ole/win32/IDispatchEx.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2008, 2012 IBM Corporation and others. + * Copyright (c) 2008, 2017 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -10,6 +10,8 @@ *******************************************************************************/ package org.eclipse.swt.internal.ole.win32; +import org.eclipse.swt.internal.win32.*; + public class IDispatchEx extends IDispatch { public IDispatchEx (long /*int*/ address) { @@ -25,11 +27,11 @@ public int InvokeEx (int id, int lcid, int wFlags, DISPPARAMS pdp, long /*int*/ } public int DeleteMemberByName (long /*int*/ bstrName, int grfdex) { - return COM.VtblCall (9, address, bstrName, grfdex); + return OS.VtblCall (9, address, bstrName, grfdex); } public int DeleteMemberByDispID (int id) { - return COM.VtblCall (10, address, id); + return OS.VtblCall (10, address, id); } public int GetMemberProperties (int id, int grfdexFetch, int[] pgrfdex) { @@ -37,7 +39,7 @@ public int GetMemberProperties (int id, int grfdexFetch, int[] pgrfdex) { } public int GetMemberName (int id, long /*int*/[] pbstrName) { - return COM.VtblCall (12, address, id, pbstrName); + return OS.VtblCall (12, address, id, pbstrName); } public int GetNextDispID (int grfdex, int id, int[] pid) { @@ -45,6 +47,6 @@ public int GetNextDispID (int grfdex, int id, int[] pid) { } public int GetNameSpaceParent (long /*int*/[] ppunk) { - return COM.VtblCall (14, address, ppunk); + return OS.VtblCall (14, address, ppunk); } } diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/ole/win32/IDragSourceHelper2.java b/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/ole/win32/IDragSourceHelper2.java index d68b81d99d..380002d8d7 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/ole/win32/IDragSourceHelper2.java +++ b/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/ole/win32/IDragSourceHelper2.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2008, 2012 IBM Corporation and others. + * Copyright (c) 2008, 2017 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -10,11 +10,13 @@ *******************************************************************************/ package org.eclipse.swt.internal.ole.win32; +import org.eclipse.swt.internal.win32.*; + public class IDragSourceHelper2 extends IDragSourceHelper { public IDragSourceHelper2(long /*int*/ address) { super(address); } public int SetFlags(int dwFlags) { - return COM.VtblCall(5, address, dwFlags); + return OS.VtblCall(5, address, dwFlags); } } diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/ole/win32/IDropTargetHelper.java b/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/ole/win32/IDropTargetHelper.java index b50d8ba841..81c0eb451f 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/ole/win32/IDropTargetHelper.java +++ b/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/ole/win32/IDropTargetHelper.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2008, 2012 IBM Corporation and others. + * Copyright (c) 2008, 2017 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -20,7 +20,7 @@ public int DragEnter(long /*int*/ hwndTarget, long /*int*/ pDataObject, POINT pp return COM.VtblCall(3, address, hwndTarget, pDataObject, ppt, dwEffect); } public int DragLeave() { - return COM.VtblCall(4, address); + return OS.VtblCall(4, address); } public int DragOver(POINT ppt, int dwEffect) { return COM.VtblCall(5, address, ppt, dwEffect); diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/ole/win32/IEnum.java b/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/ole/win32/IEnum.java index b17e79c295..879f7288a6 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/ole/win32/IEnum.java +++ b/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/ole/win32/IEnum.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2000, 2012 IBM Corporation and others. + * Copyright (c) 2000, 2017 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -10,21 +10,23 @@ *******************************************************************************/ package org.eclipse.swt.internal.ole.win32; +import org.eclipse.swt.internal.win32.*; + public class IEnum extends IUnknown { public IEnum(long /*int*/ address) { super(address); } public int Clone( long /*int*/[] ppenum ){ - return COM.VtblCall(6, address, ppenum); + return OS.VtblCall(6, address, ppenum); } public int Next(int celt, long /*int*/ rgelt, int[] pceltFetched ){ return COM.VtblCall(3, address, celt, rgelt, pceltFetched); } public int Reset() { - return COM.VtblCall(5, address); + return OS.VtblCall(5, address); } public int Skip(int celt){ - return COM.VtblCall(4, address, celt); + return OS.VtblCall(4, address, celt); } } diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/ole/win32/IFont.java b/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/ole/win32/IFont.java index 6ff911cd7c..c69a752cd7 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/ole/win32/IFont.java +++ b/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/ole/win32/IFont.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2000, 2012 IBM Corporation and others. + * Copyright (c) 2000, 2017 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -10,11 +10,13 @@ *******************************************************************************/ package org.eclipse.swt.internal.ole.win32; +import org.eclipse.swt.internal.win32.*; + public class IFont extends IUnknown { public IFont(long /*int*/ address) { super(address); } public int get_hFont(long /*int*/[] phfont){ - return COM.VtblCall(3, address, phfont); + return OS.VtblCall(3, address, phfont); } } diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/ole/win32/IOleDocument.java b/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/ole/win32/IOleDocument.java index 6d8dd22b91..a9f2480db2 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/ole/win32/IOleDocument.java +++ b/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/ole/win32/IOleDocument.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2000, 2012 IBM Corporation and others. + * Copyright (c) 2000, 2017 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -10,12 +10,14 @@ *******************************************************************************/ package org.eclipse.swt.internal.ole.win32; +import org.eclipse.swt.internal.win32.*; + public class IOleDocument extends IUnknown { public IOleDocument(long /*int*/ address) { super(address); } public int CreateView(long /*int*/ pIPSite,long /*int*/ pstm, int dwReserved, long /*int*/[] ppView) { - return COM.VtblCall(3, address, pIPSite, pstm, dwReserved, ppView); + return OS.VtblCall(3, address, pIPSite, pstm, dwReserved, ppView); } } diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/ole/win32/IOleDocumentView.java b/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/ole/win32/IOleDocumentView.java index f1fbb082fb..bc2484d6f9 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/ole/win32/IOleDocumentView.java +++ b/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/ole/win32/IOleDocumentView.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2000, 2012 IBM Corporation and others. + * Copyright (c) 2000, 2017 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -11,7 +11,7 @@ package org.eclipse.swt.internal.ole.win32; -import org.eclipse.swt.internal.win32.RECT; +import org.eclipse.swt.internal.win32.*; public class IOleDocumentView extends IUnknown { @@ -19,15 +19,15 @@ public IOleDocumentView(long /*int*/ address) { super(address); } public int SetInPlaceSite(long /*int*/ pIPSite) { - return COM.VtblCall(3, address, pIPSite); + return OS.VtblCall(3, address, pIPSite); } public int SetRect(RECT prcView) { return COM.VtblCall(6, address, prcView); } public int Show(int fShow) { - return COM.VtblCall(9, address, fShow); + return OS.VtblCall(9, address, fShow); } public int UIActivate(int fUIActivate) { - return COM.VtblCall(10, address, fUIActivate); + return OS.VtblCall(10, address, fUIActivate); } } diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/ole/win32/IOleInPlaceObject.java b/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/ole/win32/IOleInPlaceObject.java index a01ed460f5..7f7cb0cc0a 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/ole/win32/IOleInPlaceObject.java +++ b/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/ole/win32/IOleInPlaceObject.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2000, 2012 IBM Corporation and others. + * Copyright (c) 2000, 2017 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -18,15 +18,15 @@ public IOleInPlaceObject(long /*int*/ address) { super(address); } public int InPlaceDeactivate() { - return COM.VtblCall(5, address); + return OS.VtblCall(5, address); } public int UIDeactivate() { - return COM.VtblCall(6, address); + return OS.VtblCall(6, address); } public int SetObjectRects(RECT lprcPosRect, RECT lprcClipRect) { return COM.VtblCall(7, address, lprcPosRect, lprcClipRect); } public int ReactivateAndUndo() { - return COM.VtblCall(8, address); + return OS.VtblCall(8, address); } } diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/ole/win32/IOleLink.java b/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/ole/win32/IOleLink.java index 2ecb87d047..db1837d4f8 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/ole/win32/IOleLink.java +++ b/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/ole/win32/IOleLink.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2000, 2012 IBM Corporation and others. + * Copyright (c) 2000, 2017 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -10,15 +10,17 @@ *******************************************************************************/ package org.eclipse.swt.internal.ole.win32; +import org.eclipse.swt.internal.win32.*; + public class IOleLink extends IUnknown { public IOleLink(long /*int*/ address) { super(address); } public int BindIfRunning() { - return COM.VtblCall(10, address); + return OS.VtblCall(10, address); } public int GetSourceMoniker(long /*int*/[] ppmk) { - return COM.VtblCall(6, address, ppmk); + return OS.VtblCall(6, address, ppmk); } } diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/ole/win32/IOleObject.java b/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/ole/win32/IOleObject.java index fd3ea5385c..fdc592b789 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/ole/win32/IOleObject.java +++ b/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/ole/win32/IOleObject.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2000, 2012 IBM Corporation and others. + * Copyright (c) 2000, 2017 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -18,22 +18,22 @@ public IOleObject(long /*int*/ address) { super(address); } public int Advise(long /*int*/ pAdvSink, int[] pdwConnection) { - return COM.VtblCall(19, address, pAdvSink, pdwConnection); + return OS.VtblCall(19, address, pAdvSink, pdwConnection); } public int Close(int dwSaveOption) { - return COM.VtblCall(6, address, dwSaveOption); + return OS.VtblCall(6, address, dwSaveOption); } public int DoVerb(int iVerb, MSG lpmsg, long /*int*/ pActiveSite, int lindex, long /*int*/ hwndParent, RECT lprcPosRect) { return COM.VtblCall(11, address, iVerb, lpmsg, pActiveSite, lindex, hwndParent, lprcPosRect); } public int GetClientSite(long /*int*/[] ppvClientSite) { - return COM.VtblCall(4, address, ppvClientSite); + return OS.VtblCall(4, address, ppvClientSite); } public int GetExtent(int dwDrawAspect, SIZE pSizel) { return COM.VtblCall(18, address, dwDrawAspect, pSizel); } public int SetClientSite(long /*int*/ pClientSite) { - return COM.VtblCall(3, address, pClientSite); + return OS.VtblCall(3, address, pClientSite); } public int SetExtent(int dwDrawAspect, SIZE pSizel) { return COM.VtblCall(17, address, dwDrawAspect, pSizel); @@ -58,9 +58,9 @@ public int SetHostNames(String szContainerApp, String szContainerObj) { return COM.VtblCall(5, address, buffer1, buffer2); } public int Unadvise(int token) { - return COM.VtblCall(20, address, token); + return OS.VtblCall(20, address, token); } public int Update() { - return COM.VtblCall(13, address); + return OS.VtblCall(13, address); } } diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/ole/win32/IOleWindow.java b/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/ole/win32/IOleWindow.java index f51cb29b88..6a94adcd8e 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/ole/win32/IOleWindow.java +++ b/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/ole/win32/IOleWindow.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2000, 2012 IBM Corporation and others. + * Copyright (c) 2000, 2017 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -10,11 +10,13 @@ *******************************************************************************/ package org.eclipse.swt.internal.ole.win32; +import org.eclipse.swt.internal.win32.*; + public class IOleWindow extends IUnknown { public IOleWindow(long /*int*/ address) { super(address); } public int GetWindow(long /*int*/[] phwnd) { - return COM.VtblCall(3, address, phwnd); + return OS.VtblCall(3, address, phwnd); } } diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/ole/win32/IPersistFile.java b/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/ole/win32/IPersistFile.java index 4c3f1bef49..b9e4e4ee82 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/ole/win32/IPersistFile.java +++ b/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/ole/win32/IPersistFile.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2009, 2012 IBM Corporation and others. + * Copyright (c) 2009, 2017 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -10,24 +10,26 @@ *******************************************************************************/ package org.eclipse.swt.internal.ole.win32; +import org.eclipse.swt.internal.win32.*; + public class IPersistFile extends IPersist { public IPersistFile(long /*int*/ address) { super(address); } public int IsDirty() { - return COM.VtblCall(4, address); + return OS.VtblCall(4, address); } public int Load(long /*int*/ pszFileName, int dwMode) { - return COM.VtblCall(5, address, pszFileName, dwMode); + return OS.VtblCall(5, address, pszFileName, dwMode); } public int Save(long /*int*/ pszFileName, boolean fRemember) { return COM.VtblCall(6, address, pszFileName, fRemember); } public int SaveCompleted(long /*int*/ pszFileName) { - return COM.VtblCall(7, address, pszFileName); + return OS.VtblCall(7, address, pszFileName); } public int GetCurFile(long /*int*/ [] ppszFileName){ - return COM.VtblCall(8, address, ppszFileName); + return OS.VtblCall(8, address, ppszFileName); } } diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/ole/win32/IPersistStorage.java b/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/ole/win32/IPersistStorage.java index 01146026c4..ed22b34034 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/ole/win32/IPersistStorage.java +++ b/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/ole/win32/IPersistStorage.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2000, 2012 IBM Corporation and others. + * Copyright (c) 2000, 2017 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -10,27 +10,29 @@ *******************************************************************************/ package org.eclipse.swt.internal.ole.win32; +import org.eclipse.swt.internal.win32.*; + public class IPersistStorage extends IPersist { public IPersistStorage(long /*int*/ address) { super(address); } public int IsDirty() { - return COM.VtblCall(4, address); + return OS.VtblCall(4, address); } public int InitNew(long /*int*/ pStg) { - return COM.VtblCall(5, address, pStg); + return OS.VtblCall(5, address, pStg); } public int Load(long /*int*/ pStg) { - return COM.VtblCall(6, address, pStg); + return OS.VtblCall(6, address, pStg); } public int Save(long /*int*/ pStgSave, boolean fSameAsLoad) { return COM.VtblCall(7, address, pStgSave, fSameAsLoad); } public int SaveCompleted(long /*int*/ pStgNew) { - return COM.VtblCall(8, address, pStgNew); + return OS.VtblCall(8, address, pStgNew); } public int HandsOffStorage(){ - return COM.VtblCall(9, address); + return OS.VtblCall(9, address); } } diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/ole/win32/IPersistStreamInit.java b/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/ole/win32/IPersistStreamInit.java index b85bd26116..a5800a3243 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/ole/win32/IPersistStreamInit.java +++ b/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/ole/win32/IPersistStreamInit.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2000, 2012 IBM Corporation and others. + * Copyright (c) 2000, 2017 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -10,6 +10,8 @@ *******************************************************************************/ package org.eclipse.swt.internal.ole.win32; +import org.eclipse.swt.internal.win32.*; + public class IPersistStreamInit extends IPersist { public IPersistStreamInit(long /*int*/ address) { @@ -17,10 +19,10 @@ public IPersistStreamInit(long /*int*/ address) { } public int Load(long /*int*/ pStm) { - return COM.VtblCall(5, address, pStm); + return OS.VtblCall(5, address, pStm); } public int InitNew() { - return COM.VtblCall(8, address); + return OS.VtblCall(8, address); } } diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/ole/win32/IProvideClassInfo.java b/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/ole/win32/IProvideClassInfo.java index c396eb7e36..97e9a4b614 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/ole/win32/IProvideClassInfo.java +++ b/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/ole/win32/IProvideClassInfo.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2000, 2012 IBM Corporation and others. + * Copyright (c) 2000, 2017 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -10,12 +10,14 @@ *******************************************************************************/ package org.eclipse.swt.internal.ole.win32; +import org.eclipse.swt.internal.win32.*; + public class IProvideClassInfo extends IUnknown { public IProvideClassInfo(long /*int*/ address) { super(address); } public int GetClassInfo(long /*int*/[] ppTI) { - return COM.VtblCall(3, address, ppTI); + return OS.VtblCall(3, address, ppTI); } } diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/ole/win32/IStorage.java b/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/ole/win32/IStorage.java index 6f176734d3..431abf937b 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/ole/win32/IStorage.java +++ b/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/ole/win32/IStorage.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2000, 2012 IBM Corporation and others. + * Copyright (c) 2000, 2017 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -10,13 +10,15 @@ *******************************************************************************/ package org.eclipse.swt.internal.ole.win32; +import org.eclipse.swt.internal.win32.*; + public class IStorage extends IUnknown { public IStorage(long /*int*/ address) { super(address); } public int Commit(int grfCommitFlag) { - return COM.VtblCall(9, address, grfCommitFlag); + return OS.VtblCall(9, address, grfCommitFlag); } public int CopyTo( int ciidExclude, //Number of elements in rgiidExclude @@ -69,7 +71,7 @@ public int DestroyElement(String pwcsName) { if (pwcsName != null) { buffer = (pwcsName+"\0").toCharArray(); } - return COM.VtblCall(12, address, buffer); + return OS.VtblCall(12, address, buffer); } public int EnumElements( int reserved1, //Reserved; must be zero @@ -78,7 +80,7 @@ public int EnumElements( long /*int*/[] ppenum //Pointer to output variable that // receives the IEnumSTATSTG interface ){ - return COM.VtblCall(11, address, reserved1, reserved2, reserved3, ppenum); + return OS.VtblCall(11, address, reserved1, reserved2, reserved3, ppenum); } public int OpenStorage( String pwcsName, //Pointer to the name of the @@ -139,7 +141,7 @@ public int RenameElement( return COM.VtblCall(13, address, buffer1, buffer2); } public int Revert() { - return COM.VtblCall(10, address); + return OS.VtblCall(10, address); } public int SetClass( GUID clsid //CLSID to be assigned to the storage object diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/ole/win32/IStream.java b/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/ole/win32/IStream.java index 3988077f61..0a863006b0 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/ole/win32/IStream.java +++ b/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/ole/win32/IStream.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2000, 2012 IBM Corporation and others. + * Copyright (c) 2000, 2017 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -10,6 +10,8 @@ *******************************************************************************/ package org.eclipse.swt.internal.ole.win32; +import org.eclipse.swt.internal.win32.*; + public class IStream extends IUnknown { public IStream(long /*int*/ address) { super(address); @@ -17,17 +19,17 @@ public IStream(long /*int*/ address) { public int Clone( long /*int*/[] ppstm //Pointer to location for pointer to the new stream object ){ - return COM.VtblCall(13, address, ppstm); + return OS.VtblCall(13, address, ppstm); } public int Commit( int grfCommitFlags //Specifies how changes are committed ){ - return COM.VtblCall(8, address, grfCommitFlags); + return OS.VtblCall(8, address, grfCommitFlags); } public int Read(long /*int*/ pv, int cb, int[] pcbWritten) { return COM.VtblCall(3, address, pv, cb, pcbWritten); } public int Revert(){ - return COM.VtblCall(9, address); + return OS.VtblCall(9, address); } public int Write(long /*int*/ pv, int cb, int[] pcbWritten) { return COM.VtblCall(4, address, pv, cb, pcbWritten); diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/ole/win32/ITypeInfo.java b/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/ole/win32/ITypeInfo.java index 8a1116ebe6..bd91c6bf5c 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/ole/win32/ITypeInfo.java +++ b/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/ole/win32/ITypeInfo.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2000, 2012 IBM Corporation and others. + * Copyright (c) 2000, 2017 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -11,7 +11,8 @@ package org.eclipse.swt.internal.ole.win32; -import org.eclipse.swt.internal.win32.OS; +import org.eclipse.swt.internal.*; +import org.eclipse.swt.internal.win32.*; public class ITypeInfo extends IUnknown { @@ -32,7 +33,7 @@ public int GetDocumentation(int index, String[] name, String[] docString, int[] if (size > 0){ // get the unicode character array from the global memory and create a String char[] buffer = new char[(size + 1) /2]; // add one to avoid rounding errors - COM.MoveMemory(buffer, pBstrName[0], size); + OS.MoveMemory(buffer, pBstrName[0], size); name[0] = new String(buffer); int subindex = name[0].indexOf("\0"); if (subindex > 0) @@ -45,7 +46,7 @@ public int GetDocumentation(int index, String[] name, String[] docString, int[] if (size > 0){ // get the unicode character array from the global memory and create a String char[] buffer = new char[(size + 1) /2]; // add one to avoid rounding errors - COM.MoveMemory(buffer, pBstrDocString[0], size); + OS.MoveMemory(buffer, pBstrDocString[0], size); docString[0] = new String(buffer); int subindex = docString[0].indexOf("\0"); if (subindex > 0) @@ -58,7 +59,7 @@ public int GetDocumentation(int index, String[] name, String[] docString, int[] if (size > 0){ // get the unicode character array from the global memory and create a String char[] buffer = new char[(size + 1) /2]; // add one to avoid rounding errors - COM.MoveMemory(buffer, pBstrHelpFile[0], size); + OS.MoveMemory(buffer, pBstrHelpFile[0], size); helpFile[0] = new String(buffer); int subindex = helpFile[0].indexOf("\0"); if (subindex > 0) @@ -69,7 +70,7 @@ public int GetDocumentation(int index, String[] name, String[] docString, int[] return rc; } public int GetFuncDesc(int index, long /*int*/[] ppFuncDesc) { - return COM.VtblCall(5, address, index, ppFuncDesc); + return OS.VtblCall(5, address, index, ppFuncDesc); } public int GetIDsOfNames(String[] rgszNames, int cNames, int[] pMemId) { @@ -78,7 +79,7 @@ public int GetIDsOfNames(String[] rgszNames, int cNames, int[] pMemId) { // create an array to hold the addresses long /*int*/ hHeap = OS.GetProcessHeap(); - long /*int*/ ppNames = OS.HeapAlloc(hHeap, OS.HEAP_ZERO_MEMORY, size * OS.PTR_SIZEOF); + long /*int*/ ppNames = OS.HeapAlloc(hHeap, OS.HEAP_ZERO_MEMORY, size * C.PTR_SIZEOF); long /*int*/[] memTracker = new long /*int*/[size]; try { @@ -93,7 +94,7 @@ public int GetIDsOfNames(String[] rgszNames, int cNames, int[] pMemId) { long /*int*/ pName = OS.HeapAlloc(hHeap, OS.HEAP_ZERO_MEMORY, buffer.length * 2); OS.MoveMemory(pName, buffer, buffer.length * 2); // copy the address to the array of addresses - COM.MoveMemory(ppNames + OS.PTR_SIZEOF * i, new long /*int*/[]{pName}, OS.PTR_SIZEOF); + OS.MoveMemory(ppNames + C.PTR_SIZEOF * i, new long /*int*/[]{pName}, C.PTR_SIZEOF); // keep track of the Global Memory so we can free it memTracker[i] = pName; } @@ -110,7 +111,7 @@ public int GetIDsOfNames(String[] rgszNames, int cNames, int[] pMemId) { } public int GetImplTypeFlags(int index, int[] pImplTypeFlags) { - return COM.VtblCall(9, address, index, pImplTypeFlags); + return OS.VtblCall(9, address, index, pImplTypeFlags); } public int GetNames(int memid, String[] names, int cMaxNames, int[] pcNames){ @@ -124,7 +125,7 @@ public int GetNames(int memid, String[] names, int cMaxNames, int[] pcNames){ if (size > 0){ // get the unicode character array from the global memory and create a String char[] buffer = new char[(size + 1) /2]; // add one to avoid rounding errors - COM.MoveMemory(buffer, rgBstrNames[i], size); + OS.MoveMemory(buffer, rgBstrNames[i], size); names[i] = new String(buffer); int subindex = names[i].indexOf("\0"); if (subindex > 0) @@ -137,24 +138,24 @@ public int GetNames(int memid, String[] names, int cMaxNames, int[] pcNames){ return rc; } public int GetRefTypeInfo(int hRefType, long /*int*/[] ppTInfo) { - return COM.VtblCall(14, address, hRefType, ppTInfo); + return OS.VtblCall(14, address, hRefType, ppTInfo); } public int GetRefTypeOfImplType(int index, int[] pRefType) { - return COM.VtblCall(8, address, index, pRefType); + return OS.VtblCall(8, address, index, pRefType); } public int GetTypeAttr(long /*int*/[] ppTypeAttr) { - return COM.VtblCall(3, address, ppTypeAttr); + return OS.VtblCall(3, address, ppTypeAttr); } public int GetVarDesc(int index, long /*int*/[] ppVarDesc ) { - return COM.VtblCall(6, address, index, ppVarDesc); + return OS.VtblCall(6, address, index, ppVarDesc); } public int ReleaseFuncDesc(long /*int*/ pFuncDesc ) { - return COM.VtblCall(20, address, pFuncDesc); + return OS.VtblCall(20, address, pFuncDesc); } public int ReleaseTypeAttr(long /*int*/ pTypeAttr) { - return COM.VtblCall(19, address, pTypeAttr); + return OS.VtblCall(19, address, pTypeAttr); } public int ReleaseVarDesc(long /*int*/ pVarDesc ) { - return COM.VtblCall(21, address, pVarDesc); + return OS.VtblCall(21, address, pVarDesc); } } diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/ole/win32/IUnknown.java b/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/ole/win32/IUnknown.java index b68b79587b..38fcf5c6b7 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/ole/win32/IUnknown.java +++ b/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/ole/win32/IUnknown.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2000, 2012 IBM Corporation and others. + * Copyright (c) 2000, 2017 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -10,6 +10,8 @@ *******************************************************************************/ package org.eclipse.swt.internal.ole.win32; +import org.eclipse.swt.internal.win32.*; + public class IUnknown { long /*int*/ address; @@ -17,7 +19,7 @@ public IUnknown(long /*int*/ address) { this.address = address; } public int AddRef() { - return COM.VtblCall(1, address); + return OS.VtblCall(1, address); } public long /*int*/ getAddress() { return address; @@ -26,6 +28,6 @@ public int QueryInterface(GUID riid, long /*int*/[] ppvObject) { return COM.VtblCall(0, address, riid, ppvObject); } public int Release() { - return COM.VtblCall(2, address); + return OS.VtblCall(2, address); } } diff --git a/bundles/org.eclipse.swt/Eclipse SWT WebKit/win32/org/eclipse/swt/browser/WebDownloadDelegate.java b/bundles/org.eclipse.swt/Eclipse SWT WebKit/win32/org/eclipse/swt/browser/WebDownloadDelegate.java index 94454d24d9..0287fabd17 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT WebKit/win32/org/eclipse/swt/browser/WebDownloadDelegate.java +++ b/bundles/org.eclipse.swt/Eclipse SWT WebKit/win32/org/eclipse/swt/browser/WebDownloadDelegate.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2010, 2016 IBM Corporation and others. + * Copyright (c) 2010, 2017 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -227,17 +227,17 @@ int QueryInterface (long /*int*/ riid, long /*int*/ ppvObject) { COM.MoveMemory (guid, riid, GUID.sizeof); if (COM.IsEqualGUID (guid, COM.IIDIUnknown)) { - COM.MoveMemory (ppvObject, new long /*int*/[] {iWebDownloadDelegate.getAddress ()}, OS.PTR_SIZEOF); + OS.MoveMemory (ppvObject, new long /*int*/[] {iWebDownloadDelegate.getAddress ()}, C.PTR_SIZEOF); new IUnknown (iWebDownloadDelegate.getAddress ()).AddRef (); return COM.S_OK; } if (COM.IsEqualGUID (guid, WebKit_win32.IID_IWebDownloadDelegate)) { - COM.MoveMemory (ppvObject, new long /*int*/[] {iWebDownloadDelegate.getAddress ()}, OS.PTR_SIZEOF); + OS.MoveMemory (ppvObject, new long /*int*/[] {iWebDownloadDelegate.getAddress ()}, C.PTR_SIZEOF); new IUnknown (iWebDownloadDelegate.getAddress ()).AddRef (); return COM.S_OK; } - COM.MoveMemory (ppvObject, new long /*int*/[] {0}, OS.PTR_SIZEOF); + OS.MoveMemory (ppvObject, new long /*int*/[] {0}, C.PTR_SIZEOF); return COM.E_NOINTERFACE; } diff --git a/bundles/org.eclipse.swt/Eclipse SWT WebKit/win32/org/eclipse/swt/browser/WebFrameLoadDelegate.java b/bundles/org.eclipse.swt/Eclipse SWT WebKit/win32/org/eclipse/swt/browser/WebFrameLoadDelegate.java index f233953e0e..f171c8422b 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT WebKit/win32/org/eclipse/swt/browser/WebFrameLoadDelegate.java +++ b/bundles/org.eclipse.swt/Eclipse SWT WebKit/win32/org/eclipse/swt/browser/WebFrameLoadDelegate.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2010, 2016 IBM Corporation and others. + * Copyright (c) 2010, 2017 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -122,11 +122,11 @@ void createCOMInterfaces () { /* Callbacks that take double parameters require custom callbacks that instead pass pointers to the doubles. */ long /*int*/ ppVtable = iWebFrameLoadDelegate.ppVtable; long /*int*/[] pVtable = new long /*int*/[1]; - COM.MoveMemory (pVtable, ppVtable, OS.PTR_SIZEOF); + OS.MoveMemory (pVtable, ppVtable, C.PTR_SIZEOF); long /*int*/[] funcs = new long /*int*/[17]; - COM.MoveMemory (funcs, pVtable[0], OS.PTR_SIZEOF * funcs.length); + OS.MoveMemory (funcs, pVtable[0], C.PTR_SIZEOF * funcs.length); funcs[12] = WebKit_win32.willPerformClientRedirectToURL_CALLBACK (funcs[12]); - COM.MoveMemory (pVtable[0], funcs, OS.PTR_SIZEOF * funcs.length); + OS.MoveMemory (pVtable[0], funcs, C.PTR_SIZEOF * funcs.length); } int didChangeLocationWithinPageForFrame (long /*int*/ webView, long /*int*/ frame) { @@ -528,17 +528,17 @@ int QueryInterface (long /*int*/ riid, long /*int*/ ppvObject) { COM.MoveMemory (guid, riid, GUID.sizeof); if (COM.IsEqualGUID (guid, COM.IIDIUnknown)) { - COM.MoveMemory (ppvObject, new long /*int*/[] {iWebFrameLoadDelegate.getAddress ()}, OS.PTR_SIZEOF); + OS.MoveMemory (ppvObject, new long /*int*/[] {iWebFrameLoadDelegate.getAddress ()}, C.PTR_SIZEOF); new IUnknown (iWebFrameLoadDelegate.getAddress ()).AddRef (); return COM.S_OK; } if (COM.IsEqualGUID (guid, WebKit_win32.IID_IWebFrameLoadDelegate)) { - COM.MoveMemory (ppvObject, new long /*int*/[] {iWebFrameLoadDelegate.getAddress ()}, OS.PTR_SIZEOF); + OS.MoveMemory (ppvObject, new long /*int*/[] {iWebFrameLoadDelegate.getAddress ()}, C.PTR_SIZEOF); new IUnknown (iWebFrameLoadDelegate.getAddress ()).AddRef (); return COM.S_OK; } - COM.MoveMemory (ppvObject, new long /*int*/[] {0}, OS.PTR_SIZEOF); + OS.MoveMemory (ppvObject, new long /*int*/[] {0}, C.PTR_SIZEOF); return COM.E_NOINTERFACE; } diff --git a/bundles/org.eclipse.swt/Eclipse SWT WebKit/win32/org/eclipse/swt/browser/WebKit.java b/bundles/org.eclipse.swt/Eclipse SWT WebKit/win32/org/eclipse/swt/browser/WebKit.java index 270b5b7b65..416d4e310a 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT WebKit/win32/org/eclipse/swt/browser/WebKit.java +++ b/bundles/org.eclipse.swt/Eclipse SWT WebKit/win32/org/eclipse/swt/browser/WebKit.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2010, 2016 IBM Corporation and others. + * Copyright (c) 2010, 2017 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -285,7 +285,7 @@ static String extractBSTR (long /*int*/ bstrString) { int size = COM.SysStringByteLen (bstrString); if (size == 0) return EMPTY_STRING; char[] buffer = new char[(size + 1) / 2]; // add one to avoid rounding errors - COM.MoveMemory (buffer, bstrString, size); + OS.MoveMemory (buffer, bstrString, size); return new String (buffer); } @@ -519,7 +519,7 @@ public void create (Composite parent, int style) { JSClassDefinition jsClassDefinition = new JSClassDefinition (); byte[] bytes = (CLASSNAME_EXTERNAL + '\0').getBytes (); jsClassDefinition.className = C.malloc (bytes.length); - OS.memmove (jsClassDefinition.className, bytes, bytes.length); + C.memmove (jsClassDefinition.className, bytes, bytes.length); /* custom callbacks for hasProperty, getProperty and callAsFunction */ long /*int*/ addr = WebKit_win32.JSObjectHasPropertyProc_CALLBACK (JSObjectHasPropertyProc.getAddress ()); diff --git a/bundles/org.eclipse.swt/Eclipse SWT WebKit/win32/org/eclipse/swt/browser/WebPolicyDelegate.java b/bundles/org.eclipse.swt/Eclipse SWT WebKit/win32/org/eclipse/swt/browser/WebPolicyDelegate.java index 2253c4c11e..964185fcfb 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT WebKit/win32/org/eclipse/swt/browser/WebPolicyDelegate.java +++ b/bundles/org.eclipse.swt/Eclipse SWT WebKit/win32/org/eclipse/swt/browser/WebPolicyDelegate.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2010, 2012 IBM Corporation and others. + * Copyright (c) 2010, 2017 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -162,17 +162,17 @@ int QueryInterface (long /*int*/ riid, long /*int*/ ppvObject) { COM.MoveMemory (guid, riid, GUID.sizeof); if (COM.IsEqualGUID (guid, COM.IIDIUnknown)) { - COM.MoveMemory (ppvObject, new long /*int*/[] {iWebPolicyDelegate.getAddress ()}, OS.PTR_SIZEOF); + OS.MoveMemory (ppvObject, new long /*int*/[] {iWebPolicyDelegate.getAddress ()}, C.PTR_SIZEOF); new IUnknown (iWebPolicyDelegate.getAddress ()).AddRef (); return COM.S_OK; } if (COM.IsEqualGUID (guid, WebKit_win32.IID_IWebPolicyDelegate)) { - COM.MoveMemory (ppvObject, new long /*int*/[] {iWebPolicyDelegate.getAddress ()}, OS.PTR_SIZEOF); + OS.MoveMemory (ppvObject, new long /*int*/[] {iWebPolicyDelegate.getAddress ()}, C.PTR_SIZEOF); new IUnknown (iWebPolicyDelegate.getAddress ()).AddRef (); return COM.S_OK; } - COM.MoveMemory (ppvObject, new long /*int*/[] {0}, OS.PTR_SIZEOF); + OS.MoveMemory (ppvObject, new long /*int*/[] {0}, C.PTR_SIZEOF); return COM.E_NOINTERFACE; } diff --git a/bundles/org.eclipse.swt/Eclipse SWT WebKit/win32/org/eclipse/swt/browser/WebResourceLoadDelegate.java b/bundles/org.eclipse.swt/Eclipse SWT WebKit/win32/org/eclipse/swt/browser/WebResourceLoadDelegate.java index 24ce25586a..cdaaeb5841 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT WebKit/win32/org/eclipse/swt/browser/WebResourceLoadDelegate.java +++ b/bundles/org.eclipse.swt/Eclipse SWT WebKit/win32/org/eclipse/swt/browser/WebResourceLoadDelegate.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2010, 2016 IBM Corporation and others. + * Copyright (c) 2010, 2017 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -220,11 +220,11 @@ int identifierForInitialRequest (long /*int*/ webView, long /*int*/ request, lon } new IWebFrame (mainFrame[0]).Release (); if (frame[0] == mainFrame[0]) { - long /*int*/ ptr = OS.malloc (8); + long /*int*/ ptr = C.malloc (8); iWebView.estimatedProgress (ptr); double[] estimate = new double[1]; OS.MoveMemory (estimate, ptr, 8); - OS.free (ptr); + C.free (ptr); int progress = (int)(estimate[0] * 100); ProgressEvent progressEvent = new ProgressEvent (browser); @@ -246,17 +246,17 @@ int QueryInterface (long /*int*/ riid, long /*int*/ ppvObject) { COM.MoveMemory (guid, riid, GUID.sizeof); if (COM.IsEqualGUID (guid, COM.IIDIUnknown)) { - COM.MoveMemory (ppvObject, new long /*int*/[] {iWebResourceLoadDelegate.getAddress ()}, OS.PTR_SIZEOF); + OS.MoveMemory (ppvObject, new long /*int*/[] {iWebResourceLoadDelegate.getAddress ()}, C.PTR_SIZEOF); new IUnknown (iWebResourceLoadDelegate.getAddress ()).AddRef (); return COM.S_OK; } if (COM.IsEqualGUID (guid, WebKit_win32.IID_IWebResourceLoadDelegate)) { - COM.MoveMemory (ppvObject, new long /*int*/[] {iWebResourceLoadDelegate.getAddress ()}, OS.PTR_SIZEOF); + OS.MoveMemory (ppvObject, new long /*int*/[] {iWebResourceLoadDelegate.getAddress ()}, C.PTR_SIZEOF); new IUnknown (iWebResourceLoadDelegate.getAddress ()).AddRef (); return COM.S_OK; } - COM.MoveMemory (ppvObject, new long /*int*/[] {0}, OS.PTR_SIZEOF); + OS.MoveMemory (ppvObject, new long /*int*/[] {0}, C.PTR_SIZEOF); return COM.E_NOINTERFACE; } diff --git a/bundles/org.eclipse.swt/Eclipse SWT WebKit/win32/org/eclipse/swt/browser/WebUIDelegate.java b/bundles/org.eclipse.swt/Eclipse SWT WebKit/win32/org/eclipse/swt/browser/WebUIDelegate.java index 0c5869b9ae..6d2dd707c1 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT WebKit/win32/org/eclipse/swt/browser/WebUIDelegate.java +++ b/bundles/org.eclipse.swt/Eclipse SWT WebKit/win32/org/eclipse/swt/browser/WebUIDelegate.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2010, 2014 IBM Corporation and others. + * Copyright (c) 2010, 2017 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -222,7 +222,7 @@ int createWebViewWithRequest (long /*int*/ sender, long /*int*/ request, long /* } if (browser != null && !browser.isDisposed ()) { iwebview = ((WebKit)browser.webBrowser).webView; - OS.MoveMemory (webView, new long /*int*/[] {iwebview.getAddress ()}, OS.PTR_SIZEOF); + OS.MoveMemory (webView, new long /*int*/[] {iwebview.getAddress ()}, C.PTR_SIZEOF); if (request != 0) { IWebURLRequest req = new IWebURLRequest (request); long /*int*/[] result = new long /*int*/[1]; @@ -373,17 +373,17 @@ int QueryInterface (long /*int*/ riid, long /*int*/ ppvObject) { COM.MoveMemory (guid, riid, GUID.sizeof); if (COM.IsEqualGUID (guid, COM.IIDIUnknown)) { - COM.MoveMemory (ppvObject, new long /*int*/[] {iWebUIDelegate.getAddress ()}, OS.PTR_SIZEOF); + OS.MoveMemory (ppvObject, new long /*int*/[] {iWebUIDelegate.getAddress ()}, C.PTR_SIZEOF); new IUnknown (iWebUIDelegate.getAddress ()).AddRef (); return COM.S_OK; } if (COM.IsEqualGUID (guid, WebKit_win32.IID_IWebUIDelegate)) { - COM.MoveMemory (ppvObject, new long /*int*/[] {iWebUIDelegate.getAddress ()}, OS.PTR_SIZEOF); + OS.MoveMemory (ppvObject, new long /*int*/[] {iWebUIDelegate.getAddress ()}, C.PTR_SIZEOF); new IUnknown (iWebUIDelegate.getAddress ()).AddRef (); return COM.S_OK; } - COM.MoveMemory (ppvObject, new long /*int*/[] {0}, OS.PTR_SIZEOF); + OS.MoveMemory (ppvObject, new long /*int*/[] {0}, C.PTR_SIZEOF); return COM.E_NOINTERFACE; } diff --git a/bundles/org.eclipse.swt/Eclipse SWT WebKit/win32/org/eclipse/swt/internal/webkit/IWebCookieManager.java b/bundles/org.eclipse.swt/Eclipse SWT WebKit/win32/org/eclipse/swt/internal/webkit/IWebCookieManager.java index 59c6aaf6e0..53c376b70b 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT WebKit/win32/org/eclipse/swt/internal/webkit/IWebCookieManager.java +++ b/bundles/org.eclipse.swt/Eclipse SWT WebKit/win32/org/eclipse/swt/internal/webkit/IWebCookieManager.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2010, 2012 IBM Corporation and others. + * Copyright (c) 2010, 2017 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -12,6 +12,7 @@ package org.eclipse.swt.internal.webkit; import org.eclipse.swt.internal.ole.win32.*; +import org.eclipse.swt.internal.win32.*; public class IWebCookieManager extends IUnknown { @@ -20,7 +21,7 @@ public IWebCookieManager (long /*int*/ address) { } public int cookieStorage (long /*int*/[] storage) { - return COM.VtblCall (3, getAddress (), storage); + return OS.VtblCall (3, getAddress (), storage); } } diff --git a/bundles/org.eclipse.swt/Eclipse SWT WebKit/win32/org/eclipse/swt/internal/webkit/IWebDataSource.java b/bundles/org.eclipse.swt/Eclipse SWT WebKit/win32/org/eclipse/swt/internal/webkit/IWebDataSource.java index 09993fa388..f1e50d3afc 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT WebKit/win32/org/eclipse/swt/internal/webkit/IWebDataSource.java +++ b/bundles/org.eclipse.swt/Eclipse SWT WebKit/win32/org/eclipse/swt/internal/webkit/IWebDataSource.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2010, 2012 IBM Corporation and others. + * Copyright (c) 2010, 2017 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -12,6 +12,7 @@ package org.eclipse.swt.internal.webkit; import org.eclipse.swt.internal.ole.win32.*; +import org.eclipse.swt.internal.win32.*; public class IWebDataSource extends IUnknown { @@ -20,19 +21,19 @@ public IWebDataSource (long /*int*/ address) { } public int representation (long /*int*/[] rep) { - return COM.VtblCall (5, getAddress (), rep); + return OS.VtblCall (5, getAddress (), rep); } public int webFrame (long /*int*/[] frame) { - return COM.VtblCall (6, getAddress (), frame); + return OS.VtblCall (6, getAddress (), frame); } public int request (long /*int*/[] request) { - return COM.VtblCall (8, getAddress (), request); + return OS.VtblCall (8, getAddress (), request); } public int pageTitle (long /*int*/[] title) { - return COM.VtblCall (12, getAddress (), title); + return OS.VtblCall (12, getAddress (), title); } } diff --git a/bundles/org.eclipse.swt/Eclipse SWT WebKit/win32/org/eclipse/swt/internal/webkit/IWebDocumentRepresentation.java b/bundles/org.eclipse.swt/Eclipse SWT WebKit/win32/org/eclipse/swt/internal/webkit/IWebDocumentRepresentation.java index e549d80f7c..aa549cd11e 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT WebKit/win32/org/eclipse/swt/internal/webkit/IWebDocumentRepresentation.java +++ b/bundles/org.eclipse.swt/Eclipse SWT WebKit/win32/org/eclipse/swt/internal/webkit/IWebDocumentRepresentation.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2010, 2012 IBM Corporation and others. + * Copyright (c) 2010, 2017 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -12,6 +12,7 @@ package org.eclipse.swt.internal.webkit; import org.eclipse.swt.internal.ole.win32.*; +import org.eclipse.swt.internal.win32.*; public class IWebDocumentRepresentation extends IUnknown { @@ -20,7 +21,7 @@ public IWebDocumentRepresentation (long /*int*/ address) { } public int documentSource (long /*int*/[] source) { - return COM.VtblCall (8, getAddress (), source); + return OS.VtblCall (8, getAddress (), source); } } diff --git a/bundles/org.eclipse.swt/Eclipse SWT WebKit/win32/org/eclipse/swt/internal/webkit/IWebDownload.java b/bundles/org.eclipse.swt/Eclipse SWT WebKit/win32/org/eclipse/swt/internal/webkit/IWebDownload.java index a3052e3d7b..68206032b7 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT WebKit/win32/org/eclipse/swt/internal/webkit/IWebDownload.java +++ b/bundles/org.eclipse.swt/Eclipse SWT WebKit/win32/org/eclipse/swt/internal/webkit/IWebDownload.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2010, 2012 IBM Corporation and others. + * Copyright (c) 2010, 2017 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -12,6 +12,7 @@ package org.eclipse.swt.internal.webkit; import org.eclipse.swt.internal.ole.win32.*; +import org.eclipse.swt.internal.win32.*; public class IWebDownload extends IUnknown { @@ -20,15 +21,15 @@ public IWebDownload (long /*int*/ address) { } public int cancel () { - return COM.VtblCall (4, getAddress ()); + return OS.VtblCall (4, getAddress ()); } public int setDeletesFileUponFailure (int deletesFileUponFailure) { - return COM.VtblCall (12, getAddress (), deletesFileUponFailure); + return OS.VtblCall (12, getAddress (), deletesFileUponFailure); } public int setDestination (long /*int*/ path, int allowOverwrite) { - return COM.VtblCall (13, getAddress(), path, allowOverwrite); + return OS.VtblCall (13, getAddress(), path, allowOverwrite); } } diff --git a/bundles/org.eclipse.swt/Eclipse SWT WebKit/win32/org/eclipse/swt/internal/webkit/IWebError.java b/bundles/org.eclipse.swt/Eclipse SWT WebKit/win32/org/eclipse/swt/internal/webkit/IWebError.java index a452d777a8..2876765f45 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT WebKit/win32/org/eclipse/swt/internal/webkit/IWebError.java +++ b/bundles/org.eclipse.swt/Eclipse SWT WebKit/win32/org/eclipse/swt/internal/webkit/IWebError.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2010, 2012 IBM Corporation and others. + * Copyright (c) 2010, 2017 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -12,6 +12,7 @@ package org.eclipse.swt.internal.webkit; import org.eclipse.swt.internal.ole.win32.*; +import org.eclipse.swt.internal.win32.*; public class IWebError extends IUnknown { @@ -20,7 +21,7 @@ public IWebError (long /*int*/ address) { } public int code (int[] result) { - return COM.VtblCall (4, getAddress (), result); + return OS.VtblCall (4, getAddress (), result); } //public int domain (long /*int*/[] result) { @@ -28,7 +29,7 @@ public int code (int[] result) { //} public int localizedDescription (long /*int*/[] result) { - return COM.VtblCall (6, getAddress (), result); + return OS.VtblCall (6, getAddress (), result); } //public int localizedFailureReason (long /*int*/[] result) { @@ -40,7 +41,7 @@ public int localizedDescription (long /*int*/[] result) { //} public int failingURL (long /*int*/[] result) { - return COM.VtblCall (12, getAddress (), result); + return OS.VtblCall (12, getAddress (), result); } } diff --git a/bundles/org.eclipse.swt/Eclipse SWT WebKit/win32/org/eclipse/swt/internal/webkit/IWebErrorPrivate.java b/bundles/org.eclipse.swt/Eclipse SWT WebKit/win32/org/eclipse/swt/internal/webkit/IWebErrorPrivate.java index 30d24a8770..493efc301e 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT WebKit/win32/org/eclipse/swt/internal/webkit/IWebErrorPrivate.java +++ b/bundles/org.eclipse.swt/Eclipse SWT WebKit/win32/org/eclipse/swt/internal/webkit/IWebErrorPrivate.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2010, 2012 IBM Corporation and others. + * Copyright (c) 2010, 2017 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -12,6 +12,7 @@ package org.eclipse.swt.internal.webkit; import org.eclipse.swt.internal.ole.win32.*; +import org.eclipse.swt.internal.win32.*; public class IWebErrorPrivate extends IUnknown { @@ -20,7 +21,7 @@ public IWebErrorPrivate (long /*int*/ address) { } public int sslPeerCertificate (long /*int*/[] result) { - return COM.VtblCall (3, getAddress (), result); + return OS.VtblCall (3, getAddress (), result); } } diff --git a/bundles/org.eclipse.swt/Eclipse SWT WebKit/win32/org/eclipse/swt/internal/webkit/IWebFrame.java b/bundles/org.eclipse.swt/Eclipse SWT WebKit/win32/org/eclipse/swt/internal/webkit/IWebFrame.java index 1dd5a6ba47..74d4a70b09 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT WebKit/win32/org/eclipse/swt/internal/webkit/IWebFrame.java +++ b/bundles/org.eclipse.swt/Eclipse SWT WebKit/win32/org/eclipse/swt/internal/webkit/IWebFrame.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2010, 2012 IBM Corporation and others. + * Copyright (c) 2010, 2017 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -12,6 +12,7 @@ package org.eclipse.swt.internal.webkit; import org.eclipse.swt.internal.ole.win32.*; +import org.eclipse.swt.internal.win32.*; public class IWebFrame extends IUnknown { @@ -20,19 +21,19 @@ public IWebFrame (long /*int*/ address) { } public int loadRequest (long /*int*/ request) { - return COM.VtblCall (8, getAddress (), request); + return OS.VtblCall (8, getAddress (), request); } public int loadHTMLString (long /*int*/ string, long /*int*/ baseURL) { - return COM.VtblCall (10, getAddress (), string, baseURL); + return OS.VtblCall (10, getAddress (), string, baseURL); } public int dataSource (long /*int*/[] source) { - return COM.VtblCall (13, getAddress (), source); + return OS.VtblCall (13, getAddress (), source); } public long /*int*/ globalContext () { - return COM.VtblCall (23, getAddress ()); + return OS.VtblCall (23, getAddress ()); } } diff --git a/bundles/org.eclipse.swt/Eclipse SWT WebKit/win32/org/eclipse/swt/internal/webkit/IWebFramePrivate.java b/bundles/org.eclipse.swt/Eclipse SWT WebKit/win32/org/eclipse/swt/internal/webkit/IWebFramePrivate.java index e0a604560d..379334b465 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT WebKit/win32/org/eclipse/swt/internal/webkit/IWebFramePrivate.java +++ b/bundles/org.eclipse.swt/Eclipse SWT WebKit/win32/org/eclipse/swt/internal/webkit/IWebFramePrivate.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2010, 2012 IBM Corporation and others. + * Copyright (c) 2010, 2017 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -12,6 +12,7 @@ package org.eclipse.swt.internal.webkit; import org.eclipse.swt.internal.ole.win32.*; +import org.eclipse.swt.internal.win32.*; public class IWebFramePrivate extends IUnknown { @@ -20,15 +21,15 @@ public IWebFramePrivate (long /*int*/ address) { } public int setInPrintingMode (int value, long /*int*/ printDC) { - return COM.VtblCall (8, getAddress (), value, printDC); + return OS.VtblCall (8, getAddress (), value, printDC); } public int getPrintedPageCount (long /*int*/ printDC, int[] pageCount) { - return COM.VtblCall (9, getAddress (), printDC, pageCount); + return OS.VtblCall (9, getAddress (), printDC, pageCount); } public int spoolPages (long /*int*/ printDC, int startPage, int endPage, long /*int*/[] ctx) { - return COM.VtblCall (10, getAddress (), printDC, startPage, endPage, ctx); + return OS.VtblCall (10, getAddress (), printDC, startPage, endPage, ctx); } } diff --git a/bundles/org.eclipse.swt/Eclipse SWT WebKit/win32/org/eclipse/swt/internal/webkit/IWebIBActions.java b/bundles/org.eclipse.swt/Eclipse SWT WebKit/win32/org/eclipse/swt/internal/webkit/IWebIBActions.java index a2c811ed87..4a87c06cdf 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT WebKit/win32/org/eclipse/swt/internal/webkit/IWebIBActions.java +++ b/bundles/org.eclipse.swt/Eclipse SWT WebKit/win32/org/eclipse/swt/internal/webkit/IWebIBActions.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2010, 2012 IBM Corporation and others. + * Copyright (c) 2010, 2017 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -12,6 +12,7 @@ package org.eclipse.swt.internal.webkit; import org.eclipse.swt.internal.ole.win32.*; +import org.eclipse.swt.internal.win32.*; public class IWebIBActions extends IUnknown { @@ -20,19 +21,19 @@ public IWebIBActions (long /*int*/ address) { } public int stopLoading (long /*int*/ sender) { - return COM.VtblCall (4, getAddress (), sender); + return OS.VtblCall (4, getAddress (), sender); } public int reload (long /*int*/ sender) { - return COM.VtblCall (5, getAddress (), sender); + return OS.VtblCall (5, getAddress (), sender); } public int canGoBack (long /*int*/ sender, int[] result) { - return COM.VtblCall (6, getAddress (), sender, result); + return OS.VtblCall (6, getAddress (), sender, result); } public int canGoForward (long /*int*/ sender, int[] result) { - return COM.VtblCall (8, getAddress (), sender, result); + return OS.VtblCall (8, getAddress (), sender, result); } } diff --git a/bundles/org.eclipse.swt/Eclipse SWT WebKit/win32/org/eclipse/swt/internal/webkit/IWebMutableURLRequest.java b/bundles/org.eclipse.swt/Eclipse SWT WebKit/win32/org/eclipse/swt/internal/webkit/IWebMutableURLRequest.java index 8bbadd45d8..cdf20a39a3 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT WebKit/win32/org/eclipse/swt/internal/webkit/IWebMutableURLRequest.java +++ b/bundles/org.eclipse.swt/Eclipse SWT WebKit/win32/org/eclipse/swt/internal/webkit/IWebMutableURLRequest.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2010, 2012 IBM Corporation and others. + * Copyright (c) 2010, 2017 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -11,7 +11,7 @@ package org.eclipse.swt.internal.webkit; -import org.eclipse.swt.internal.ole.win32.*; +import org.eclipse.swt.internal.win32.*; public class IWebMutableURLRequest extends IWebURLRequest { @@ -28,19 +28,19 @@ public IWebMutableURLRequest (long /*int*/ address) { //} public int setHTTPMethod (int post) { - return COM.VtblCall (23, getAddress (), post); + return OS.VtblCall (23, getAddress (), post); } public int setURL (long /*int*/ theUrl) { - return COM.VtblCall (27, getAddress (), theUrl); + return OS.VtblCall (27, getAddress (), theUrl); } public int setValue (long /*int*/ value, long /*int*/ field) { - return COM.VtblCall (28, getAddress (), value, field); + return OS.VtblCall (28, getAddress (), value, field); } public int setAllowsAnyHTTPSCertificate () { - return COM.VtblCall (29, getAddress ()); + return OS.VtblCall (29, getAddress ()); } } diff --git a/bundles/org.eclipse.swt/Eclipse SWT WebKit/win32/org/eclipse/swt/internal/webkit/IWebMutableURLRequestPrivate.java b/bundles/org.eclipse.swt/Eclipse SWT WebKit/win32/org/eclipse/swt/internal/webkit/IWebMutableURLRequestPrivate.java index 10d1bcd5c9..97aee514e7 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT WebKit/win32/org/eclipse/swt/internal/webkit/IWebMutableURLRequestPrivate.java +++ b/bundles/org.eclipse.swt/Eclipse SWT WebKit/win32/org/eclipse/swt/internal/webkit/IWebMutableURLRequestPrivate.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2010, 2012 IBM Corporation and others. + * Copyright (c) 2010, 2017 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -12,6 +12,7 @@ package org.eclipse.swt.internal.webkit; import org.eclipse.swt.internal.ole.win32.*; +import org.eclipse.swt.internal.win32.*; public class IWebMutableURLRequestPrivate extends IUnknown { @@ -24,7 +25,7 @@ public IWebMutableURLRequestPrivate (long /*int*/ address) { //} public int cfRequest () { - return COM.VtblCall (4, getAddress ()); + return OS.VtblCall (4, getAddress ()); } } diff --git a/bundles/org.eclipse.swt/Eclipse SWT WebKit/win32/org/eclipse/swt/internal/webkit/IWebOpenPanelResultListener.java b/bundles/org.eclipse.swt/Eclipse SWT WebKit/win32/org/eclipse/swt/internal/webkit/IWebOpenPanelResultListener.java index 34c02452cf..1a6488bb31 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT WebKit/win32/org/eclipse/swt/internal/webkit/IWebOpenPanelResultListener.java +++ b/bundles/org.eclipse.swt/Eclipse SWT WebKit/win32/org/eclipse/swt/internal/webkit/IWebOpenPanelResultListener.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2010, 2012 IBM Corporation and others. + * Copyright (c) 2010, 2017 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -11,6 +11,7 @@ package org.eclipse.swt.internal.webkit; import org.eclipse.swt.internal.ole.win32.*; +import org.eclipse.swt.internal.win32.*; public class IWebOpenPanelResultListener extends IUnknown { @@ -19,11 +20,11 @@ public IWebOpenPanelResultListener (long /*int*/ address) { } public int chooseFilename (long /*int*/ fileName) { - return COM.VtblCall (3, getAddress (), fileName); + return OS.VtblCall (3, getAddress (), fileName); } public int cancel () { - return COM.VtblCall (4, getAddress ()); + return OS.VtblCall (4, getAddress ()); } } diff --git a/bundles/org.eclipse.swt/Eclipse SWT WebKit/win32/org/eclipse/swt/internal/webkit/IWebPolicyDecisionListener.java b/bundles/org.eclipse.swt/Eclipse SWT WebKit/win32/org/eclipse/swt/internal/webkit/IWebPolicyDecisionListener.java index 1b9d6fdb06..3b3b427a68 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT WebKit/win32/org/eclipse/swt/internal/webkit/IWebPolicyDecisionListener.java +++ b/bundles/org.eclipse.swt/Eclipse SWT WebKit/win32/org/eclipse/swt/internal/webkit/IWebPolicyDecisionListener.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2010, 2012 IBM Corporation and others. + * Copyright (c) 2010, 2017 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -12,6 +12,7 @@ package org.eclipse.swt.internal.webkit; import org.eclipse.swt.internal.ole.win32.*; +import org.eclipse.swt.internal.win32.*; public class IWebPolicyDecisionListener extends IUnknown{ @@ -20,15 +21,15 @@ public IWebPolicyDecisionListener (long /*int*/ address) { } public int use () { - return COM.VtblCall (3, getAddress ()); + return OS.VtblCall (3, getAddress ()); } public int download () { - return COM.VtblCall (4, getAddress ()); + return OS.VtblCall (4, getAddress ()); } public int ignore () { - return COM.VtblCall (5, getAddress ()); + return OS.VtblCall (5, getAddress ()); } } diff --git a/bundles/org.eclipse.swt/Eclipse SWT WebKit/win32/org/eclipse/swt/internal/webkit/IWebPreferences.java b/bundles/org.eclipse.swt/Eclipse SWT WebKit/win32/org/eclipse/swt/internal/webkit/IWebPreferences.java index a68d4314e5..3f43947fea 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT WebKit/win32/org/eclipse/swt/internal/webkit/IWebPreferences.java +++ b/bundles/org.eclipse.swt/Eclipse SWT WebKit/win32/org/eclipse/swt/internal/webkit/IWebPreferences.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2010, 2012 IBM Corporation and others. + * Copyright (c) 2010, 2017 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -12,6 +12,7 @@ package org.eclipse.swt.internal.webkit; import org.eclipse.swt.internal.ole.win32.*; +import org.eclipse.swt.internal.win32.*; public class IWebPreferences extends IUnknown { @@ -24,23 +25,23 @@ public int initWithIdentifier (long /*int*/ identifier, long /*int*/[] preferenc } public int setJavaEnabled (int enabled) { - return COM.VtblCall (33, getAddress (), enabled); + return OS.VtblCall (33, getAddress (), enabled); } public int setJavaScriptEnabled (int enabled) { - return COM.VtblCall (35, getAddress (), enabled); + return OS.VtblCall (35, getAddress (), enabled); } public int setJavaScriptCanOpenWindowsAutomatically (int enabled) { - return COM.VtblCall (37, getAddress (), enabled); + return OS.VtblCall (37, getAddress (), enabled); } public int setTabsToLinks (int enabled) { - return COM.VtblCall (52, getAddress (), enabled); + return OS.VtblCall (52, getAddress (), enabled); } public int setFontSmoothing (int smoothingType) { - return COM.VtblCall (63, getAddress (), smoothingType); + return OS.VtblCall (63, getAddress (), smoothingType); } } diff --git a/bundles/org.eclipse.swt/Eclipse SWT WebKit/win32/org/eclipse/swt/internal/webkit/IWebURLAuthenticationChallenge.java b/bundles/org.eclipse.swt/Eclipse SWT WebKit/win32/org/eclipse/swt/internal/webkit/IWebURLAuthenticationChallenge.java index a54abd6baa..81a6147b97 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT WebKit/win32/org/eclipse/swt/internal/webkit/IWebURLAuthenticationChallenge.java +++ b/bundles/org.eclipse.swt/Eclipse SWT WebKit/win32/org/eclipse/swt/internal/webkit/IWebURLAuthenticationChallenge.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2010, 2012 IBM Corporation and others. + * Copyright (c) 2010, 2017 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -12,6 +12,7 @@ package org.eclipse.swt.internal.webkit; import org.eclipse.swt.internal.ole.win32.*; +import org.eclipse.swt.internal.win32.*; public class IWebURLAuthenticationChallenge extends IUnknown { @@ -20,19 +21,19 @@ public IWebURLAuthenticationChallenge (long /*int*/ address) { } public int previousFailureCount (int[] result) { - return COM.VtblCall (7, getAddress (), result); + return OS.VtblCall (7, getAddress (), result); } public int proposedCredential (long /*int*/[] result) { - return COM.VtblCall (8, getAddress (), result); + return OS.VtblCall (8, getAddress (), result); } public int protectionSpace (long /*int*/[] result) { - return COM.VtblCall (9, getAddress (), result); + return OS.VtblCall (9, getAddress (), result); } public int sender (long /*int*/[] sender) { - return COM.VtblCall (10, getAddress (), sender); + return OS.VtblCall (10, getAddress (), sender); } } diff --git a/bundles/org.eclipse.swt/Eclipse SWT WebKit/win32/org/eclipse/swt/internal/webkit/IWebURLAuthenticationChallengeSender.java b/bundles/org.eclipse.swt/Eclipse SWT WebKit/win32/org/eclipse/swt/internal/webkit/IWebURLAuthenticationChallengeSender.java index dc0139eb52..5019c2d514 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT WebKit/win32/org/eclipse/swt/internal/webkit/IWebURLAuthenticationChallengeSender.java +++ b/bundles/org.eclipse.swt/Eclipse SWT WebKit/win32/org/eclipse/swt/internal/webkit/IWebURLAuthenticationChallengeSender.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2010, 2012 IBM Corporation and others. + * Copyright (c) 2010, 2017 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -12,6 +12,7 @@ package org.eclipse.swt.internal.webkit; import org.eclipse.swt.internal.ole.win32.*; +import org.eclipse.swt.internal.win32.*; public class IWebURLAuthenticationChallengeSender extends IUnknown { @@ -20,11 +21,11 @@ public IWebURLAuthenticationChallengeSender (long /*int*/ address) { } public int cancelAuthenticationChallenge (long /*int*/ challenge) { - return COM.VtblCall (3, getAddress (), challenge); + return OS.VtblCall (3, getAddress (), challenge); } public int useCredential (long /*int*/ credential, long /*int*/ challenge) { - return COM.VtblCall (5, getAddress (), credential, challenge); + return OS.VtblCall (5, getAddress (), credential, challenge); } } diff --git a/bundles/org.eclipse.swt/Eclipse SWT WebKit/win32/org/eclipse/swt/internal/webkit/IWebURLCredential.java b/bundles/org.eclipse.swt/Eclipse SWT WebKit/win32/org/eclipse/swt/internal/webkit/IWebURLCredential.java index 9d7ddf5b46..577ce8fdd0 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT WebKit/win32/org/eclipse/swt/internal/webkit/IWebURLCredential.java +++ b/bundles/org.eclipse.swt/Eclipse SWT WebKit/win32/org/eclipse/swt/internal/webkit/IWebURLCredential.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2010, 2012 IBM Corporation and others. + * Copyright (c) 2010, 2017 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -12,6 +12,7 @@ package org.eclipse.swt.internal.webkit; import org.eclipse.swt.internal.ole.win32.*; +import org.eclipse.swt.internal.win32.*; public class IWebURLCredential extends IUnknown { @@ -20,19 +21,19 @@ public IWebURLCredential (long /*int*/ address) { } public int hasPassword (int[] result) { - return COM.VtblCall (3, getAddress (), result); + return OS.VtblCall (3, getAddress (), result); } public int initWithUser (long /*int*/ user, long /*int*/ password, long /*int*/ persistence) { - return COM.VtblCall (4, getAddress (), user, password, persistence); + return OS.VtblCall (4, getAddress (), user, password, persistence); } public int password (long /*int*/[] password) { - return COM.VtblCall (5, getAddress (), password); + return OS.VtblCall (5, getAddress (), password); } public int user (long /*int*/[] result) { - return COM.VtblCall (7, getAddress (), result); + return OS.VtblCall (7, getAddress (), result); } } diff --git a/bundles/org.eclipse.swt/Eclipse SWT WebKit/win32/org/eclipse/swt/internal/webkit/IWebURLProtectionSpace.java b/bundles/org.eclipse.swt/Eclipse SWT WebKit/win32/org/eclipse/swt/internal/webkit/IWebURLProtectionSpace.java index b174e5cc2b..0d339930e5 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT WebKit/win32/org/eclipse/swt/internal/webkit/IWebURLProtectionSpace.java +++ b/bundles/org.eclipse.swt/Eclipse SWT WebKit/win32/org/eclipse/swt/internal/webkit/IWebURLProtectionSpace.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2010, 2012 IBM Corporation and others. + * Copyright (c) 2010, 2017 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -12,6 +12,7 @@ package org.eclipse.swt.internal.webkit; import org.eclipse.swt.internal.ole.win32.*; +import org.eclipse.swt.internal.win32.*; public class IWebURLProtectionSpace extends IUnknown { @@ -20,15 +21,15 @@ public IWebURLProtectionSpace(long /*int*/ address) { } public int host (long /*int*/[] result) { - return COM.VtblCall (4, getAddress (), result); + return OS.VtblCall (4, getAddress (), result); } public int port (int[] result) { - return COM.VtblCall (8, getAddress (), result); + return OS.VtblCall (8, getAddress (), result); } public int realm (long /*int*/[] result) { - return COM.VtblCall (11, getAddress (), result); + return OS.VtblCall (11, getAddress (), result); } } diff --git a/bundles/org.eclipse.swt/Eclipse SWT WebKit/win32/org/eclipse/swt/internal/webkit/IWebURLRequest.java b/bundles/org.eclipse.swt/Eclipse SWT WebKit/win32/org/eclipse/swt/internal/webkit/IWebURLRequest.java index b143176e54..093c08cc46 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT WebKit/win32/org/eclipse/swt/internal/webkit/IWebURLRequest.java +++ b/bundles/org.eclipse.swt/Eclipse SWT WebKit/win32/org/eclipse/swt/internal/webkit/IWebURLRequest.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2010, 2012 IBM Corporation and others. + * Copyright (c) 2010, 2017 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -12,6 +12,7 @@ package org.eclipse.swt.internal.webkit; import org.eclipse.swt.internal.ole.win32.*; +import org.eclipse.swt.internal.win32.*; public class IWebURLRequest extends IUnknown { @@ -24,15 +25,15 @@ public IWebURLRequest (long /*int*/ address) { //} public int HTTPMethod (long /*int*/[] result) { - return COM.VtblCall (8, getAddress (), result); + return OS.VtblCall (8, getAddress (), result); } public int URL (long /*int*/[] result) { - return COM.VtblCall (13, getAddress (), result); + return OS.VtblCall (13, getAddress (), result); } public int mutableCopy (long /*int*/[] result) { - return COM.VtblCall (16, getAddress (), result); + return OS.VtblCall (16, getAddress (), result); } } diff --git a/bundles/org.eclipse.swt/Eclipse SWT WebKit/win32/org/eclipse/swt/internal/webkit/IWebURLResponse.java b/bundles/org.eclipse.swt/Eclipse SWT WebKit/win32/org/eclipse/swt/internal/webkit/IWebURLResponse.java index 0f5da54666..65e47c6548 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT WebKit/win32/org/eclipse/swt/internal/webkit/IWebURLResponse.java +++ b/bundles/org.eclipse.swt/Eclipse SWT WebKit/win32/org/eclipse/swt/internal/webkit/IWebURLResponse.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2010, 2012 IBM Corporation and others. + * Copyright (c) 2010, 2017 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -12,6 +12,7 @@ package org.eclipse.swt.internal.webkit; import org.eclipse.swt.internal.ole.win32.*; +import org.eclipse.swt.internal.win32.*; public class IWebURLResponse extends IUnknown { @@ -20,11 +21,11 @@ public IWebURLResponse (long /*int*/ address) { } public int expectedContentLength (long[] result) { - return COM.VtblCall (3, getAddress (), result); + return OS.VtblCall (3, getAddress (), result); } public int URL (long /*int*/[] result) { - return COM.VtblCall (8, getAddress (), result); + return OS.VtblCall (8, getAddress (), result); } } diff --git a/bundles/org.eclipse.swt/Eclipse SWT WebKit/win32/org/eclipse/swt/internal/webkit/IWebView.java b/bundles/org.eclipse.swt/Eclipse SWT WebKit/win32/org/eclipse/swt/internal/webkit/IWebView.java index 4b396bf4ce..6487d6fd0a 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT WebKit/win32/org/eclipse/swt/internal/webkit/IWebView.java +++ b/bundles/org.eclipse.swt/Eclipse SWT WebKit/win32/org/eclipse/swt/internal/webkit/IWebView.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2010, 2012 IBM Corporation and others. + * Copyright (c) 2010, 2017 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -21,7 +21,7 @@ public IWebView (long /*int*/ address) { } public int canShowMIMEType (long /*int*/ mimeType, int[] canShow) { - return COM.VtblCall (3, getAddress (), mimeType, canShow); + return OS.VtblCall (3, getAddress (), mimeType, canShow); } public int initWithFrame (RECT frame, long /*int*/ frameName, long /*int*/ groupName) { @@ -29,59 +29,59 @@ public int initWithFrame (RECT frame, long /*int*/ frameName, long /*int*/ group } public int setUIDelegate (long /*int*/ delegate) { - return COM.VtblCall (10, getAddress (), delegate); + return OS.VtblCall (10, getAddress (), delegate); } public int setResourceLoadDelegate (long /*int*/ delegate) { - return COM.VtblCall (12, getAddress (), delegate); + return OS.VtblCall (12, getAddress (), delegate); } public int setDownloadDelegate (long /*int*/ delegate) { - return COM.VtblCall (14, getAddress (), delegate); + return OS.VtblCall (14, getAddress (), delegate); } public int setFrameLoadDelegate (long /*int*/ delegate) { - return COM.VtblCall (16, getAddress (), delegate); + return OS.VtblCall (16, getAddress (), delegate); } public int setPolicyDelegate (long /*int*/ delegate) { - return COM.VtblCall (18, getAddress (), delegate); + return OS.VtblCall (18, getAddress (), delegate); } public int mainFrame (long /*int*/[] frame) { - return COM.VtblCall (20, getAddress (), frame); + return OS.VtblCall (20, getAddress (), frame); } public int goBack (int[] succeeded) { - return COM.VtblCall (24, getAddress(), succeeded); + return OS.VtblCall (24, getAddress(), succeeded); } public int goForward (int[] succeeded) { - return COM.VtblCall (25, getAddress(), succeeded); + return OS.VtblCall (25, getAddress(), succeeded); } public int setCustomUserAgent (long /*int*/ valueString) { - return COM.VtblCall (31, getAddress (), valueString); + return OS.VtblCall (31, getAddress (), valueString); } public int setPreferences (long /*int*/ prefs) { - return COM.VtblCall (41, getAddress (), prefs); + return OS.VtblCall (41, getAddress (), prefs); } public int preferences (long /*int*/[] prefs) { - return COM.VtblCall (42, getAddress (), prefs); + return OS.VtblCall (42, getAddress (), prefs); } public int setHostWindow (long /*int*/ window) { - return COM.VtblCall (45, getAddress (), window); + return OS.VtblCall (45, getAddress (), window); } public int hostWindow (long /*int*/[] window) { - return COM.VtblCall (46, getAddress (), window); + return OS.VtblCall (46, getAddress (), window); } public int estimatedProgress (long /*int*/ estimatedProgress) { - return COM.VtblCall (51, getAddress (), estimatedProgress); + return OS.VtblCall (51, getAddress (), estimatedProgress); } } diff --git a/bundles/org.eclipse.swt/Eclipse SWT WebKit/win32/org/eclipse/swt/internal/webkit/IWebViewPrivate.java b/bundles/org.eclipse.swt/Eclipse SWT WebKit/win32/org/eclipse/swt/internal/webkit/IWebViewPrivate.java index ca6b092e52..5904462d45 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT WebKit/win32/org/eclipse/swt/internal/webkit/IWebViewPrivate.java +++ b/bundles/org.eclipse.swt/Eclipse SWT WebKit/win32/org/eclipse/swt/internal/webkit/IWebViewPrivate.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2010, 2012 IBM Corporation and others. + * Copyright (c) 2010, 2017 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -12,6 +12,7 @@ package org.eclipse.swt.internal.webkit; import org.eclipse.swt.internal.ole.win32.*; +import org.eclipse.swt.internal.win32.*; public class IWebViewPrivate extends IUnknown { @@ -20,15 +21,15 @@ public IWebViewPrivate (long /*int*/ address) { } public int viewWindow (long /*int*/[] window) { - return COM.VtblCall (5, getAddress (), window); + return OS.VtblCall (5, getAddress (), window); } public int setInitialFocus (int forwardEnabled) { - return COM.VtblCall (28, getAddress (), forwardEnabled); + return OS.VtblCall (28, getAddress (), forwardEnabled); } public int shouldClose (int[] result) { - return COM.VtblCall (33, getAddress (), result); + return OS.VtblCall (33, getAddress (), result); } } diff --git a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/graphics/Device.java b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/graphics/Device.java index b7cbc52ed8..b301e337bd 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/graphics/Device.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/graphics/Device.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2000, 2016 IBM Corporation and others. + * Copyright (c) 2000, 2017 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -715,7 +715,7 @@ protected void init () { int [] piNumScripts = new int [1]; OS.ScriptGetProperties (ppSp, piNumScripts); scripts = new long /*int*/ [piNumScripts [0]]; - OS.MoveMemory (scripts, ppSp [0], scripts.length * OS.PTR_SIZEOF); + OS.MoveMemory (scripts, ppSp [0], scripts.length * C.PTR_SIZEOF); } /* diff --git a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/graphics/Image.java b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/graphics/Image.java index 93474be89a..950a761148 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/graphics/Image.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/graphics/Image.java @@ -817,7 +817,7 @@ void initNative(String filename) { * when loading GIF files in 64-bit Windows. The fix is to not use * GDI+ image loading in this case. */ - if (gdip && OS.PTR_SIZEOF == 8 && filename.toLowerCase().endsWith(".gif")) gdip = false; + if (gdip && C.PTR_SIZEOF == 8 && filename.toLowerCase().endsWith(".gif")) gdip = false; /* * Bug in GDI+. Bitmap.LockBits() fails to load GIF files in * Windows 7 when the image has a position offset in the first frame. diff --git a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/graphics/TextLayout.java b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/graphics/TextLayout.java index 011b443883..4293a2cda7 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/graphics/TextLayout.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/graphics/TextLayout.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2000, 2015 IBM Corporation and others. + * Copyright (c) 2000, 2017 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -1096,7 +1096,7 @@ RECT drawRunTextGDIP(long /*int*/ graphics, StyleItem run, RECT rect, long /*int } int[] advances = new int[run.glyphCount]; float[] points = new float[run.glyphCount * 2]; - OS.memmove(advances, run.justify != 0 ? run.justify : run.advances, run.glyphCount * 4); + C.memmove(advances, run.justify != 0 ? run.justify : run.advances, run.glyphCount * 4); int glyphX = drawX; for (int h = 0, j = 0; h < advances.length; h++) { points[j++] = glyphX; @@ -3372,7 +3372,7 @@ boolean shape (long /*int*/ hdc, StyleItem run, char[] chars, int[] glyphCount, if (run.psc != 0) { OS.ScriptFreeCache(run.psc); glyphCount[0] = 0; - OS.MoveMemory(run.psc, new long /*int*/ [1], OS.PTR_SIZEOF); + OS.MoveMemory(run.psc, new long /*int*/ [1], C.PTR_SIZEOF); } return false; } @@ -3397,7 +3397,7 @@ boolean shape (long /*int*/ hdc, StyleItem run, char[] chars, int[] glyphCount, if (run.psc != 0) { OS.ScriptFreeCache(run.psc); glyphCount[0] = 0; - OS.MoveMemory(run.psc, new long /*int*/ [1], OS.PTR_SIZEOF); + OS.MoveMemory(run.psc, new long /*int*/ [1], C.PTR_SIZEOF); } run.glyphCount = 0; return false; @@ -3421,7 +3421,7 @@ void shape (final long /*int*/ hdc, final StyleItem run) { if (run.clusters == 0) SWT.error(SWT.ERROR_NO_HANDLES); run.visAttrs = OS.HeapAlloc(hHeap, OS.HEAP_ZERO_MEMORY, maxGlyphs * SCRIPT_VISATTR_SIZEOF); if (run.visAttrs == 0) SWT.error(SWT.ERROR_NO_HANDLES); - run.psc = OS.HeapAlloc(hHeap, OS.HEAP_ZERO_MEMORY, OS.PTR_SIZEOF); + run.psc = OS.HeapAlloc(hHeap, OS.HEAP_ZERO_MEMORY, C.PTR_SIZEOF); if (run.psc == 0) SWT.error(SWT.ERROR_NO_HANDLES); final short script = run.analysis.eScript; final SCRIPT_PROPERTIES sp = new SCRIPT_PROPERTIES(); diff --git a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Combo.java b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Combo.java index 86f8b86573..4664cadf3f 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Combo.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Combo.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2000, 2016 IBM Corporation and others. + * Copyright (c) 2000, 2017 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -2806,7 +2806,7 @@ long /*int*/ windowProc (long /*int*/ hwnd, int msg, long /*int*/ wParam, long / case OS.CB_FINDSTRINGEXACT: if (lParam != 0 && (hooks (SWT.Segments) || filters (SWT.Segments) || ((state & HAS_AUTO_DIRECTION) != 0))) { long /*int*/ code = OS.CB_ERR; - int length = OS.IsUnicode ? OS.wcslen (lParam) : OS.strlen (lParam); + int length = OS.IsUnicode ? OS.wcslen (lParam) : C.strlen (lParam); TCHAR buffer = new TCHAR (getCodePage (), length); OS.MoveMemory (buffer, lParam, buffer.length () * TCHAR.sizeof); String string = buffer.toString (0, length); @@ -3169,7 +3169,7 @@ LRESULT wmClipboard (long /*int*/ hwndText, int msg, long /*int*/ wParam, long / case OS.WM_SETTEXT: if (lockText) return null; end [0] = OS.GetWindowTextLength (hwndText); - int length = OS.IsUnicode ? OS.wcslen (lParam) : OS.strlen (lParam); + int length = OS.IsUnicode ? OS.wcslen (lParam) : C.strlen (lParam); TCHAR buffer = new TCHAR (getCodePage (), length); int byteCount = buffer.length () * TCHAR.sizeof; OS.MoveMemory (buffer, lParam, byteCount); diff --git a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/DirectoryDialog.java b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/DirectoryDialog.java index f299207d2c..6c7b65fc82 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/DirectoryDialog.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/DirectoryDialog.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2000, 2012 IBM Corporation and others. + * Copyright (c) 2000, 2017 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -11,9 +11,9 @@ package org.eclipse.swt.widgets; +import org.eclipse.swt.*; import org.eclipse.swt.internal.*; import org.eclipse.swt.internal.win32.*; -import org.eclipse.swt.*; /** * Instances of this class allow the user to navigate @@ -100,7 +100,7 @@ long /*int*/ BrowseCallbackProc (long /*int*/ hwnd, long /*int*/ uMsg, long /*in case OS.BFFM_VALIDATEFAILEDA: case OS.BFFM_VALIDATEFAILEDW: /* Use the character encoding for the default locale */ - int length = OS.IsUnicode ? OS.wcslen (lParam) : OS.strlen (lParam); + int length = OS.IsUnicode ? OS.wcslen (lParam) : C.strlen (lParam); TCHAR buffer = new TCHAR (0, length); int byteCount = buffer.length () * TCHAR.sizeof; OS.MoveMemory (buffer, lParam, byteCount); diff --git a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Display.java b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Display.java index 0b1698bdd6..c3e4211baa 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Display.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Display.java @@ -3467,7 +3467,7 @@ String getSharedData(int pid, int handle) { long /*int*/ sharedData = OS.MapViewOfFile(mapHandle[0], OS.FILE_MAP_READ, 0, 0, 0); if (sharedData == 0) return null; - int length = OS.IsUnicode ? OS.wcslen (sharedData) : OS.strlen (sharedData); + int length = OS.IsUnicode ? OS.wcslen (sharedData) : C.strlen (sharedData); TCHAR buffer = new TCHAR (0, length); int byteCount = buffer.length () * TCHAR.sizeof; OS.MoveMemory (buffer, sharedData, byteCount); @@ -3680,7 +3680,7 @@ public boolean post (Event event) { long /*int*/ pInputs = OS.HeapAlloc (hHeap, OS.HEAP_ZERO_MEMORY, INPUT.sizeof); OS.MoveMemory(pInputs, new int[] {OS.INPUT_KEYBOARD}, 4); //TODO - DWORD type of INPUT structure aligned to 8 bytes on 64 bit - OS.MoveMemory (pInputs + OS.PTR_SIZEOF, inputs, KEYBDINPUT.sizeof); + OS.MoveMemory (pInputs + C.PTR_SIZEOF, inputs, KEYBDINPUT.sizeof); boolean result = OS.SendInput (1, pInputs, INPUT.sizeof) != 0; OS.HeapFree (hHeap, 0, pInputs); return result; @@ -3746,7 +3746,7 @@ public boolean post (Event event) { long /*int*/ pInputs = OS.HeapAlloc (hHeap, OS.HEAP_ZERO_MEMORY, INPUT.sizeof); OS.MoveMemory(pInputs, new int[] {OS.INPUT_MOUSE}, 4); //TODO - DWORD type of INPUT structure aligned to 8 bytes on 64 bit - OS.MoveMemory (pInputs + OS.PTR_SIZEOF, inputs, MOUSEINPUT.sizeof); + OS.MoveMemory (pInputs + C.PTR_SIZEOF, inputs, MOUSEINPUT.sizeof); boolean result = OS.SendInput (1, pInputs, INPUT.sizeof) != 0; OS.HeapFree (hHeap, 0, pInputs); return result; diff --git a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/TaskBar.java b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/TaskBar.java index 2bb053072c..a039a0a731 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/TaskBar.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/TaskBar.java @@ -149,7 +149,7 @@ long /*int*/ createShellLink (MenuItem item, String directory) { titlePtr = OS.HeapAlloc (hHeap, OS.HEAP_ZERO_MEMORY, buffer.length * 2); OS.MoveMemory (titlePtr, buffer, buffer.length * 2); OS.MoveMemory (pv, new short [] {OS.VT_LPWSTR}, 2); - OS.MoveMemory (pv + 8, new long /*int*/ [] {titlePtr}, OS.PTR_SIZEOF); + OS.MoveMemory (pv + 8, new long /*int*/ [] {titlePtr}, C.PTR_SIZEOF); key = PKEY_Title; /*IShellLink::SetPath*/ |