Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCarolyn MacLeod2002-03-01 20:48:26 +0000
committerCarolyn MacLeod2002-03-01 20:48:26 +0000
commit59eec4b8f7997739d601bb838ff1820a65819338 (patch)
treebad95e8f83ec13d47be360eb8db0ed16e5cc186d
parentb6149f8efe7b607058de442818a8d4b50a9cebc4 (diff)
downloadeclipse.platform.swt-59eec4b8f7997739d601bb838ff1820a65819338.tar.gz
eclipse.platform.swt-59eec4b8f7997739d601bb838ff1820a65819338.tar.xz
eclipse.platform.swt-59eec4b8f7997739d601bb838ff1820a65819338.zip
*** empty log message ***
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT Accessibility/common/org/eclipse/swt/accessibility/AccessibleAdapter.java28
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT Accessibility/common/org/eclipse/swt/accessibility/AccessibleControlAdapter.java13
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT Accessibility/common/org/eclipse/swt/accessibility/AccessibleControlListener.java8
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT Accessibility/common/org/eclipse/swt/accessibility/AccessibleListener.java28
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT Accessibility/win32/org/eclipse/swt/accessibility/Accessible.java31
-rwxr-xr-xbundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Control.java1
6 files changed, 70 insertions, 39 deletions
diff --git a/bundles/org.eclipse.swt/Eclipse SWT Accessibility/common/org/eclipse/swt/accessibility/AccessibleAdapter.java b/bundles/org.eclipse.swt/Eclipse SWT Accessibility/common/org/eclipse/swt/accessibility/AccessibleAdapter.java
index 8ceaa66a34..84dd398683 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT Accessibility/common/org/eclipse/swt/accessibility/AccessibleAdapter.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT Accessibility/common/org/eclipse/swt/accessibility/AccessibleAdapter.java
@@ -31,9 +31,10 @@ public abstract class AccessibleAdapter implements AccessibleListener {
* of the control, or the name of a child of the control.
* The default behavior is to do nothing.
*
- * @param e an event object containing the following fields:
- * childID [IN] - an identifier specifying the control or one of its children
- * result [OUT] - the requested name string
+ * @param e an event object containing the following fields:<ul>
+ * <li>childID [IN] - an identifier specifying the control or one of its children</li>
+ * <li>result [OUT] - the requested name string</li>
+ * </ul>
*/
public void getName(AccessibleEvent e) {
}
@@ -43,9 +44,10 @@ public abstract class AccessibleAdapter implements AccessibleListener {
* of the control, or the help string of a child of the control.
* The default behavior is to do nothing.
*
- * @param e an event object containing the following fields:
- * childID [IN] - an identifier specifying the control or one of its children
- * result [OUT] - the requested help string
+ * @param e an event object containing the following fields:<ul>
+ * <li>childID [IN] - an identifier specifying the control or one of its children</li>
+ * <li>result [OUT] - the requested help string</li>
+ * </ul>
*/
public void getHelp(AccessibleEvent e) {
}
@@ -55,9 +57,10 @@ public abstract class AccessibleAdapter implements AccessibleListener {
* of the control, or the keyboard shortcut of a child of the control.
* The default behavior is to do nothing.
*
- * @param e an event object containing the following fields:
- * childID [IN] - an identifier specifying the control or one of its children
- * result [OUT] - the requested keyboard shortcut string (example: "CTRL+C")
+ * @param e an event object containing the following fields:<ul>
+ * <li>childID [IN] - an identifier specifying the control or one of its children</li>
+ * <li>result [OUT] - the requested keyboard shortcut string (example: "CTRL+C")</li>
+ * </ul>
*/
public void getKeyboardShortcut(AccessibleEvent e) {
}
@@ -67,9 +70,10 @@ public abstract class AccessibleAdapter implements AccessibleListener {
* of the control, or a description of a child of the control.
* The default behavior is to do nothing.
*
- * @param e an event object containing the following fields:
- * childID [IN] - an identifier specifying the control or one of its children
- * result [OUT] - the requested description string
+ * @param e an event object containing the following fields:<ul>
+ * <li>childID [IN] - an identifier specifying the control or one of its children</li>
+ * <li>result [OUT] - the requested description string</li>
+ * </ul>
*/
public void getDescription(AccessibleEvent e) {
}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT Accessibility/common/org/eclipse/swt/accessibility/AccessibleControlAdapter.java b/bundles/org.eclipse.swt/Eclipse SWT Accessibility/common/org/eclipse/swt/accessibility/AccessibleControlAdapter.java
index 38d90522e4..b8ff47ea52 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT Accessibility/common/org/eclipse/swt/accessibility/AccessibleControlAdapter.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT Accessibility/common/org/eclipse/swt/accessibility/AccessibleControlAdapter.java
@@ -37,17 +37,18 @@ public abstract class AccessibleControlAdapter implements AccessibleControlListe
* of the control child at the specified display coordinates.
* The default behavior is to do nothing.
*
- * @param e an event object containing the following fields:
- * x, y [IN] - the specified point in display coordinates
- * childID [OUT] - the ID of the child at point, or CHILDID_SELF, or CHILDID_NONE
+ * @param e an event object containing the following fields:<ul>
+ * <li>x, y [IN] - the specified point in display coordinates</li>
+ * <li>childID [OUT] - the ID of the child at point, or CHILDID_SELF, or CHILDID_NONE</li>
+ * </ul>
*/
- public void accHitTest(AccessibleControlEvent e) {
+ public void hitTest(AccessibleControlEvent e) {
}
- public void accLocation(AccessibleControlEvent e) {
+ public void getLocation(AccessibleControlEvent e) {
}
- public void accNavigate(AccessibleControlEvent e) {
+ public void navigate(AccessibleControlEvent e) {
}
public void getChild(AccessibleControlEvent e) {
diff --git a/bundles/org.eclipse.swt/Eclipse SWT Accessibility/common/org/eclipse/swt/accessibility/AccessibleControlListener.java b/bundles/org.eclipse.swt/Eclipse SWT Accessibility/common/org/eclipse/swt/accessibility/AccessibleControlListener.java
index fc604d1be1..2e8e589d8c 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT Accessibility/common/org/eclipse/swt/accessibility/AccessibleControlListener.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT Accessibility/common/org/eclipse/swt/accessibility/AccessibleControlListener.java
@@ -36,8 +36,8 @@ import org.eclipse.swt.internal.SWTEventListener;
*/
public interface AccessibleControlListener extends SWTEventListener {
- public void accHitTest(AccessibleControlEvent e);
- public void accLocation(AccessibleControlEvent e);
+ public void hitTest(AccessibleControlEvent e);
+ public void getLocation(AccessibleControlEvent e);
public void getChild(AccessibleControlEvent e);
public void getChildCount(AccessibleControlEvent e);
public void getDefaultAction(AccessibleControlEvent e);
@@ -50,8 +50,8 @@ public interface AccessibleControlListener extends SWTEventListener {
// May need to implement for IEnumVARIANT
public void getChildren(AccessibleControlEvent e);
- // May not implement - not sure what clients use these - likely testing clients, not accesibility (but not sure)
- public void accNavigate(AccessibleControlEvent e);
+ // May not implement - not sure what clients use these
+ public void navigate(AccessibleControlEvent e);
//public void accDoDefaultAction(AccessibleControlEvent e);
//public void accSelect(AccessibleControlEvent e);
diff --git a/bundles/org.eclipse.swt/Eclipse SWT Accessibility/common/org/eclipse/swt/accessibility/AccessibleListener.java b/bundles/org.eclipse.swt/Eclipse SWT Accessibility/common/org/eclipse/swt/accessibility/AccessibleListener.java
index 076388d2ce..9231539962 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT Accessibility/common/org/eclipse/swt/accessibility/AccessibleListener.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT Accessibility/common/org/eclipse/swt/accessibility/AccessibleListener.java
@@ -36,9 +36,10 @@ public interface AccessibleListener extends SWTEventListener {
* Sent when an accessibility client requests the name
* of the control, or the name of a child of the control.
*
- * @param e an event object containing the following fields:
- * childID [IN] - an identifier specifying the control or one of its children
- * result [OUT] - the requested name string
+ * @param e an event object containing the following fields:<ul>
+ * <li>childID [IN] - an identifier specifying the control or one of its children</li>
+ * <li>result [OUT] - the requested name string</li>
+ * </ul>
*/
public void getName(AccessibleEvent e);
@@ -46,9 +47,10 @@ public interface AccessibleListener extends SWTEventListener {
* Sent when an accessibility client requests the help string
* of the control, or the help string of a child of the control.
*
- * @param e an event object containing the following fields:
- * childID [IN] - an identifier specifying the control or one of its children
- * result [OUT] - the requested help string
+ * @param e an event object containing the following fields:<ul>
+ * <li>childID [IN] - an identifier specifying the control or one of its children</li>
+ * <li>result [OUT] - the requested help string</li>
+ * </ul>
*/
public void getHelp(AccessibleEvent e);
@@ -56,9 +58,10 @@ public interface AccessibleListener extends SWTEventListener {
* Sent when an accessibility client requests the keyboard shortcut
* of the control, or the keyboard shortcut of a child of the control.
*
- * @param e an event object containing the following fields:
- * childID [IN] - an identifier specifying the control or one of its children
- * result [OUT] - the requested keyboard shortcut string (example: "CTRL+C")
+ * @param e an event object containing the following fields:<ul>
+ * <li>childID [IN] - an identifier specifying the control or one of its children</li>
+ * <li>result [OUT] - the requested keyboard shortcut string (example: "CTRL+C")</li>
+ * </ul>
*/
public void getKeyboardShortcut(AccessibleEvent e);
@@ -66,9 +69,10 @@ public interface AccessibleListener extends SWTEventListener {
* Sent when an accessibility client requests a description
* of the control, or a description of a child of the control.
*
- * @param e an event object containing the following fields:
- * childID [IN] - an identifier specifying the control or one of its children
- * result [OUT] - the requested description string
+ * @param e an event object containing the following fields:<ul>
+ * <li>childID [IN] - an identifier specifying the control or one of its children</li>
+ * <li>result [OUT] - the requested description string</li>
+ * </ul>
*/
public void getDescription(AccessibleEvent e);
}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT Accessibility/win32/org/eclipse/swt/accessibility/Accessible.java b/bundles/org.eclipse.swt/Eclipse SWT Accessibility/win32/org/eclipse/swt/accessibility/Accessible.java
index 2fbbd766ba..65a7ffe696 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT Accessibility/win32/org/eclipse/swt/accessibility/Accessible.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT Accessibility/win32/org/eclipse/swt/accessibility/Accessible.java
@@ -7,7 +7,8 @@ package org.eclipse.swt.accessibility;
import java.util.Vector;
import org.eclipse.swt.*;
-import org.eclipse.swt.widgets.Control;
+import org.eclipse.swt.widgets.*;
+import org.eclipse.swt.events.*;
import org.eclipse.swt.internal.win32.*;
import org.eclipse.swt.ole.win32.*;
import org.eclipse.swt.internal.ole.win32.*;
@@ -79,6 +80,16 @@ public class Accessible {
public int method5(int[] args) {return Reset();}
// method6 Clone - not implemented
};
+ AddRef();
+
+ control.addDisposeListener(new DisposeListener() {
+ public void widgetDisposed(DisposeEvent e) {
+ if (iaccessible != null)
+ iaccessible.Release();
+ iaccessible = null;
+ Release();
+ }
+ });
}
public static Accessible internal_new_accessible(Control control) {
@@ -124,6 +135,7 @@ public class Accessible {
if (debug)
System.out.println("IUnknown");
COM.MoveMemory(arg2, new int[] { objIAccessible.getAddress()}, 4);
+ AddRef();
return COM.S_OK;
}
@@ -131,6 +143,7 @@ public class Accessible {
if (debug)
System.out.println("IDispatch");
COM.MoveMemory(arg2, new int[] { objIAccessible.getAddress()}, 4);
+ AddRef();
return COM.S_OK;
}
@@ -138,6 +151,7 @@ public class Accessible {
if (debug)
System.out.println("IAccessible");
COM.MoveMemory(arg2, new int[] { objIAccessible.getAddress()}, 4);
+ AddRef();
return COM.S_OK;
}
@@ -152,6 +166,7 @@ public class Accessible {
variants = event.children;
enumIndex = 0;
COM.MoveMemory(arg2, new int[] { objIEnumVARIANT.getAddress()}, 4);
+ AddRef();
return COM.S_OK;
}
@@ -176,7 +191,13 @@ public class Accessible {
refCount--;
if (refCount == 0) {
- //disposeCOMInterfaces();
+ if (objIAccessible != null)
+ objIAccessible.dispose();
+ objIAccessible = null;
+
+ if (objIEnumVARIANT != null)
+ objIEnumVARIANT.dispose();
+ objIEnumVARIANT = null;
}
return refCount;
}
@@ -224,7 +245,7 @@ public class Accessible {
event.y = yTop;
for (int i = 0; i < accessibleControlListeners.size(); i++) {
AccessibleControlListener listener = (AccessibleControlListener) accessibleControlListeners.elementAt(i);
- listener.accHitTest(event);
+ listener.hitTest(event);
}
int childID = event.childID;
if (childID == ACC.CHILDID_NONE) {
@@ -248,7 +269,7 @@ public class Accessible {
event.childID = varChild_lVal;
for (int i = 0; i < accessibleControlListeners.size(); i++) {
AccessibleControlListener listener = (AccessibleControlListener) accessibleControlListeners.elementAt(i);
- listener.accLocation(event);
+ listener.getLocation(event);
}
OS.MoveMemory(pxLeft, new int[] { event.x }, 4);
OS.MoveMemory(pyTop, new int[] { event.y }, 4);
@@ -283,7 +304,7 @@ public class Accessible {
event.childID = varStart_lVal;
for (int i = 0; i < accessibleControlListeners.size(); i++) {
AccessibleControlListener listener = (AccessibleControlListener) accessibleControlListeners.elementAt(i);
- listener.accNavigate(event);
+ listener.navigate(event);
}
Accessible accessible = event.accessible;
if (accessible != null) {
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Control.java b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Control.java
index 7e0bcc8794..245abe6ec6 100755
--- a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Control.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Control.java
@@ -1385,6 +1385,7 @@ void releaseWidget () {
unsubclass ();
parent = null;
layoutData = null;
+ accessible = null;
}
/**

Back to the top