Added some new API in response to user (ATV) feedback.
authorbillh <billh@e2bd861d-eb25-0410-b326-f6ed22b6b98c>
Tue, 9 Oct 2001 18:16:03 +0000 (18:16 +0000)
committerbillh <billh@e2bd861d-eb25-0410-b326-f6ed22b6b98c>
Tue, 9 Oct 2001 18:16:03 +0000 (18:16 +0000)
Modified keystrokeListener API slightly, to allow more specific
filtration.  Added Accessible_isEqual().

git-svn-id: http://svn.gnome.org/svn/at-spi/trunk@76 e2bd861d-eb25-0410-b326-f6ed22b6b98c

ChangeLog
cspi/spi_registry.c
idl/Accessibility_Accessible.idl
idl/Accessibility_Registry.idl
idl/Accessibility_Relation.idl
idl/Accessibility_State.idl
idl/Accessible.idl
idl/Registry.idl
idl/Relation.idl
idl/State.idl

index ee18d16..ae4fbf4 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,4 +1,25 @@
 <2001-10-09  Bill Haneman <bill.haneman@sun.com>
+
+       * idl/Accessible.idl:
+               Added 'isEqual (Accessible *object)' 
+       method for Accessible. (Not Yet Implemented).
+       
+       * idl/Registry.idl:
+               Changed signature of registerKeystrokeListener() to
+       take a KeySet and KeyEventSeq so that specific keys and event
+       types could be requested for monitoring, and added a flag
+       is_synchronous so that either synchronous or asynchronous
+       notification could be requested.  (However this is not all
+       implemented yet). This also meant adding two new typedefs,
+       KeyEventSeq and KeySet.
+
+       * idl/Relation.idl: 
+               Added two new relations, RELATION_TOOLTIP_FOR and
+       RELATION_LEAFNODE_OF.
+
+       * idl/State.idl:
+               Added new state, STATE_HAS_TOOLTIP.
+       
        * libspi/text.c, editabletext.c:
                Added new assertions to all casts of bonobo-objects from
        CORBA servants, to prevent Text API calls on non-text objects.
index 37b4b45..28f39de 100644 (file)
@@ -116,6 +116,8 @@ registerKeystrokeListener (KeystrokeListener *listener, KeyMaskType keymask)
          Accessibility_ControllerEventMask__alloc();
   Accessibility_DeviceEventController device_event_controller = 
          Accessibility_Registry_getDeviceEventController (registry, &ev);
+  Accessibility_KeySet *all_keys = Accessibility_KeySet__alloc();
+  Accessibility_KeyEventTypeSeq *key_events = Accessibility_KeyEventTypeSeq__alloc();
   Accessibility_DeviceEventController_ref (device_event_controller, &ev);
   controller_event_mask->value = (CORBA_unsigned_long) keymask;
   controller_event_mask->refcount = (CORBA_unsigned_short) 1;
@@ -123,13 +125,16 @@ registerKeystrokeListener (KeystrokeListener *listener, KeyMaskType keymask)
   fprintf (stderr, "controller %p, mask value %lu\n", (void *) device_event_controller,
           (unsigned long) controller_event_mask->value );
   */
-  Accessibility_DeviceEventController_generateKeyEvent (device_event_controller,
-                                                       (CORBA_long) 32, &ev);
+
+
   Accessibility_DeviceEventController_registerKeystrokeListener (
          device_event_controller,
          (Accessibility_KeystrokeListener)
              bonobo_object_corba_objref (bonobo_object (listener)),
+         all_keys,
          controller_event_mask,
+         key_events,
+         (CORBA_boolean) TRUE,
          &ev);
 }
 
