From 69dd1d7ca8ce918c393b673f56e012aed6973c90 Mon Sep 17 00:00:00 2001 From: billh Date: Tue, 9 Oct 2001 18:16:03 +0000 Subject: [PATCH] Added some new API in response to user (ATV) feedback. 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 | 21 +++++++++++++++++++++ cspi/spi_registry.c | 9 +++++++-- idl/Accessibility_Accessible.idl | 8 ++++++++ idl/Accessibility_Registry.idl | 16 ++++++++++++++-- idl/Accessibility_Relation.idl | 4 +++- idl/Accessibility_State.idl | 2 ++ idl/Accessible.idl | 8 ++++++++ idl/Registry.idl | 16 ++++++++++++++-- idl/Relation.idl | 4 +++- idl/State.idl | 2 ++ 10 files changed, 82 insertions(+), 8 deletions(-) diff --git a/ChangeLog b/ChangeLog index ee18d16..ae4fbf4 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,4 +1,25 @@ <2001-10-09 Bill Haneman + + * 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. diff --git a/cspi/spi_registry.c b/cspi/spi_registry.c index 37b4b45..28f39de 100644 --- a/cspi/spi_registry.c +++ b/cspi/spi_registry.c @@ -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); } diff --git a/idl/Accessibility_Accessible.idl b/idl/Accessibility_Accessible.idl index ac137c5..79785e7 100644 --- a/idl/Accessibility_Accessible.idl +++ b/idl/Accessibility_Accessible.idl @@ -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. diff --git a/idl/Accessibility_Registry.idl b/idl/Accessibility_Registry.idl index 3308029..5f42d87 100644 --- a/idl/Accessibility_Registry.idl +++ b/idl/Accessibility_Registry.idl @@ -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: diff --git a/idl/Accessibility_Relation.idl b/idl/Accessibility_Relation.idl index d1a526b..8941b34 100644 --- a/idl/Accessibility_Relation.idl +++ b/idl/Accessibility_Relation.idl @@ -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 }; /* diff --git a/idl/Accessibility_State.idl b/idl/Accessibility_State.idl index 5ec266c..732c177 100644 --- a/idl/Accessibility_State.idl +++ b/idl/Accessibility_State.idl @@ -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 */ diff --git a/idl/Accessible.idl b/idl/Accessible.idl index ac137c5..79785e7 100644 --- a/idl/Accessible.idl +++ b/idl/Accessible.idl @@ -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. diff --git a/idl/Registry.idl b/idl/Registry.idl index 3308029..5f42d87 100644 --- a/idl/Registry.idl +++ b/idl/Registry.idl @@ -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: diff --git a/idl/Relation.idl b/idl/Relation.idl index d1a526b..8941b34 100644 --- a/idl/Relation.idl +++ b/idl/Relation.idl @@ -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 }; /* diff --git a/idl/State.idl b/idl/State.idl index 5ec266c..732c177 100644 --- a/idl/State.idl +++ b/idl/State.idl @@ -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 */ -- 2.7.4