java-access-bridge r222 - in trunk: . bridge/org/GNOME/Accessibility util/org/GNOME/Accessibility
- From: jeffcai svn gnome org
- To: svn-commits-list gnome org
- Subject: java-access-bridge r222 - in trunk: . bridge/org/GNOME/Accessibility util/org/GNOME/Accessibility
- Date: Tue, 3 Jun 2008 07:29:47 +0000 (UTC)
Author: jeffcai
Date: Tue Jun 3 07:29:47 2008
New Revision: 222
URL: http://svn.gnome.org/viewvc/java-access-bridge?rev=222&view=rev
Log:
2008-06-03 Jeff Cai <jeff cai sun com>
* bridge/org/GNOME/Accessibility/JavaBridge.java: (JavaBridge):
* util/org/GNOME/Accessibility/EventQueueRegistry.java:
(EventQueueRegistry.EventProcessor.processEvent):
Provide host_application for events to registryd.
Fix bug #531869
Modified:
trunk/ChangeLog
trunk/bridge/org/GNOME/Accessibility/JavaBridge.java
trunk/util/org/GNOME/Accessibility/EventQueueRegistry.java
Modified: trunk/bridge/org/GNOME/Accessibility/JavaBridge.java
==============================================================================
--- trunk/bridge/org/GNOME/Accessibility/JavaBridge.java (original)
+++ trunk/bridge/org/GNOME/Accessibility/JavaBridge.java Tue Jun 3 07:29:47 2008
@@ -52,6 +52,7 @@
static String oldEventName = null;
static int oldDetail1 = -1;
static boolean debugFlag = false;
+ static Application the_app;
javax.accessibility.Accessible appAccessible;
@@ -87,7 +88,15 @@
}
if (ac != null) {
org.GNOME.Accessibility.Accessible accessible = getAccessibleObjectFactory().getAccessible(ac);
- any.insert_Object (accessible, AccessUtil.getORB().get_primitive_tc (TCKind.tk_objref));
+
+ EventDetails ed = new EventDetails();
+ ed.host_application = the_app;
+ ed.source_role = accessible.getRole();
+ ed.source_name = accessible.name();
+ ed.any_data = AccessUtil.getORB().create_any ();
+ ed.any_data.insert_Object (accessible, AccessUtil.getORB().get_primitive_tc (TCKind.tk_objref));
+ EventDetailsHelper.insert (any, ed);
+
detail1 = ac.getAccessibleIndexInParent ();
}
dispatchEvent(source,
@@ -121,7 +130,7 @@
if ( textEvent ) {
int selection_start = 0, selection_end = 0;
int selection_change_start = 0, selection_change_end = 0;
- org.omg.CORBA.Any selection_any = AccessUtil.getORB().create_any ();
+ org.omg.CORBA.Any any = AccessUtil.getORB().create_any ();
AccessibleContext ac = null;
if (source instanceof AccessibleContext)
ac = (AccessibleContext) source;
@@ -162,14 +171,21 @@
selection_change_end = selection_end;
}
if (new_selection) {
- selection_any.insert_string (oldFocusText.substring (
+ org.GNOME.Accessibility.Accessible accessible = getAccessibleObjectFactory().getAccessible(ac);
+ EventDetails ed = new EventDetails();
+ ed.host_application = the_app;
+ ed.source_role = accessible.getRole();
+ ed.source_name = accessible.name();
+ ed.any_data = AccessUtil.getORB().create_any();
+ ed.any_data.insert_string (oldFocusText.substring (
Math.min (selection_change_start,
selection_change_end),
Math.max (selection_change_start,
selection_change_end)));
+ EventDetailsHelper.insert (any, ed);
dispatchEvent(source,
"object:text-selection-changed",
- selection_start, selection_end, selection_any);
+ selection_start, selection_end, any);
}
}
else {
@@ -408,9 +424,20 @@
// eventSource.toString() );
return;
}
+
org.GNOME.Accessibility.Accessible accessible =
getAccessibleObjectFactory().
getAccessible(ac);
+
+ if (!any.type().equivalent(EventDetailsHelper.type())) {
+ EventDetails ed = new EventDetails();
+ ed.host_application = the_app;
+ ed.source_role = accessible.getRole();
+ ed.source_name = accessible.name();
+ ed.any_data = AccessUtil.getORB().create_any();
+ EventDetailsHelper.insert (any, ed);
+ }
+
org.GNOME.Accessibility.Event event =
new org.GNOME.Accessibility.Event (eventName,
accessible,
@@ -453,7 +480,6 @@
public static void dispatchFocusEvent(java.lang.Object eventSource) {
AccessibleContext ctx;
- org.omg.CORBA.Any any = AccessUtil.getORB().create_any ();
// System.err.println ("dispatchFocusEvent: " + eventSource);
if (eventSource == null) {
@@ -546,6 +572,14 @@
}
org.GNOME.Accessibility.Accessible accessible =
JavaBridge.getAccessibleObjectFactory().getAccessible(ctx);
+
+ org.omg.CORBA.Any any = AccessUtil.getORB().create_any ();
+ EventDetails ed = new EventDetails();
+ ed.host_application = the_app;
+ ed.source_role = accessible.getRole();
+ ed.source_name = accessible.name();
+ ed.any_data = AccessUtil.getORB().create_any ();
+ EventDetailsHelper.insert (any, ed);
org.GNOME.Accessibility.Event event = new org.GNOME.Accessibility.Event
("focus:", accessible, 0, 0, any);
// System.out.println("focus: " + ctx);
@@ -1064,6 +1098,7 @@
Application aref = getAccessibleObjectFactory().
getApplication(appAccessible.getAccessibleContext());
+ the_app = aref;
if (debugFlag)
System.err.println(aref);
Modified: trunk/util/org/GNOME/Accessibility/EventQueueRegistry.java
==============================================================================
--- trunk/util/org/GNOME/Accessibility/EventQueueRegistry.java (original)
+++ trunk/util/org/GNOME/Accessibility/EventQueueRegistry.java Tue Jun 3 07:29:47 2008
@@ -219,6 +219,7 @@
}
}
catch ( Exception ex ) {
+ ex.printStackTrace();
System.err.println("processEvent : Exception Caught : " + ex.toString() );
}
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]