index ac137c5..79785e7 100644 (file)
@@ -60,6 +60,14 @@ module Accessibility {
     readonly attribute long            childCount;
 
     /**
+     * isEqual:
+     * @object: an #Accessible object reference to compare to
+     * return values: a #boolean indicating whether the two object references
+     *         point to the same object. 
+     **/
+    boolean isEqual (in Accessible object);
+
+    /**
      * getChildAtIndex:
      * @index: an in parameter indicating which child is requested (zero-indexed).
      * return values: the 'nth' @Accessible child of this object.
index 3308029..5f42d87 100644 (file)
@@ -179,6 +179,9 @@ module Accessibility {
     unsigned short modifiers;
   };
 
+  typedef sequence< long > KeySet;
+  typedef sequence< KeyEventType > KeyEventTypeSeq;
+
   interface KeystrokeListener {
         boolean keyEvent (in KeyStroke key);
   };
@@ -188,15 +191,24 @@ module Accessibility {
        /**
          * registerKeystrokeListener:
          * @listener: a @KeystrokeListener which will intercept key events.
+         * @keys:     a @KeySet indicating which keys to intercept, or KEYSET_ALL_KEYS.
          * @mask:     a @ControllerEventMask filtering the intercepted key events.
+        * @type:     an @EventType mask that may created by ORing event types together.
+        * @is_synchronous: a @boolean indicating whether the listener should 
+        *            receive the events synchronously, potentially consuming them,
+        *            or just be notified asynchronously of those events that have
+        *            been generated.
         * Returns: void
          *
          * Register to intercept keyboard events, and either pass them on or
          * consume them. 
          *
         **/
-        void registerKeystrokeListener (in KeystrokeListener listener, 
-                                       in ControllerEventMask mask);
+        void registerKeystrokeListener (in KeystrokeListener listener,
+                                       in KeySet keys,
+                                       in ControllerEventMask mask,
+                                       in KeyEventTypeSeq type,
+                                       in boolean is_synchronous);
     
         /**
          * generateKeyEvent:
index d1a526b..8941b34 100644 (file)
@@ -30,7 +30,9 @@ module Accessibility {
     RELATION_LABELLED_BY,
     RELATION_CONTROLLER_FOR,
     RELATION_CONTROLLED_BY,
-    RELATION_MEMBER_OF
+    RELATION_MEMBER_OF,
+    RELATION_TOOLTIP_FOR,
+    RELATION_LEAFNODE_OF
   };
 
   /*
index 5ec266c..732c177 100644 (file)
@@ -51,6 +51,8 @@ module Accessibility {
   STATE_FOCUSABLE,
   /* Indicates this object currently has the keyboard focus */
   STATE_FOCUSED,
+  /* Indicates that the object has an associated tooltip */
+  STATE_HAS_TOOLTIP,
   /* Indicates the orientation of thsi object is horizontal */
   STATE_HORIZONTAL,
   /* Indicates this object is minimized and is represented only by an icon */
index ac137c5..79785e7 100644 (file)
@@ -60,6 +60,14 @@ module Accessibility {
     readonly attribute long            childCount;
 
     /**
+     * isEqual:
+     * @object: an #Accessible object reference to compare to
+     * return values: a #boolean indicating whether the two object references
+     *         point to the same object. 
+     **/
+    boolean isEqual (in Accessible object);
+
+    /**
      * getChildAtIndex:
      * @index: an in parameter indicating which child is requested (zero-indexed).
      * return values: the 'nth' @Accessible child of this object.
index 3308029..5f42d87 100644 (file)
@@ -179,6 +179,9 @@ module Accessibility {
     unsigned short modifiers;
   };
 
+  typedef sequence< long > KeySet;
+  typedef sequence< KeyEventType > KeyEventTypeSeq;
+
   interface KeystrokeListener {
         boolean keyEvent (in KeyStroke key);
   };
@@ -188,15 +191,24 @@ module Accessibility {
        /**
          * registerKeystrokeListener:
          * @listener: a @KeystrokeListener which will intercept key events.
+         * @keys:     a @KeySet indicating which keys to intercept, or KEYSET_ALL_KEYS.
          * @mask:     a @ControllerEventMask filtering the intercepted key events.
+        * @type:     an @EventType mask that may created by ORing event types together.
+        * @is_synchronous: a @boolean indicating whether the listener should 
+        *            receive the events synchronously, potentially consuming them,
+        *            or just be notified asynchronously of those events that have
+        *            been generated.
         * Returns: void
          *
          * Register to intercept keyboard events, and either pass them on or
          * consume them. 
          *
         **/
-        void registerKeystrokeListener (in KeystrokeListener listener, 
-                                       in ControllerEventMask mask);
+        void registerKeystrokeListener (in KeystrokeListener listener,
+                                       in KeySet keys,
+                                       in ControllerEventMask mask,
+                                       in KeyEventTypeSeq type,
+                                       in boolean is_synchronous);
     
         /**
          * generateKeyEvent:
index d1a526b..8941b34 100644 (file)
@@ -30,7 +30,9 @@ module Accessibility {
     RELATION_LABELLED_BY,
     RELATION_CONTROLLER_FOR,
     RELATION_CONTROLLED_BY,
-    RELATION_MEMBER_OF
+    RELATION_MEMBER_OF,
+    RELATION_TOOLTIP_FOR,
+    RELATION_LEAFNODE_OF
   };
 
   /*
index 5ec266c..732c177 100644 (file)
@@ -51,6 +51,8 @@ module Accessibility {
   STATE_FOCUSABLE,
   /* Indicates this object currently has the keyboard focus */
   STATE_FOCUSED,
+  /* Indicates that the object has an associated tooltip */
+  STATE_HAS_TOOLTIP,
   /* Indicates the orientation of thsi object is horizontal */
   STATE_HORIZONTAL,
   /* Indicates this object is minimized and is represented only by an icon */