Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNiraj Modi2015-03-09 14:17:15 +0000
committerSravan Kumar Lakkimsetti2015-03-13 12:37:14 +0000
commit79e7c4fe0f14367c5662ef7afc7953cfdeeb5a08 (patch)
tree3030e11fe00ad3c8ff07e961930d2311246b5794 /bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt
parent8de1ac9db91bb43b6bd0099ed55c1ebbf15558ad (diff)
downloadeclipse.platform.swt-79e7c4fe0f14367c5662ef7afc7953cfdeeb5a08.tar.gz
eclipse.platform.swt-79e7c4fe0f14367c5662ef7afc7953cfdeeb5a08.tar.xz
eclipse.platform.swt-79e7c4fe0f14367c5662ef7afc7953cfdeeb5a08.zip
Bug 421383 - [Graphics] Scaling issues on high DPI displays
Change-Id: Ib7586f51199b46e258f5f30e10433eab4fe4775a Signed-off-by: Niraj Modi <niraj.modi@in.ibm.com> Signed-off-by: Sravan Kumar Lakkimsetti <sravankumarl@in.ibm.com>
Diffstat (limited to 'bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt')
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/AppKitFull.bridgesupport.extras8
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSBitmapImageRep.java7
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSImageRep.java11
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSObject.java6
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/OS.java1
5 files changed, 26 insertions, 7 deletions
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/AppKitFull.bridgesupport.extras b/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/AppKitFull.bridgesupport.extras
index 88324b5c08..2c8b1d1ecd 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/AppKitFull.bridgesupport.extras
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/AppKitFull.bridgesupport.extras
@@ -1596,6 +1596,10 @@
<method selector="hasAlpha" swt_gen="true">
<retval swt_gen="true"></retval>
</method>
+ <method class_method="true" selector="imageRepWithContentsOfFile:" swt_gen="true">
+ <arg swt_gen="true"></arg>
+ <retval swt_gen="true"></retval>
+ </method>
<method selector="pixelsHigh" swt_gen="true">
<retval swt_gen="true"></retval>
</method>
@@ -1606,6 +1610,10 @@
<arg swt_gen="true"></arg>
<retval swt_gen="true"></retval>
</method>
+ <method selector="setSize:" swt_gen="true">
+ <arg swt_gen="true"></arg>
+ <retval swt_gen="true"></retval>
+ </method>
</class>
<class name="NSImageView" swt_gen="mixed" swt_superclass="NSControl">
<method selector="image" swt_gen="true">
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSBitmapImageRep.java b/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSBitmapImageRep.java
index d11cb75eee..4ae8b8ff0f 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSBitmapImageRep.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSBitmapImageRep.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2012 IBM Corporation and others.
+ * Copyright (c) 2000, 2015 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
@@ -95,4 +95,9 @@ public long /*int*/ samplesPerPixel() {
return OS.objc_msgSend(this.id, OS.sel_samplesPerPixel);
}
+public static id imageRepWithContentsOfFile(NSString filename) {
+ long /*int*/ result = OS.objc_msgSend(OS.class_NSBitmapImageRep, OS.sel_imageRepWithContentsOfFile_, filename != null ? filename.id : 0);
+ return result != 0 ? new id(result) : null;
+}
+
}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSImageRep.java b/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSImageRep.java
index 7cd3b9f84e..7e81da1a2c 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSImageRep.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSImageRep.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2012 IBM Corporation and others.
+ * Copyright (c) 2000, 2015 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
@@ -41,6 +41,11 @@ public boolean hasAlpha() {
return OS.objc_msgSend_bool(this.id, OS.sel_hasAlpha);
}
+public static id imageRepWithContentsOfFile(NSString filename) {
+ long /*int*/ result = OS.objc_msgSend(OS.class_NSImageRep, OS.sel_imageRepWithContentsOfFile_, filename != null ? filename.id : 0);
+ return result != 0 ? new id(result) : null;
+}
+
public long /*int*/ pixelsHigh() {
return OS.objc_msgSend(this.id, OS.sel_pixelsHigh);
}
@@ -53,4 +58,8 @@ public void setAlpha(boolean flag) {
OS.objc_msgSend(this.id, OS.sel_setAlpha_, flag);
}
+public void setSize(NSSize aSize) {
+ OS.objc_msgSend(this.id, OS.sel_setSize_, aSize);
+}
+
}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSObject.java b/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSObject.java
index 4e502c3d0c..f530fd9f58 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSObject.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSObject.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2012 IBM Corporation and others.
+ * Copyright (c) 2000, 2015 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
@@ -121,10 +121,6 @@ public id copy() {
return result != 0 ? new id(result) : null;
}
-public void dealloc () {
- OS.objc_msgSend (this.id, OS.sel_dealloc);
-}
-
public NSString description() {
long /*int*/ result = OS.objc_msgSend(this.id, OS.sel_description);
return result != 0 ? new NSString(result) : null;
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/OS.java b/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/OS.java
index 9e3d914cfd..4f6118e115 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/OS.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/OS.java
@@ -1397,6 +1397,7 @@ public static final long /*int*/ sel_image = sel_registerName("image");
public static final long /*int*/ sel_imageInterpolation = sel_registerName("imageInterpolation");
public static final long /*int*/ sel_imageNamed_ = sel_registerName("imageNamed:");
public static final long /*int*/ sel_imageRectForBounds_ = sel_registerName("imageRectForBounds:");
+public static final long /*int*/ sel_imageRepWithContentsOfFile_ = sel_registerName("imageRepWithContentsOfFile:");
public static final long /*int*/ sel_imageRepWithData_ = sel_registerName("imageRepWithData:");
public static final long /*int*/ sel_imageablePageBounds = sel_registerName("imageablePageBounds");
public static final long /*int*/ sel_increment = sel_registerName("increment");

Back to the top