summaryrefslogtreecommitdiffstats
path: root/bundles/org.eclipse.swt.opengl
diff options
context:
space:
mode:
authorBilly Biggs <bbiggs>2005-09-14 20:49:03 +0000
committerBilly Biggs <bbiggs>2005-09-14 20:49:03 +0000
commit461bbe3bacbad35dca1e9b918ce2ba5104de6626 (patch)
tree6ae3997285a6595adde768a032eb4bb88db8b14f /bundles/org.eclipse.swt.opengl
parent961e4f6e8c3de44ff7fddaed62e29351cbe923cb (diff)
downloadeclipse.platform.swt-461bbe3bacbad35dca1e9b918ce2ba5104de6626.tar.gz
eclipse.platform.swt-461bbe3bacbad35dca1e9b918ce2ba5104de6626.tar.xz
eclipse.platform.swt-461bbe3bacbad35dca1e9b918ce2ba5104de6626.zip
Cleanup.
Diffstat (limited to 'bundles/org.eclipse.swt.opengl')
-rw-r--r--bundles/org.eclipse.swt.opengl/common/org/eclipse/swt/opengl/GLYPHMETRICSFLOAT.java22
-rw-r--r--bundles/org.eclipse.swt.opengl/common/org/eclipse/swt/opengl/Library.java39
-rw-r--r--bundles/org.eclipse.swt.opengl/win32/org/eclipse/swt/opengl/internal/win32/WGL.java6
3 files changed, 3 insertions, 64 deletions
diff --git a/bundles/org.eclipse.swt.opengl/common/org/eclipse/swt/opengl/GLYPHMETRICSFLOAT.java b/bundles/org.eclipse.swt.opengl/common/org/eclipse/swt/opengl/GLYPHMETRICSFLOAT.java
deleted file mode 100644
index 991e62b5bb..0000000000
--- a/bundles/org.eclipse.swt.opengl/common/org/eclipse/swt/opengl/GLYPHMETRICSFLOAT.java
+++ /dev/null
@@ -1,22 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2003 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.opengl;
-
-
-public class GLYPHMETRICSFLOAT {
- public float gmfBlackBoxX;
- public float gmfBlackBoxY;
- public float gmfptGlyphOrigin_x;
- public float gmfptGlyphOrigin_y;
- public float gmfCellIncX;
- public float gmfCellIncY;
- public static final int sizeof = 24;
-}
diff --git a/bundles/org.eclipse.swt.opengl/common/org/eclipse/swt/opengl/Library.java b/bundles/org.eclipse.swt.opengl/common/org/eclipse/swt/opengl/Library.java
index 8d121f0810..26467bcb54 100644
--- a/bundles/org.eclipse.swt.opengl/common/org/eclipse/swt/opengl/Library.java
+++ b/bundles/org.eclipse.swt.opengl/common/org/eclipse/swt/opengl/Library.java
@@ -10,51 +10,18 @@
*******************************************************************************/
package org.eclipse.swt.opengl;
+import org.eclipse.swt.*;
public class Library {
-/**
- * Returns the platform name.
- *
- * @return the platform name of the currently running SWT
- */
-static String getPlatform () {
- String [] names = new String [] {"motif", "gtk", "win32", "photon", "carbon"}; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$
- for (int i = 0; i < names.length; i++) {
- try {
- Class.forName("org.eclipse.swt.internal."+names[i]+".OS"); //$NON-NLS-1$ //$NON-NLS-2$
- return names[i];
- } catch (ClassNotFoundException e) {
- }
- }
- return "unknown"; //$NON-NLS-1$
-}
-
-/**
- * Loads the shared library that matches the version of the
- * Java code which is currently running. SWT shared libraries
- * follow an encoding scheme where the major, minor and revision
- * numbers are embedded in the library name and this along with
- * <code>name</code> is used to load the library. If this fails,
- * <code>name</code> is used in another attempt to load the library,
- * this time ignoring the SWT version encoding scheme.
- *
- * @param name the name of the library to load
- */
public static void loadLibrary (String name) {
- /*
- * Include platform name to support different windowing systems
- * on same operating system.
- */
- String platform = getPlatform ();
-
+ String platform = SWT.getPlatform ();
try {
- String newName = name + "-" + platform; //$NON-NLS-1$ //$NON-NLS-2$
+ String newName = name + '-' + platform;
System.loadLibrary (newName);
return;
} catch (UnsatisfiedLinkError e1) {
throw e1;
}
}
-
}
diff --git a/bundles/org.eclipse.swt.opengl/win32/org/eclipse/swt/opengl/internal/win32/WGL.java b/bundles/org.eclipse.swt.opengl/win32/org/eclipse/swt/opengl/internal/win32/WGL.java
index 04674d722f..52db669747 100644
--- a/bundles/org.eclipse.swt.opengl/win32/org/eclipse/swt/opengl/internal/win32/WGL.java
+++ b/bundles/org.eclipse.swt.opengl/win32/org/eclipse/swt/opengl/internal/win32/WGL.java
@@ -133,10 +133,4 @@ public static final native int wglSetLayerPaletteEntries(int hdc, int iLayerPlan
public static final native int wglGetLayerPaletteEntries(int hdc, int iLayerPlane, int iStart, int cEntries, int[] pcr);
public static final native boolean wglRealizeLayerPalette(int hdc, int iLayerPlane, boolean bRealize);
public static final native boolean wglSwapLayerBuffers(int hdc, int fuPlanes);
-public static final void MoveMemory (GLYPHMETRICSFLOAT Destination, int Source, int Length) {
- if (OS.IsUnicode) MoveMemoryW (Destination, Source, Length);
- else MoveMemoryA(Destination, Source, Length);
-}
-public static final native void MoveMemoryA (GLYPHMETRICSFLOAT Destination, int Source, int Length);
-public static final native void MoveMemoryW (GLYPHMETRICSFLOAT Destination, int Source, int Length);
}