diff options
author | Carolyn MacLeod <carolyn> | 2002-02-28 17:10:50 +0000 |
---|---|---|
committer | Carolyn MacLeod <carolyn> | 2002-02-28 17:10:50 +0000 |
commit | cbaab305b3fb32135b10f8ed84a7eef84267cff4 (patch) | |
tree | 5f49fd389cdfe395bfecca7e8fd0dec83076d7b0 | |
parent | fb1e2071d35034cab2aa0ee2da4593b8398a9282 (diff) | |
download | eclipse.platform.swt-cbaab305b3fb32135b10f8ed84a7eef84267cff4.tar.gz eclipse.platform.swt-cbaab305b3fb32135b10f8ed84a7eef84267cff4.tar.xz eclipse.platform.swt-cbaab305b3fb32135b10f8ed84a7eef84267cff4.zip |
Added Accessibility
10 files changed, 89 insertions, 0 deletions
diff --git a/bundles/org.eclipse.swt/.classpath_gtk b/bundles/org.eclipse.swt/.classpath_gtk index b70d21aca7..a5efd8597d 100644 --- a/bundles/org.eclipse.swt/.classpath_gtk +++ b/bundles/org.eclipse.swt/.classpath_gtk @@ -14,5 +14,7 @@ <classpathentry kind="src" path="Eclipse SWT Custom Widgets/common"/> <classpathentry kind="src" path="Eclipse SWT PI/gtk"/> <classpathentry kind="src" path="Eclipse SWT PI/common_j2se"/> + <classpathentry kind="src" path="Eclipse SWT Accessibility/emulated"/> + <classpathentry kind="src" path="Eclipse SWT Accessibility/common"/> <classpathentry kind="output" path="bin"/> </classpath> diff --git a/bundles/org.eclipse.swt/.classpath_gtk_j2me b/bundles/org.eclipse.swt/.classpath_gtk_j2me index 48fef2d099..b60e674761 100644 --- a/bundles/org.eclipse.swt/.classpath_gtk_j2me +++ b/bundles/org.eclipse.swt/.classpath_gtk_j2me @@ -14,5 +14,7 @@ <classpathentry kind="src" path="Eclipse SWT Custom Widgets/common"/> <classpathentry kind="src" path="Eclipse SWT PI/gtk"/> <classpathentry kind="src" path="Eclipse SWT PI/common_j2me"/> + <classpathentry kind="src" path="Eclipse SWT Accessibility/emulated"/> + <classpathentry kind="src" path="Eclipse SWT Accessibility/common"/> <classpathentry kind="output" path="bin"/> </classpath> diff --git a/bundles/org.eclipse.swt/.classpath_motif b/bundles/org.eclipse.swt/.classpath_motif index 70d3634e41..52b3cd71e9 100755 --- a/bundles/org.eclipse.swt/.classpath_motif +++ b/bundles/org.eclipse.swt/.classpath_motif @@ -14,5 +14,7 @@ <classpathentry kind="src" path="Eclipse SWT Custom Widgets/common"/> <classpathentry kind="src" path="Eclipse SWT PI/motif"/> <classpathentry kind="src" path="Eclipse SWT PI/common_j2se"/> + <classpathentry kind="src" path="Eclipse SWT Accessibility/emulated"/> + <classpathentry kind="src" path="Eclipse SWT Accessibility/common"/> <classpathentry kind="output" path="bin"/> </classpath> diff --git a/bundles/org.eclipse.swt/.classpath_motif_j2me b/bundles/org.eclipse.swt/.classpath_motif_j2me index abf6b8b5cc..147634528e 100644 --- a/bundles/org.eclipse.swt/.classpath_motif_j2me +++ b/bundles/org.eclipse.swt/.classpath_motif_j2me @@ -14,5 +14,7 @@ <classpathentry kind="src" path="Eclipse SWT Custom Widgets/common"/>
<classpathentry kind="src" path="Eclipse SWT PI/motif"/>
<classpathentry kind="src" path="Eclipse SWT PI/common_j2me"/>
+ <classpathentry kind="src" path="Eclipse SWT Accessibility/emulated"/>
+ <classpathentry kind="src" path="Eclipse SWT Accessibility/common"/>
<classpathentry kind="output" path="bin"/>
</classpath>
\ No newline at end of file diff --git a/bundles/org.eclipse.swt/.classpath_photon b/bundles/org.eclipse.swt/.classpath_photon index 5afc80d379..3744374715 100755 --- a/bundles/org.eclipse.swt/.classpath_photon +++ b/bundles/org.eclipse.swt/.classpath_photon @@ -14,5 +14,7 @@ <classpathentry kind="src" path="Eclipse SWT Custom Widgets/common"/> <classpathentry kind="src" path="Eclipse SWT PI/photon"/> <classpathentry kind="src" path="Eclipse SWT PI/common_j2se"/> + <classpathentry kind="src" path="Eclipse SWT Accessibility/emulated"/> + <classpathentry kind="src" path="Eclipse SWT Accessibility/common"/> <classpathentry kind="output" path="bin"/> </classpath> diff --git a/bundles/org.eclipse.swt/.classpath_photon_j2me b/bundles/org.eclipse.swt/.classpath_photon_j2me index 8a436c634f..3c775f4d0c 100644 --- a/bundles/org.eclipse.swt/.classpath_photon_j2me +++ b/bundles/org.eclipse.swt/.classpath_photon_j2me @@ -14,5 +14,7 @@ <classpathentry kind="src" path="Eclipse SWT Custom Widgets/common"/> <classpathentry kind="src" path="Eclipse SWT PI/photon"/> <classpathentry kind="src" path="Eclipse SWT PI/common_j2me"/> + <classpathentry kind="src" path="Eclipse SWT Accessibility/emulated"/> + <classpathentry kind="src" path="Eclipse SWT Accessibility/common"/> <classpathentry kind="output" path="bin"/> </classpath> diff --git a/bundles/org.eclipse.swt/.classpath_win32 b/bundles/org.eclipse.swt/.classpath_win32 index 35ad7414ea..55c7b18b46 100755 --- a/bundles/org.eclipse.swt/.classpath_win32 +++ b/bundles/org.eclipse.swt/.classpath_win32 @@ -15,5 +15,7 @@ <classpathentry kind="src" path="Eclipse SWT Custom Widgets/common"/> <classpathentry kind="src" path="Eclipse SWT PI/win32"/> <classpathentry kind="src" path="Eclipse SWT PI/common_j2se"/> + <classpathentry kind="src" path="Eclipse SWT Accessibility/win32"/> + <classpathentry kind="src" path="Eclipse SWT Accessibility/common"/> <classpathentry kind="output" path="bin"/> </classpath> diff --git a/bundles/org.eclipse.swt/.classpath_win32_j2me b/bundles/org.eclipse.swt/.classpath_win32_j2me index 2b2dd638a6..0ff15883d0 100644 --- a/bundles/org.eclipse.swt/.classpath_win32_j2me +++ b/bundles/org.eclipse.swt/.classpath_win32_j2me @@ -15,5 +15,7 @@ <classpathentry kind="src" path="Eclipse SWT Custom Widgets/common"/> <classpathentry kind="src" path="Eclipse SWT PI/win32"/> <classpathentry kind="src" path="Eclipse SWT PI/common_j2me"/> + <classpathentry kind="src" path="Eclipse SWT Accessibility/emulated"/> + <classpathentry kind="src" path="Eclipse SWT Accessibility/common"/> <classpathentry kind="output" path="bin"/> </classpath> diff --git a/bundles/org.eclipse.swt/Eclipse SWT Accessibility/emulated/org/eclipse/swt/accessibility/Accessible.java b/bundles/org.eclipse.swt/Eclipse SWT Accessibility/emulated/org/eclipse/swt/accessibility/Accessible.java new file mode 100644 index 0000000000..265c455b2f --- /dev/null +++ b/bundles/org.eclipse.swt/Eclipse SWT Accessibility/emulated/org/eclipse/swt/accessibility/Accessible.java @@ -0,0 +1,39 @@ +package org.eclipse.swt.accessibility;
+
+/*
+ * (c) Copyright IBM Corp. 2000, 2001.
+ * All Rights Reserved
+ */
+
+import org.eclipse.swt.*;
+import org.eclipse.swt.widgets.Control;
+
+/**
+ * NOTE: The API in the accessibility package is NOT finalized.
+ * Use at your own risk, because it will most certainly change.
+ * The methods in AccessibleListener are more stable than those
+ * in AccessibleControlListener, however please take nothing for
+ * granted. The only reason this API is being released at this
+ * time is so that other teams can try it out.
+ */
+public class Accessible {
+
+ Accessible(Control control) {
+ }
+
+ public static Accessible internal_new_accessible(Control control) {
+ return new Accessible(control);
+ }
+
+ public void addAccessibleListener(AccessibleListener listener) {
+ }
+
+ public void removeAccessibleListener(AccessibleListener listener) {
+ }
+
+ public void addAccessibleControlListener(AccessibleControlListener listener) {
+ }
+
+ public void removeAccessibleControlListener(AccessibleControlListener listener) {
+ }
+}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/motif/org/eclipse/swt/widgets/Control.java b/bundles/org.eclipse.swt/Eclipse SWT/motif/org/eclipse/swt/widgets/Control.java index ddc83005d2..4ad29aee46 100755 --- a/bundles/org.eclipse.swt/Eclipse SWT/motif/org/eclipse/swt/widgets/Control.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/motif/org/eclipse/swt/widgets/Control.java @@ -10,6 +10,9 @@ import org.eclipse.swt.internal.motif.*; import org.eclipse.swt.graphics.*;
import org.eclipse.swt.*;
import org.eclipse.swt.events.*;
+/* Start ACCESSIBILITY */
+import org.eclipse.swt.accessibility.*;
+/* End ACCESSIBILITY */
/**
* Control is the abstract superclass of all windowed user interface classes.
@@ -32,6 +35,10 @@ public abstract class Control extends Widget implements Drawable { Menu menu;
String toolTipText;
Object layoutData;
+/* Start ACCESSIBILITY */
+ Accessible accessible;
+/* End ACCESSIBILITY */
+
Control () {
/* Do nothing */
}
@@ -501,6 +508,33 @@ public boolean forceFocus () { shell.bringToTop ();
return OS.XmProcessTraversal (handle, OS.XmTRAVERSE_CURRENT);
}
+
+
+/* Start ACCESSIBILITY */
+/**
+ * Returns the accessible object for the receiver.
+ * If this is the first time this object is requested,
+ * then the object is created and returned.
+ *
+ * @return the accessible object
+ *
+ * @exception SWTException <ul>
+ * <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li>
+ * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li>
+ * </ul>
+ *
+ * @see addAccessibleListener
+ * @see addAccessibleControlListener
+ */
+public Accessible getAccessible () {
+ checkWidget ();
+ if (accessible == null) {
+ accessible = Accessible.internal_new_accessible (this);
+ }
+ return accessible;
+}
+/* End ACCESSIBILITY */
+
/**
* Returns the receiver's background color.
*
|