Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlexander Kurtakov2014-09-22 13:24:59 +0000
committerAlexander Kurtakov2014-09-22 13:24:59 +0000
commitf0fe43dfebf042c56275f08bd4efaa0b5f296ca4 (patch)
treea13084bd3d353c68ddbea83e6adcd064779d062a
parentaa6df88cf8295cb2876df1d8b629dc66290f0de5 (diff)
downloadeclipse.platform.swt-f0fe43dfebf042c56275f08bd4efaa0b5f296ca4.tar.gz
eclipse.platform.swt-f0fe43dfebf042c56275f08bd4efaa0b5f296ca4.tar.xz
eclipse.platform.swt-f0fe43dfebf042c56275f08bd4efaa0b5f296ca4.zip
Bug 444725 - Remove carbon support from swtI20140923-0800
Remove remaining parts in tests, examples and snippets. Change-Id: I2c3b3d2791a9ac326d70e89740363563e5ef0dc0 Signed-off-by: Alexander Kurtakov <akurtako@redhat.com>
-rw-r--r--examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/controlexample/ControlExample.java2
-rw-r--r--examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/graphics/CountDownTab.java2
-rw-r--r--examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/graphics/CurvesSWTTab.java2
-rw-r--r--examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/graphics/CurvesTab.java2
-rw-r--r--examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/graphics/ImageFlipTab.java2
-rw-r--r--examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/graphics/InterpolationTab.java2
-rw-r--r--examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/graphics/LineCapTab.java2
-rw-r--r--examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/graphics/LineStyleTab.java2
-rw-r--r--examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/graphics/TextAntialiasTab.java2
-rw-r--r--examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/hoverhelp/HoverHelp.java2
-rw-r--r--examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/texteditor/text.txt1
-rw-r--r--examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet173.java2
-rw-r--r--examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet178.java132
-rw-r--r--examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet304.java2
-rw-r--r--examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/SnippetLauncher.java2
-rw-r--r--tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/SwtTestUtil.java2
16 files changed, 6 insertions, 155 deletions
diff --git a/examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/controlexample/ControlExample.java b/examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/controlexample/ControlExample.java
index bfaa1635cb..5631c39770 100644
--- a/examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/controlexample/ControlExample.java
+++ b/examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/controlexample/ControlExample.java
@@ -66,7 +66,7 @@ public class ControlExample {
* We try to recover some width by using shorter tab names. */
Point size = parent.computeSize(SWT.DEFAULT, SWT.DEFAULT);
Rectangle monitorArea = parent.getMonitor().getClientArea();
- boolean isMac = SWT.getPlatform().equals("carbon") || SWT.getPlatform().equals("cocoa");
+ boolean isMac = SWT.getPlatform().equals("cocoa");
if (size.x > monitorArea.width && isMac) {
TabItem [] tabItems = tabFolder.getItems();
for (int i=0; i<tabItems.length; i++) {
diff --git a/examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/graphics/CountDownTab.java b/examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/graphics/CountDownTab.java
index 07db1c06bd..03ab7cfcfc 100644
--- a/examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/graphics/CountDownTab.java
+++ b/examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/graphics/CountDownTab.java
@@ -258,8 +258,6 @@ public class CountDownTab extends AnimatedGraphicsTab {
return new String[] { "Courier", "Impact" }[index];
} else if (SWT.getPlatform() == "gtk") {
return new String[] { "Courier", "Baekmuk Headline" }[index];
- } else if (SWT.getPlatform() == "carbon") {
- return new String[] { "Courier", "Impact" }[index];
} else {
return new String[] { "Courier", "Verdana" }[index];
}
diff --git a/examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/graphics/CurvesSWTTab.java b/examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/graphics/CurvesSWTTab.java
index 33a5ff41e5..8ef946662d 100644
--- a/examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/graphics/CurvesSWTTab.java
+++ b/examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/graphics/CurvesSWTTab.java
@@ -382,8 +382,6 @@ static String getPlatformFont() {
return "Arial";
} else if (SWT.getPlatform() == "gtk") {
return "Baekmuk Batang";
- } else if (SWT.getPlatform() == "carbon") {
- return "Arial";
} else {
return "Verdana";
}
diff --git a/examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/graphics/CurvesTab.java b/examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/graphics/CurvesTab.java
index d9157bcd5f..3d45c89dd9 100644
--- a/examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/graphics/CurvesTab.java
+++ b/examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/graphics/CurvesTab.java
@@ -291,8 +291,6 @@ static String getPlatformFont() {
return "Arial";
} else if (SWT.getPlatform() == "gtk") {
return "Baekmuk Batang";
- } else if (SWT.getPlatform() == "carbon") {
- return "Arial";
} else {
return "Verdana";
}
diff --git a/examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/graphics/ImageFlipTab.java b/examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/graphics/ImageFlipTab.java
index 9c850513ac..839856e78e 100644
--- a/examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/graphics/ImageFlipTab.java
+++ b/examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/graphics/ImageFlipTab.java
@@ -103,8 +103,6 @@ static String getPlatformFont() {
return "Arial";
} else if (SWT.getPlatform() == "gtk") {
return "Baekmuk Batang";
- } else if (SWT.getPlatform() == "carbon") {
- return "Arial";
} else {
return "Verdana";
}
diff --git a/examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/graphics/InterpolationTab.java b/examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/graphics/InterpolationTab.java
index 0ea2652b0d..4d2c592529 100644
--- a/examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/graphics/InterpolationTab.java
+++ b/examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/graphics/InterpolationTab.java
@@ -190,8 +190,6 @@ static String getPlatformFont() {
return "Arial";
} else if (SWT.getPlatform() == "gtk") {
return "Baekmuk Batang";
- } else if (SWT.getPlatform() == "carbon") {
- return "Arial";
} else {
return "Verdana";
}
diff --git a/examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/graphics/LineCapTab.java b/examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/graphics/LineCapTab.java
index 37801ad588..7643a5437a 100644
--- a/examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/graphics/LineCapTab.java
+++ b/examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/graphics/LineCapTab.java
@@ -146,8 +146,6 @@ static String getPlatformFont() {
return "Arial";
} else if (SWT.getPlatform() == "gtk") {
return "Baekmuk Batang";
- } else if (SWT.getPlatform() == "carbon") {
- return "Arial";
} else {
return "Verdana";
}
diff --git a/examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/graphics/LineStyleTab.java b/examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/graphics/LineStyleTab.java
index 7f4ff4535a..20f197067d 100644
--- a/examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/graphics/LineStyleTab.java
+++ b/examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/graphics/LineStyleTab.java
@@ -166,8 +166,6 @@ static String getPlatformFont() {
return "Arial";
} else if (SWT.getPlatform() == "gtk") {
return "Baekmuk Batang";
- } else if (SWT.getPlatform() == "carbon") {
- return "Arial";
} else {
return "Verdana";
}
diff --git a/examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/graphics/TextAntialiasTab.java b/examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/graphics/TextAntialiasTab.java
index 11daa74f90..92150be301 100644
--- a/examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/graphics/TextAntialiasTab.java
+++ b/examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/graphics/TextAntialiasTab.java
@@ -187,8 +187,6 @@ static String getPlatformFontFace(int index) {
return new String [] {"Bookman Old Style", "Century Gothic", "Comic Sans MS", "Impact", "Garamond", "Lucida Console", "Monotype Corsiva"} [index];
} else if (SWT.getPlatform() == "gtk") {
return new String [] {"Luxi Mono", "KacstTitleL", "Baekmuk Batang", "Baekmuk Headline", "KacstFarsi", "Baekmuk Gulim", "URW Chancery L"} [index];
- } else if (SWT.getPlatform() == "carbon") {
- return new String [] {"Apple Chancery", "Brush Script MT", "Comic Sans MS", "Impact", "Herculanum", "Lucida Grande", "Papyrus"} [index];
} else {
return new String [] {"Courier", "Verdana", "Verdana", "Verdana", "Verdana", "Verdana", "Verdana"} [index];
}
diff --git a/examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/hoverhelp/HoverHelp.java b/examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/hoverhelp/HoverHelp.java
index 5167410026..a975498f78 100644
--- a/examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/hoverhelp/HoverHelp.java
+++ b/examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/hoverhelp/HoverHelp.java
@@ -142,7 +142,7 @@ public class HoverHelp {
String platform = SWT.getPlatform();
String helpKey = "F1";
if (platform.equals("gtk")) helpKey = "Ctrl+F1";
- if (platform.equals("carbon") || platform.equals("cocoa")) helpKey = "Help";
+ if (platform.equals("cocoa")) helpKey = "Help";
ToolBar bar = new ToolBar (frame, SWT.BORDER);
for (int i=0; i<5; i++) {
diff --git a/examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/texteditor/text.txt b/examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/texteditor/text.txt
index 34bd830b3b..38b5644813 100644
--- a/examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/texteditor/text.txt
+++ b/examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/texteditor/text.txt
@@ -160,7 +160,6 @@ public class StyledText extends Canvas {
final static boolean DOUBLE_BUFFER;
static {
String platform = SWT.getPlatform();
- IS_CARBON = "carbon".equals(platform);
IS_GTK = "gtk".equals(platform);
DOUBLE_BUFFER = !IS_CARBON;
}
diff --git a/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet173.java b/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet173.java
index a5a6bb185a..454a9c8980 100644
--- a/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet173.java
+++ b/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet173.java
@@ -77,7 +77,7 @@ static void initialize(final Display display, Browser browser) {
Browser browser = (Browser)event.widget;
final Shell shell = browser.getShell();
/* popup blocker - ignore windows with no style */
- boolean isOSX = SWT.getPlatform().equals ("cocoa") || SWT.getPlatform().equals ("carbon");
+ boolean isOSX = SWT.getPlatform().equals ("cocoa");
if (!event.addressBar && !event.statusBar && !event.toolBar && (!event.menuBar || isOSX)) {
System.out.println("Popup blocked.");
event.display.asyncExec(new Runnable() {
diff --git a/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet178.java b/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet178.java
deleted file mode 100644
index 5adf1aeb3b..0000000000
--- a/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet178.java
+++ /dev/null
@@ -1,132 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2005 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
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.snippets;
-
-/*
- * How to access About, Preferences and Quit menus on carbon.
- * NOTE: This snippet uses internal SWT packages that are
- * subject to change without notice.
- *
- * For a list of all SWT example snippets see
- * http://www.eclipse.org/swt/snippets/
- */
-
-import org.eclipse.swt.internal.*;
-import org.eclipse.swt.internal.carbon.*;
-
-import org.eclipse.swt.*;
-import org.eclipse.swt.widgets.*;
-
-public class Snippet178 {
-
- private static final int kHICommandPreferences = ('p' << 24) + ('r' << 16)
- + ('e' << 8) + 'f';
-
- private static final int kHICommandAbout = ('a' << 24) + ('b' << 16)
- + ('o' << 8) + 'u';
-
- private static final int kHICommandServices = ('s' << 24) + ('e' << 16)
- + ('r' << 8) + 'v';
-
-public static void main(String[] arg) {
- Display.setAppName("AppMenu"); // sets name in Dock
- Display display = new Display();
- hookApplicationMenu(display, "About AppMenu");
- Shell shell = new Shell(display);
- shell.setText("Main Window");
- shell.open();
- while (!shell.isDisposed())
- if (!display.readAndDispatch())
- display.sleep();
-
- display.dispose();
-}
-
-static void hookApplicationMenu(Display display, final String aboutName) {
- // Callback target
- Object target = new Object() {
- int commandProc(int nextHandler, int theEvent, int userData) {
- if (OS.GetEventKind(theEvent) == OS.kEventProcessCommand) {
- HICommand command = new HICommand();
- OS.GetEventParameter(theEvent, OS.kEventParamDirectObject,
- OS.typeHICommand, null, HICommand.sizeof, null,
- command);
- switch (command.commandID) {
- case kHICommandPreferences:
- return handleCommand("Preferences"); //$NON-NLS-1$
- case kHICommandAbout:
- return handleCommand(aboutName);
- default:
- break;
- }
- }
- return OS.eventNotHandledErr;
- }
-
- int handleCommand(String command) {
- Shell shell = new Shell();
- MessageBox preferences = new MessageBox(shell, SWT.ICON_WARNING);
- preferences.setText(command);
- preferences.open();
- shell.dispose();
- return OS.noErr;
- }
- };
-
- final Callback commandCallback = new Callback(target, "commandProc", 3); //$NON-NLS-1$
- int commandProc = commandCallback.getAddress();
- if (commandProc == 0) {
- commandCallback.dispose();
- return; // give up
- }
-
- // Install event handler for commands
- int[] mask = new int[] { OS.kEventClassCommand, OS.kEventProcessCommand };
- OS.InstallEventHandler(OS.GetApplicationEventTarget(), commandProc,
- mask.length / 2, mask, 0, null);
-
- // create About ... menu command
- int[] outMenu = new int[1];
- short[] outIndex = new short[1];
- if (OS.GetIndMenuItemWithCommandID(0, kHICommandPreferences, 1,
- outMenu, outIndex) == OS.noErr
- && outMenu[0] != 0) {
- int menu = outMenu[0];
-
- int l = aboutName.length();
- char buffer[] = new char[l];
- aboutName.getChars(0, l, buffer, 0);
- int str = OS.CFStringCreateWithCharacters(OS.kCFAllocatorDefault,
- buffer, l);
- OS.InsertMenuItemTextWithCFString(menu, str, (short) 0, 0,
- kHICommandAbout);
- OS.CFRelease(str);
-
- // add separator between About & Preferences
- OS.InsertMenuItemTextWithCFString(menu, 0, (short) 1,
- OS.kMenuItemAttrSeparator, 0);
-
- // enable pref menu
- OS.EnableMenuCommand(menu, kHICommandPreferences);
-
- // disable services menu
- OS.DisableMenuCommand(menu, kHICommandServices);
- }
-
- // schedule disposal of callback object
- display.disposeExec(new Runnable() {
- @Override
- public void run() {
- commandCallback.dispose();
- }
- });
-}
-}
diff --git a/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet304.java b/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet304.java
index 0d3f7ada49..c80124063e 100644
--- a/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet304.java
+++ b/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet304.java
@@ -56,7 +56,7 @@ public class Snippet304 {
public void run(){
int key = SWT.END;
String platform = SWT.getPlatform();
- if (platform.equals("carbon") || platform.equals("cocoa") ) {
+ if (platform.equals("cocoa") ) {
key = SWT.ARROW_DOWN;
}
postEvent(SWT.MOD1, SWT.KeyDown);
diff --git a/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/SnippetLauncher.java b/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/SnippetLauncher.java
index 575ed8f814..63276c7f0e 100644
--- a/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/SnippetLauncher.java
+++ b/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/SnippetLauncher.java
@@ -57,7 +57,7 @@ public class SnippetLauncher {
platform = "JavaXPCOM";
skip = true;
} else {
- String [] platforms = {"win32", "gtk", "carbon"};
+ String [] platforms = {"win32", "gtk"};
for (int p = 0; p < platforms.length; p++) {
if (!platforms[p].equals(platform) && source.indexOf("." + platforms[p]) != -1) {
platform = platforms[p];
diff --git a/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/SwtTestUtil.java b/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/SwtTestUtil.java
index 4ac7abe216..3c61cc1322 100644
--- a/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/SwtTestUtil.java
+++ b/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/SwtTestUtil.java
@@ -57,7 +57,7 @@ public class SwtTestUtil {
public static String[] transparentImageFilenames = new String[] {"transparent.png"};
// specify reparentable platforms
- public static String[] reparentablePlatforms = new String[] {"win32", "gtk", "carbon", "cocoa"};
+ public static String[] reparentablePlatforms = new String[] {"win32", "gtk", "cocoa"};
public static final String testFontName;
public final static boolean isWindows = SWT.getPlatform().startsWith("win32");

Back to the top