Win32 (Part 10): Changing API's coordinate system from Pixels to Points.
- Updated Combo, Canvas, Composite, Display classes
- Moved DPIUtil to Internal package.

Change-Id: Ia0e8d3867173131c82752fe2865dbb9cd020c660
Signed-off-by: Niraj Modi <niraj.modi@in.ibm.com>
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 63c33e8..c7f6d3a 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
@@ -329,7 +329,7 @@
 	Menu menu = browser.getMenu();
 	if (menu != null && !menu.isDisposed ()) {
 		if (pt.x != event.x || pt.y != event.y) {
-			menu.setLocation (event.x, event.y);
+			menu.setLocationInPixels (event.x, event.y);
 		}
 		menu.setVisible (true);
 		return COM.S_OK;
diff --git a/bundles/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/CCombo.java b/bundles/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/CCombo.java
index ee9193a..b17e095 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/CCombo.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/CCombo.java
@@ -1037,7 +1037,7 @@
 	getAccessible().addAccessibleControlListener (new AccessibleControlAdapter() {
 		@Override
 		public void getChildAtPoint (AccessibleControlEvent e) {
-			Point testPoint = toControl (e.x, e.y);
+			Point testPoint = toControlInPixels (e.x, e.y);
 			if (getBoundsInPixels ().contains (testPoint)) {
 				e.childID = ACC.CHILDID_SELF;
 			}
@@ -1046,7 +1046,7 @@
 		@Override
 		public void getLocation (AccessibleControlEvent e) {
 			Rectangle location = getBoundsInPixels ();
-			Point pt = getParent().toDisplay (location.x, location.y);
+			Point pt = getParent().toDisplayInPixels (location.x, location.y);
 			e.x = pt.x;
 			e.y = pt.y;
 			e.width = location.width;
@@ -1143,7 +1143,7 @@
 			 * show it again. To prevent the popup from showing again, we will detect
 			 * this case and let the selection event of the arrow button hide the popup.
 			 */
-			Point point = arrow.toControl(getDisplay().getCursorLocationInPixels());
+			Point point = arrow.toControlInPixels(getDisplay().getCursorLocationInPixels());
 			Point size = arrow.getSizeInPixels();
 			Rectangle rect = new Rectangle(0, 0, size.x, size.y);
 			if (rect.contains(point)) {
diff --git a/bundles/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/CTabFolder.java b/bundles/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/CTabFolder.java
index db56d5b..6eef8be 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/CTabFolder.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/CTabFolder.java
@@ -14,6 +14,7 @@
 import org.eclipse.swt.accessibility.*;
 import org.eclipse.swt.events.*;
 import org.eclipse.swt.graphics.*;
+import org.eclipse.swt.internal.*;
 import org.eclipse.swt.widgets.*;
 
 /**
@@ -1406,7 +1407,7 @@
 	accessible.addAccessibleControlListener(new AccessibleControlAdapter() {
 		@Override
 		public void getChildAtPoint(AccessibleControlEvent e) {
-			Point testPoint = toControl(e.x, e.y);
+			Point testPoint = toControlInPixels(e.x, e.y);
 			int childID = ACC.CHILDID_NONE;
 			for (int i = 0; i < items.length; i++) {
 				if (items[i].getBoundsInPixels().contains(testPoint)) {
@@ -1432,13 +1433,13 @@
 			int childID = e.childID;
 			if (childID == ACC.CHILDID_SELF) {
 				location = getBoundsInPixels();
-				pt = getParent().toDisplay(location.x, location.y);
+				pt = getParent().toDisplayInPixels(location.x, location.y);
 			} else {
 				if (childID >= 0 && childID < items.length && items[childID].showing) {
 					location = items[childID].getBoundsInPixels();
 				}
 				if (location != null) {
-					pt = toDisplay(location.x, location.y);
+					pt = toDisplayInPixels(location.x, location.y);
 				}
 			}
 			if (location != null && pt != null) {
@@ -3671,7 +3672,7 @@
 	int x = rect.x;
 	int y = rect.y + rect.height;
 	Point location = getDisplay().mapInPixels(this, null, x, y);
-	showMenu.setLocation(location.x, location.y);
+	showMenu.setLocationInPixels(location.x, location.y);
 	showMenu.setVisible(true);
 }
 /**
@@ -3777,7 +3778,7 @@
 	changed |= showChevron != oldShowChevron;
 	if (changed && getToolTipText() != null) {
 		Point pt = getDisplay().getCursorLocationInPixels();
-		pt = toControl(pt);
+		pt = toControlInPixels(pt);
 		_setToolTipText(pt.x, pt.y);
 	}
 	gc.dispose();
diff --git a/bundles/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/CTabItem.java b/bundles/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/CTabItem.java
index 37a93b8..41c72c8 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/CTabItem.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/CTabItem.java
@@ -13,6 +13,7 @@
 
 import org.eclipse.swt.*;
 import org.eclipse.swt.graphics.*;
+import org.eclipse.swt.internal.*;
 import org.eclipse.swt.widgets.*;
 
 /**
diff --git a/bundles/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/StyledText.java b/bundles/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/StyledText.java
index 758fb99..f54ca00 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/StyledText.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/StyledText.java
@@ -6154,7 +6154,7 @@
 		}
 		if (y < endY) {
 			gc.setBackground(background);
-			drawBackground(gc, 0, y, clientAreaWidth, endY - y);
+			drawBackgroundInPixels(gc, 0, y, clientAreaWidth, endY - y);
 		}
 	}
 	if (blockSelection && blockXLocation != -1) {
@@ -6172,16 +6172,16 @@
 	// fill the margin background
 	gc.setBackground(marginColor != null ? marginColor : background);
 	if (topMargin > 0) {
-		drawBackground(gc, 0, 0, clientAreaWidth, topMargin);
+		drawBackgroundInPixels(gc, 0, 0, clientAreaWidth, topMargin);
 	}
 	if (bottomMargin > 0) {
-		drawBackground(gc, 0, clientAreaHeight - bottomMargin, clientAreaWidth, bottomMargin);
+		drawBackgroundInPixels(gc, 0, clientAreaHeight - bottomMargin, clientAreaWidth, bottomMargin);
 	}
 	if (leftMargin - alignmentMargin > 0) {
-		drawBackground(gc, 0, 0, leftMargin - alignmentMargin, clientAreaHeight);
+		drawBackgroundInPixels(gc, 0, 0, leftMargin - alignmentMargin, clientAreaHeight);
 	}
 	if (rightMargin > 0) {
-		drawBackground(gc, clientAreaWidth - rightMargin, 0, rightMargin, clientAreaHeight);
+		drawBackgroundInPixels(gc, clientAreaWidth - rightMargin, 0, rightMargin, clientAreaHeight);
 	}
 }
 /**
diff --git a/bundles/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/StyledTextRenderer.java b/bundles/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/StyledTextRenderer.java
index f96580c..66098bd 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/StyledTextRenderer.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/StyledTextRenderer.java
@@ -374,7 +374,7 @@
 		gc.fillRectangleInPixels(client.x, paintY, client.width, height);
 	} else {
 		gc.setBackground(widgetBackground);
-		styledText.drawBackground(gc, client.x, paintY, client.width, height);
+		styledText.drawBackgroundInPixels(gc, client.x, paintY, client.width, height);
 	}
 	gc.setForeground(widgetForeground);
 	if (selectionStart == selectionEnd || (selectionEnd <= 0 && selectionStart > lineLength - 1)) {
diff --git a/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/common/org/eclipse/swt/dnd/DropTargetEffect.java b/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/common/org/eclipse/swt/dnd/DropTargetEffect.java
index 06f4496..8cc6a3c 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/common/org/eclipse/swt/dnd/DropTargetEffect.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/common/org/eclipse/swt/dnd/DropTargetEffect.java
@@ -97,7 +97,7 @@
 
 	Widget getItem(Table table, int x, int y) {
 		Point coordinates = new Point(x, y);
-		coordinates = table.toControl(coordinates);
+		coordinates = table.toControlInPixels(coordinates);
 		TableItem item = table.getItem(coordinates);
 		if (item != null) return item;
 		Rectangle area = table.getClientAreaInPixels();
@@ -116,7 +116,7 @@
 
 	Widget getItem(Tree tree, int x, int y) {
 		Point point = new Point(x, y);
-		point = tree.toControl(point);
+		point = tree.toControlInPixels(point);
 		TreeItem item = tree.getItem(point);
 		if (item == null) {
 			Rectangle area = tree.getClientAreaInPixels();
diff --git a/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/win32/org/eclipse/swt/dnd/TableDropTargetEffect.java b/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/win32/org/eclipse/swt/dnd/TableDropTargetEffect.java
index 6eb6b28..287ea12 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/win32/org/eclipse/swt/dnd/TableDropTargetEffect.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/win32/org/eclipse/swt/dnd/TableDropTargetEffect.java
@@ -151,7 +151,7 @@
 		int effect = checkEffect(event.feedback);
 		long /*int*/ handle = table.handle;
 		Point coordinates = new Point(event.x, event.y);
-		coordinates = table.toControl(coordinates);
+		coordinates = table.toControlInPixels(coordinates);
 		LVHITTESTINFO pinfo = new LVHITTESTINFO();
 		pinfo.x = coordinates.x;
 		pinfo.y = coordinates.y;
diff --git a/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/win32/org/eclipse/swt/dnd/TreeDropTargetEffect.java b/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/win32/org/eclipse/swt/dnd/TreeDropTargetEffect.java
index 16897d9..8c24c1c 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/win32/org/eclipse/swt/dnd/TreeDropTargetEffect.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/win32/org/eclipse/swt/dnd/TreeDropTargetEffect.java
@@ -162,7 +162,7 @@
 		int effect = checkEffect(event.feedback);
 		long /*int*/ handle = tree.handle;
 		Point coordinates = new Point(event.x, event.y);
-		coordinates = tree.toControl(coordinates);
+		coordinates = tree.toControlInPixels(coordinates);
 		TVHITTESTINFO lpht = new TVHITTESTINFO ();
 		lpht.x = coordinates.x;
 		lpht.y = coordinates.y;
diff --git a/bundles/org.eclipse.swt/Eclipse SWT Mozilla/common/org/eclipse/swt/browser/Mozilla.java b/bundles/org.eclipse.swt/Eclipse SWT Mozilla/common/org/eclipse/swt/browser/Mozilla.java
index edd816a..732760c 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT Mozilla/common/org/eclipse/swt/browser/Mozilla.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT Mozilla/common/org/eclipse/swt/browser/Mozilla.java
@@ -4702,7 +4702,7 @@
 	Menu menu = browser.getMenu ();
 	if (menu != null && !menu.isDisposed ()) {
 		if (aScreenX[0] != event.x || aScreenY[0] != event.y) {
-			menu.setLocation (event.x, event.y);
+			menu.setLocationInPixels (event.x, event.y);
 		}
 		menu.setVisible (true);
 	}
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 af8f998..059aff0 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
@@ -57,7 +57,7 @@
 		Menu menu = browser.getMenu ();
 		if (menu != null && !menu.isDisposed ()) {
 			if (event.x != pt.x || event.y != pt.y) {
-				menu.setLocation (event.x, event.y);
+				menu.setLocationInPixels (event.x, event.y);
 			}
 			menu.setVisible (true);
 		} else {
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/graphics/DPIUtil.java b/bundles/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/internal/DPIUtil.java
similarity index 91%
rename from bundles/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/graphics/DPIUtil.java
rename to bundles/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/internal/DPIUtil.java
index 0adbb9c..91e24b1 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/graphics/DPIUtil.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/internal/DPIUtil.java
@@ -8,9 +8,10 @@
  * Contributors:
  *     IBM Corporation - initial API and implementation
  *******************************************************************************/
-package org.eclipse.swt.graphics;
+package org.eclipse.swt.internal;
 
 import org.eclipse.swt.*;
+import org.eclipse.swt.graphics.*;
 
 /**
  * This class hold common constants and utility functions w.r.t. to SWT high DPI
@@ -180,18 +181,18 @@
 /**
  * Returns an <code>ImageData</code> for specified zoom.
  */
-static ImageData getImageData (Image image, int source_zoom, int target_zoom) {
+public static ImageData getImageData (Image image, int source_zoom, int target_zoom) {
 	if (source_zoom == target_zoom) return image.getImageDataInPixels ();
 	ImageData imageData = null;
-	if (image.imageDataProvider != null) {
+	if (image.getImageDataProvider() != null) {
 		boolean[] found = new boolean[1];
-		imageData = DPIUtil.validateAndGetImageDataAtZoom (image.imageDataProvider, target_zoom, found);
+		imageData = DPIUtil.validateAndGetImageDataAtZoom (image.getImageDataProvider(), target_zoom, found);
 		if (!found[0]) {
 			imageData = DPIUtil.autoScaleImageData (imageData, target_zoom, 100);
 		}
-	} else if (image.imageFileNameProvider != null) {
+	} else if (image.getImageFileNameProvider() != null) {
 		boolean[] found = new boolean[1];
-		String filename = DPIUtil.validateAndGetImagePathAtZoom (image.imageFileNameProvider, target_zoom, found);
+		String filename = DPIUtil.validateAndGetImagePathAtZoom (image.getImageFileNameProvider(), target_zoom, found);
 		if (!found[0]) {
 			imageData = DPIUtil.autoScaleImageData (new ImageData(filename), target_zoom, 100);
 		} else {
@@ -236,7 +237,7 @@
  *
  * @return zoom
  */
-static int mapDPIToZoom (int dpi) {
+public static int mapDPIToZoom (int dpi) {
 	int zoom;
 	if (dpi >= DPI_ZOOM_200) {
 		zoom = 200;
@@ -250,7 +251,7 @@
 /**
  * Returns a new rectangle as per the scaleFactor.
  */
-static Rectangle scale (Rectangle rect, int targetZoom, int currentZoom) {
+public static Rectangle scale (Rectangle rect, int targetZoom, int currentZoom) {
 	if (rect == null || targetZoom == currentZoom) return rect;
 	float scaleFactor = ((float)targetZoom) / (float)currentZoom;
 	Rectangle returnRect = new Rectangle (0,0,0,0);
@@ -266,7 +267,7 @@
  * fall-back to 100% image. If provider or fall-back image is not available,
  * throw error.
  */
-static ImageData validateAndGetImageDataAtZoom (ImageDataProvider provider, int zoom, boolean[] found) {
+public static ImageData validateAndGetImageDataAtZoom (ImageDataProvider provider, int zoom, boolean[] found) {
 	if (provider == null) SWT.error (SWT.ERROR_NULL_ARGUMENT);
 	ImageData data = provider.getImageData (zoom);
 	found [0] = (data != null);
@@ -281,7 +282,7 @@
  * fall-back to 100% image. If provider or fall-back image is not available,
  * throw error.
  */
-static String validateAndGetImagePathAtZoom (ImageFileNameProvider provider, int zoom, boolean[] found) {
+public static String validateAndGetImagePathAtZoom (ImageFileNameProvider provider, int zoom, boolean[] found) {
 	if (provider == null) SWT.error (SWT.ERROR_NULL_ARGUMENT);
 	String filename = provider.getImagePath (zoom);
 	found [0] = (filename != null);
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/layout/GridData.java b/bundles/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/layout/GridData.java
index 547bd5b..f40e7f7 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/layout/GridData.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/layout/GridData.java
@@ -91,7 +91,7 @@
 	 *
 	 * The default value is SWT.DEFAULT.
 	 *
-	 * @see Control#computeSizeInPixels(int, int, boolean)
+	 * @see Control#computeSize(int, int, boolean)
 	 */
 	public int widthHint = SWT.DEFAULT;
 
@@ -102,7 +102,7 @@
 	 *
 	 * The default value is SWT.DEFAULT.
 	 *
-	 * @see Control#computeSizeInPixels(int, int, boolean)
+	 * @see Control#computeSize(int, int, boolean)
 	 */
 	public int heightHint = SWT.DEFAULT;
 
@@ -212,7 +212,7 @@
 	 * The default value is 0.
 	 *
 	 * @since 3.1
-	 * @see Control#computeSizeInPixels(int, int, boolean)
+	 * @see Control#computeSize(int, int, boolean)
 	 * @see GridData#widthHint
 	 */
 	public int minimumWidth = 0;
@@ -227,7 +227,7 @@
 	 * The default value is 0.
 	 *
 	 * @since 3.1
-	 * @see Control#computeSizeInPixels(int, int, boolean)
+	 * @see Control#computeSize(int, int, boolean)
 	 * @see GridData#heightHint
 	 */
 	public int minimumHeight = 0;
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/layout/RowData.java b/bundles/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/layout/RowData.java
index 6ba21a5..ac61ac1 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/layout/RowData.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/layout/RowData.java
@@ -41,7 +41,7 @@
 	 *
 	 * The default value is SWT.DEFAULT.
 	 *
-	 * @see org.eclipse.swt.widgets.Control#computeSizeInPixels(int, int, boolean)
+	 * @see org.eclipse.swt.widgets.Control#computeSize(int, int, boolean)
 	 */
 	public int width = SWT.DEFAULT;
 	/**
@@ -51,7 +51,7 @@
 	 *
 	 * The default value is SWT.DEFAULT.
 	 *
-	 * @see org.eclipse.swt.widgets.Control#computeSizeInPixels(int, int, boolean)
+	 * @see org.eclipse.swt.widgets.Control#computeSize(int, int, boolean)
 	 */
 	public int height = SWT.DEFAULT;
 
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/graphics/GC.java b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/graphics/GC.java
index d7bc59b..bf25f95 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/graphics/GC.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/graphics/GC.java
@@ -12,6 +12,7 @@
 
 
 import org.eclipse.swt.*;
+import org.eclipse.swt.internal.*;
 import org.eclipse.swt.internal.gdip.*;
 import org.eclipse.swt.internal.win32.*;
 
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 3b2ffe6..3b3afc9 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
@@ -14,6 +14,7 @@
 import java.io.*;
 
 import org.eclipse.swt.*;
+import org.eclipse.swt.internal.*;
 import org.eclipse.swt.internal.gdip.*;
 import org.eclipse.swt.internal.win32.*;
 
@@ -126,12 +127,12 @@
 	/**
 	 * ImageFileNameProvider to provide file names at various Zoom levels
 	 */
-	ImageFileNameProvider imageFileNameProvider;
+	private ImageFileNameProvider imageFileNameProvider;
 
 	/**
 	 * ImageDataProvider to provide ImageData at various Zoom levels
 	 */
-	ImageDataProvider imageDataProvider;
+	private ImageDataProvider imageDataProvider;
 
 	/**
 	 * Attribute to cache current device zoom level
@@ -1829,6 +1830,22 @@
 }
 
 /**
+* @return the imageDataProvider
+* @since 3.105
+*/
+public ImageDataProvider getImageDataProvider() {
+	return imageDataProvider;
+}
+
+/**
+* @return the imageFileNameProvider
+* @since 3.105
+*/
+public ImageFileNameProvider getImageFileNameProvider() {
+	return imageFileNameProvider;
+}
+
+/**
  * Returns an integer hash code for the receiver. Any two
  * objects that return <code>true</code> when passed to
 =======
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/graphics/Path.java b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/graphics/Path.java
index 934170f..ff310b9 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/graphics/Path.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/graphics/Path.java
@@ -11,6 +11,7 @@
 package org.eclipse.swt.graphics;
 
 import org.eclipse.swt.*;
+import org.eclipse.swt.internal.*;
 import org.eclipse.swt.internal.gdip.*;
 import org.eclipse.swt.internal.win32.*;
 
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/graphics/Region.java b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/graphics/Region.java
index 90cea3d..24c582b 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/graphics/Region.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/graphics/Region.java
@@ -12,6 +12,7 @@
 
 
 import org.eclipse.swt.*;
+import org.eclipse.swt.internal.*;
 import org.eclipse.swt.internal.win32.*;
 
 /**
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Canvas.java b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Canvas.java
index ee818a4..972d92f 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Canvas.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Canvas.java
@@ -13,6 +13,7 @@
 
 import org.eclipse.swt.*;
 import org.eclipse.swt.graphics.*;
+import org.eclipse.swt.internal.*;
 import org.eclipse.swt.internal.win32.*;
 
 /**
@@ -110,7 +111,18 @@
  * @since 3.2
  */
 public void drawBackground (GC gc, int x, int y, int width, int height) {
-	drawBackground(gc, x, y, width, height, 0, 0);
+	x = DPIUtil.autoScaleUp(x);
+	y = DPIUtil.autoScaleUp(y);
+	width = DPIUtil.autoScaleUp(width);
+	height = DPIUtil.autoScaleUp(height);
+	drawBackgroundInPixels(gc, x, y, width, height);
+}
+
+/**
+* @noreference This method is not intended to be referenced by clients.
+*/
+public void drawBackgroundInPixels (GC gc, int x, int y, int width, int height) {
+	drawBackgroundInPixels(gc, x, y, width, height, 0, 0);
 }
 
 /**
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Caret.java b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Caret.java
index 6b76610..c566702 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Caret.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Caret.java
@@ -13,6 +13,7 @@
 
 import org.eclipse.swt.*;
 import org.eclipse.swt.graphics.*;
+import org.eclipse.swt.internal.*;
 import org.eclipse.swt.internal.win32.*;
 
 /**
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 75db967..6742877 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
@@ -947,6 +947,12 @@
  * @since 3.8
  */
 public Point getCaretLocation () {
+	return DPIUtil.autoScaleDown(getCaretLocationInPixels());
+}
+/**
+* @noreference This method is not intended to be referenced by clients.
+*/
+public Point getCaretLocationInPixels () {
 	checkWidget ();
 	/*
 	* Bug in Windows.  For some reason, Windows is unable
@@ -1390,6 +1396,12 @@
  * </ul>
  */
 public int getTextHeight () {
+	return DPIUtil.autoScaleDown(getTextHeightInPixels());
+}
+/**
+* @noreference This method is not intended to be referenced by clients.
+*/
+public int getTextHeightInPixels () {
 	checkWidget ();
 	COMBOBOXINFO pcbi = new COMBOBOXINFO ();
 	pcbi.cbSize = COMBOBOXINFO.sizeof;
@@ -2005,7 +2017,7 @@
 	*/
 	if ((style & SWT.DROP_DOWN) != 0) {
 		int visibleCount = getItemCount() == 0 ? VISIBLE_COUNT : this.visibleCount;
-		height = getTextHeight () + (getItemHeightInPixels () * visibleCount) + 2;
+		height = getTextHeightInPixels () + (getItemHeightInPixels () * visibleCount) + 2;
 		/*
 		* Feature in Windows.  When a drop down combo box is resized,
 		* the combo box resizes the height of the text field and uses
@@ -2271,6 +2283,12 @@
  * </ul>
  */
 public void setSelection (Point selection) {
+	setSelectionInPixels(DPIUtil.autoScaleUp(selection));
+}
+/**
+* @noreference This method is not intended to be referenced by clients.
+*/
+public void setSelectionInPixels (Point selection) {
 	checkWidget ();
 	if (selection == null) error (SWT.ERROR_NULL_ARGUMENT);
 	int start = translateOffset (selection.x), end = translateOffset (selection.y);
@@ -2491,7 +2509,7 @@
 		RECT rect = new RECT ();
 		OS.SendMessage (handle, OS.CB_GETDROPPEDCONTROLRECT, 0, rect);
 		int visibleCount = getItemCount() == 0 ? VISIBLE_COUNT : this.visibleCount;
-		int height = getTextHeight () + (getItemHeightInPixels () * visibleCount) + 2;
+		int height = getTextHeightInPixels () + (getItemHeightInPixels () * visibleCount) + 2;
 		if (height != (rect.bottom - rect.top)) {
 			forceResize ();
 			OS.GetWindowRect (handle, rect);
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Composite.java b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Composite.java
index bf8351a..8da009c 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Composite.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Composite.java
@@ -365,7 +365,19 @@
  *
  * @since 3.6
  */
-public void drawBackground(GC gc, int x, int y, int width, int height, int offsetX, int offsetY) {
+public void drawBackground (GC gc, int x, int y, int width, int height, int offsetX, int offsetY) {
+	x = DPIUtil.autoScaleUp(x);
+	y = DPIUtil.autoScaleUp(y);
+	width = DPIUtil.autoScaleUp(width);
+	height = DPIUtil.autoScaleUp(height);
+	offsetX = DPIUtil.autoScaleUp(offsetX);
+	offsetY = DPIUtil.autoScaleUp(offsetY);
+	drawBackgroundInPixels(gc, x, y, width, height, offsetX, offsetY);
+}
+/**
+* @noreference This method is not intended to be referenced by clients.
+*/
+public void drawBackgroundInPixels(GC gc, int x, int y, int width, int height, int offsetX, int offsetY) {
 	checkWidget ();
 	if (gc == null) error (SWT.ERROR_NULL_ARGUMENT);
 	if (gc.isDisposed ()) error (SWT.ERROR_INVALID_ARGUMENT);
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Control.java b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Control.java
index 691f997..33a7fc5 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Control.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Control.java
@@ -16,6 +16,7 @@
 import org.eclipse.swt.accessibility.*;
 import org.eclipse.swt.events.*;
 import org.eclipse.swt.graphics.*;
+import org.eclipse.swt.internal.*;
 import org.eclipse.swt.internal.gdip.*;
 import org.eclipse.swt.internal.win32.*;
 
@@ -2977,7 +2978,7 @@
 	Event event = new Event ();
 	int type = 0;
 	Point globalPt = new Point(gi.x, gi.y);
-	Point point = toControl(globalPt);
+	Point point = toControlInPixels(globalPt);
 	event.x = point.x;
 	event.y = point.y;
 	switch (gi.dwID) {
@@ -4032,6 +4033,12 @@
  * @since 2.1
  */
 public Point toControl (int x, int y) {
+	return DPIUtil.autoScaleDown(toControlInPixels(DPIUtil.autoScaleUp(x), DPIUtil.autoScaleUp(y)));
+}
+/**
+* @noreference This method is not intended to be referenced by clients.
+*/
+public Point toControlInPixels (int x, int y) {
 	checkWidget ();
 	POINT pt = new POINT ();
 	pt.x = x;  pt.y = y;
@@ -4060,9 +4067,15 @@
  * </ul>
  */
 public Point toControl (Point point) {
+	return DPIUtil.autoScaleDown(toControlInPixels(DPIUtil.autoScaleUp(point)));
+}
+/**
+* @noreference This method is not intended to be referenced by clients.
+*/
+public Point toControlInPixels (Point point) {
 	checkWidget ();
 	if (point == null) error (SWT.ERROR_NULL_ARGUMENT);
-	return toControl (point.x, point.y);
+	return toControlInPixels (point.x, point.y);
 }
 
 /**
@@ -4086,6 +4099,12 @@
  * @since 2.1
  */
 public Point toDisplay (int x, int y) {
+	return DPIUtil.autoScaleDown(toDisplayInPixels(DPIUtil.autoScaleUp(x), DPIUtil.autoScaleUp(y)));
+}
+/**
+* @noreference This method is not intended to be referenced by clients.
+*/
+public Point toDisplayInPixels (int x, int y) {
 	checkWidget ();
 	POINT pt = new POINT ();
 	pt.x = x;  pt.y = y;
@@ -4114,9 +4133,15 @@
  * </ul>
  */
 public Point toDisplay (Point point) {
+	return DPIUtil.autoScaleDown(toDisplayInPixels(DPIUtil.autoScaleUp(point)));
+}
+/**
+* @noreference This method is not intended to be referenced by clients.
+*/
+public Point toDisplayInPixels (Point point) {
 	checkWidget ();
 	if (point == null) error (SWT.ERROR_NULL_ARGUMENT);
-	return toDisplay (point.x, point.y);
+	return toDisplayInPixels (point.x, point.y);
 }
 
 long /*int*/ topHandle () {
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/ExpandBar.java b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/ExpandBar.java
index a7b5168..de6695f 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/ExpandBar.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/ExpandBar.java
@@ -13,6 +13,7 @@
 import org.eclipse.swt.*;
 import org.eclipse.swt.events.*;
 import org.eclipse.swt.graphics.*;
+import org.eclipse.swt.internal.*;
 import org.eclipse.swt.internal.win32.*;
 
 /**
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/ExpandItem.java b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/ExpandItem.java
index 96b6df9..8b64cfa 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/ExpandItem.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/ExpandItem.java
@@ -12,6 +12,7 @@
 
 import org.eclipse.swt.*;
 import org.eclipse.swt.graphics.*;
+import org.eclipse.swt.internal.*;
 import org.eclipse.swt.internal.win32.*;
 
 /**
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/List.java b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/List.java
index 17ce785..2d91231 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/List.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/List.java
@@ -1563,7 +1563,7 @@
 		y = Math.max (y, rect.bottom);
 		y = Math.min (y, clientArea.y + clientArea.height);
 	}
-	Point pt = toDisplay (x, y);
+	Point pt = toDisplayInPixels (x, y);
 	event.x = pt.x;
 	event.y = pt.y;
 }
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Menu.java b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Menu.java
index b4aaa45..1193d7b 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Menu.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Menu.java
@@ -1445,6 +1445,12 @@
  * </ul>
  */
 public void setLocation (int x, int y) {
+	setLocationInPixels(DPIUtil.autoScaleUp(x), DPIUtil.autoScaleUp(y));
+}
+/**
+* @noreference This method is not intended to be referenced by clients.
+*/
+public void setLocationInPixels (int x, int y) {
 	checkWidget ();
 	if ((style & (SWT.BAR | SWT.DROP_DOWN)) != 0) return;
 	this.x = x;
@@ -1477,9 +1483,16 @@
  * @since 2.1
  */
 public void setLocation (Point location) {
+	setLocationInPixels(DPIUtil.autoScaleUp(location));
+}
+
+/**
+* @noreference This method is not intended to be referenced by clients.
+*/
+public void setLocationInPixels (Point location) {
 	checkWidget ();
 	if (location == null) error (SWT.ERROR_NULL_ARGUMENT);
-	setLocation (location.x, location.y);
+	setLocationInPixels (location.x, location.y);
 }
 
 /**
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/ScrollBar.java b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/ScrollBar.java
index 1882531..2bc4c1d 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/ScrollBar.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/ScrollBar.java
@@ -14,6 +14,7 @@
 import org.eclipse.swt.*;
 import org.eclipse.swt.events.*;
 import org.eclipse.swt.graphics.*;
+import org.eclipse.swt.internal.*;
 import org.eclipse.swt.internal.win32.*;
 
 /**
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Scrollable.java b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Scrollable.java
index 7c86834..2abf438 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Scrollable.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Scrollable.java
@@ -13,6 +13,7 @@
 
 import org.eclipse.swt.*;
 import org.eclipse.swt.graphics.*;
+import org.eclipse.swt.internal.*;
 import org.eclipse.swt.internal.win32.*;
 
 /**
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Shell.java b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Shell.java
index 297b3e6..a618680 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Shell.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Shell.java
@@ -14,6 +14,7 @@
 import org.eclipse.swt.*;
 import org.eclipse.swt.events.*;
 import org.eclipse.swt.graphics.*;
+import org.eclipse.swt.internal.*;
 import org.eclipse.swt.internal.win32.*;
 
 /**
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/TabItem.java b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/TabItem.java
index 61741c2..339a001 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/TabItem.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/TabItem.java
@@ -13,6 +13,7 @@
 
 import org.eclipse.swt.*;
 import org.eclipse.swt.graphics.*;
+import org.eclipse.swt.internal.*;
 import org.eclipse.swt.internal.win32.*;
 
 /**
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Table.java b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Table.java
index 115b45e..6db3763 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Table.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Table.java
@@ -5735,7 +5735,7 @@
 		y = Math.max (y, bounds.y + bounds.height);
 		y = Math.min (y, clientArea.y + clientArea.height);
 	}
-	Point pt = toDisplay (x, y);
+	Point pt = toDisplayInPixels (x, y);
 	event.x = pt.x;
 	event.y = pt.y;
 }
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/TableColumn.java b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/TableColumn.java
index 34ac667..5c1dc5c 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/TableColumn.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/TableColumn.java
@@ -14,6 +14,7 @@
 import org.eclipse.swt.*;
 import org.eclipse.swt.events.*;
 import org.eclipse.swt.graphics.*;
+import org.eclipse.swt.internal.*;
 import org.eclipse.swt.internal.win32.*;
 
 /**
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/TableItem.java b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/TableItem.java
index 358a3de..66f7690 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/TableItem.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/TableItem.java
@@ -13,6 +13,7 @@
 
 import org.eclipse.swt.*;
 import org.eclipse.swt.graphics.*;
+import org.eclipse.swt.internal.*;
 import org.eclipse.swt.internal.win32.*;
 
 /**
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/ToolTip.java b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/ToolTip.java
index 20f8448..01939f1 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/ToolTip.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/ToolTip.java
@@ -14,6 +14,7 @@
 import org.eclipse.swt.*;
 import org.eclipse.swt.events.*;
 import org.eclipse.swt.graphics.*;
+import org.eclipse.swt.internal.*;
 import org.eclipse.swt.internal.win32.*;
 
 /**
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Tree.java b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Tree.java
index 5b190e8..fa3b60c 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Tree.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Tree.java
@@ -5667,7 +5667,7 @@
 		y = Math.max (y, bounds.y + bounds.height);
 		y = Math.min (y, clientArea.y + clientArea.height);
 	}
-	Point pt = toDisplay (x, y);
+	Point pt = toDisplayInPixels (x, y);
 	event.x = pt.x;
 	event.y = pt.y;
 }
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/TreeColumn.java b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/TreeColumn.java
index 779b195..d72dd76 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/TreeColumn.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/TreeColumn.java
@@ -14,6 +14,7 @@
 import org.eclipse.swt.*;
 import org.eclipse.swt.events.*;
 import org.eclipse.swt.graphics.*;
+import org.eclipse.swt.internal.*;
 import org.eclipse.swt.internal.win32.*;
 
 /**
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/TreeItem.java b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/TreeItem.java
index 8d11ee0..096fd7e 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/TreeItem.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/TreeItem.java
@@ -13,6 +13,7 @@
 
 import org.eclipse.swt.*;
 import org.eclipse.swt.graphics.*;
+import org.eclipse.swt.internal.*;
 import org.eclipse.swt.internal.win32.*;
 
 /**
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Widget.java b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Widget.java
index 15ef21a..bee7d7f 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Widget.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Widget.java
@@ -1510,7 +1510,7 @@
 	Menu menu = getMenu ();
 	if (menu != null && !menu.isDisposed ()) {
 		if (x != event.x || y != event.y) {
-			menu.setLocation (event.x, event.y);
+			menu.setLocationInPixels (event.x, event.y);
 		}
 		menu.setVisible (true);
 		return true;
diff --git a/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_graphics_Image.java b/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_graphics_Image.java
index a15fabd..fc5ff6d 100644
--- a/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_graphics_Image.java
+++ b/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_graphics_Image.java
@@ -28,7 +28,6 @@
 import org.eclipse.swt.SWT;
 import org.eclipse.swt.SWTException;
 import org.eclipse.swt.graphics.Color;
-import org.eclipse.swt.graphics.DPIUtil;
 import org.eclipse.swt.graphics.GC;
 import org.eclipse.swt.graphics.Image;
 import org.eclipse.swt.graphics.ImageData;
@@ -37,6 +36,7 @@
 import org.eclipse.swt.graphics.PaletteData;
 import org.eclipse.swt.graphics.RGB;
 import org.eclipse.swt.graphics.Rectangle;
+import org.eclipse.swt.internal.DPIUtil;
 import org.eclipse.swt.widgets.Display;
 import org.junit.Before;
 import org.junit.Test;