summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSilenio Quarti <silenio>2005-05-09 15:24:55 +0000
committerSilenio Quarti <silenio>2005-05-09 15:24:55 +0000
commitb441fbb392d7bde1009796430fa3ff7c30836b34 (patch)
treeb2fe78bd51cd840e9ba8196794c24bc8ac74fbfe
parentd4342152bebd27b9e9869d475e815ad24f5f6c16 (diff)
downloadeclipse.platform.swt-b441fbb392d7bde1009796430fa3ff7c30836b34.tar.gz
eclipse.platform.swt-b441fbb392d7bde1009796430fa3ff7c30836b34.tar.xz
eclipse.platform.swt-b441fbb392d7bde1009796430fa3ff7c30836b34.zip
75148
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/widgets/Display.java13
1 files changed, 6 insertions, 7 deletions
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/widgets/Display.java b/bundles/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/widgets/Display.java
index a26771ca29..8afc3f9855 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/widgets/Display.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/widgets/Display.java
@@ -551,26 +551,25 @@ int[] createImage (int type) {
result = OS.IconRefToIconFamily (ref [0], OS.kSelectorAlLAvailableData, family);
OS.ReleaseIconRef (ref [0]);
if (result != OS.noErr) return null;
- int[] image = createImageFromFamily(family [0]);
+ int[] image = createImageFromFamily(family [0], OS.kLarge32BitData, OS.kLarge8BitMask, 32, 32);
OS.DisposeHandle (family [0]);
return image;
}
-int[] createImageFromFamily (int family) {
+int[] createImageFromFamily (int family, int type, int maskType, int width, int height) {
int dataHandle = OS.NewHandle (0);
- int result = OS.GetIconFamilyData (family, OS.kLarge32BitData, dataHandle);
+ int result = OS.GetIconFamilyData (family, type, dataHandle);
if (result != OS.noErr) {
OS.DisposeHandle (dataHandle);
return null;
}
int maskHandle = OS.NewHandle (0);
- result = OS.GetIconFamilyData (family, OS.kLarge8BitMask, maskHandle);
+ result = OS.GetIconFamilyData (family, maskType, maskHandle);
if (result != OS.noErr) {
OS.DisposeHandle (maskHandle);
OS.DisposeHandle (dataHandle);
return null;
- }
- int width = 32, height = 32;
+ }
int bpr = width * 4;
int dataSize = OS.GetHandleSize (dataHandle);
int data = OS.NewPtrClear (dataSize);
@@ -2596,7 +2595,7 @@ int[] readImageRef(int path) {
int[] iconFamily = new int[1];
OS.ReadIconFile(fsSpec, iconFamily);
if (iconFamily[0] != 0) {
- image = createImageFromFamily(iconFamily[0]);
+ image = createImageFromFamily(iconFamily[0], OS.kThumbnail32BitData, OS.kThumbnail8BitMask, 128, 128);
OS.DisposeHandle(iconFamily[0]);
}
}