From: michael Date: Tue, 11 Dec 2001 16:56:17 +0000 (+0000) Subject: 2001-12-11 Michael Meeks X-Git-Tag: AT_SPI2_ATK_2_12_0~1473 X-Git-Url: http://review.tizen.org/git/?p=platform%2Fcore%2Fuifw%2Fat-spi2-atk.git;a=commitdiff_plain;h=05d0a8cfed1bd502794ba482cf4d4e7e1a0ff37a 2001-12-11 Michael Meeks * libspi/image.c (impl_getImageExtents): impl. (spi_image_class_init): upd. * cspi/spi_image.c (AccessibleImage_getImageDescription): fix daft bug of mine (doh). * test/test-simple.c (global_listener_cb): update to only quit if not --poke (main): catch --poke. (validate_accessible): upd. dumping, call test_image (test_image): impl. * libspi/Makefile.am (IDL_DEPS): fixup the IDL dependencies. * idl/Accessibility.idl: update all IDL includes. * idl/*.idl - rename to namespace - this sucks, blame mjs' bad decision for oafd. * test/test-simple.c (create_test_window): add more tests. (create_tree): split this out. (validate_accessible): bugfix. git-svn-id: http://svn.gnome.org/svn/at-spi/trunk@176 e2bd861d-eb25-0410-b326-f6ed22b6b98c --- diff --git a/ChangeLog b/ChangeLog index 6c7b2ff..3bf2bc6 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,32 @@ 2001-12-11 Michael Meeks + * libspi/image.c (impl_getImageExtents): impl. + (spi_image_class_init): upd. + + * cspi/spi_image.c + (AccessibleImage_getImageDescription): fix daft bug + of mine (doh). + + * test/test-simple.c (global_listener_cb): update + to only quit if not --poke + (main): catch --poke. + (validate_accessible): upd. dumping, call test_image + (test_image): impl. + + * libspi/Makefile.am (IDL_DEPS): fixup the IDL + dependencies. + + * idl/Accessibility.idl: update all IDL includes. + + * idl/*.idl - rename to namespace - this sucks, blame + mjs' bad decision for oafd. + + * test/test-simple.c (create_test_window): add more tests. + (create_tree): split this out. + (validate_accessible): bugfix. + +2001-12-11 Michael Meeks + * cspi/bonobo/cspi-bonobo-listener.c: (cspi_kestroke_listener_unref), (cspi_event_listener_unref): impl. undoing previous diff --git a/TODO b/TODO index e667d33..e0ca69d 100644 --- a/TODO +++ b/TODO @@ -1,11 +1,11 @@ TODO: idl: - + possibly change Value.idl interface to return a value union. [Bill] + audit IDL for conformance with bonobo/doc/FAQ's [Java] naming practice [Michael] + possibly change Value.idl interface to return a value union. [Bill] *DONE* + + rename all IDL prepending Accessibility_ to each IDL filename cspi: + API change required if above IDL change is made. [Bill] diff --git a/cspi/spi_image.c b/cspi/spi_image.c index 8349d8e..bf5360e 100644 --- a/cspi/spi_image.c +++ b/cspi/spi_image.c @@ -45,7 +45,7 @@ AccessibleImage_getImageDescription (AccessibleImage *obj) cspi_return_val_if_ev ("getImageDescription", NULL); - return NULL; + return retval; } /** diff --git a/idl/Accessibility.idl b/idl/Accessibility.idl index c2b425c..990324a 100644 --- a/idl/Accessibility.idl +++ b/idl/Accessibility.idl @@ -35,35 +35,35 @@ /* * Accessibility interfaces and subinterfaces */ -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include /* * Interfaces derived from Accessibility::Text */ -#include -#include +#include +#include /* * Utility interfaces and interfaces derived from Accessibility::Accessible */ -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include #ifndef __ACCESSIBILITY_COMPILATION__ #ifdef __ORBIT_IDL__ diff --git a/idl/Accessibility_Accessible.idl b/idl/Accessibility_Accessible.idl index cfebaa9..6aed266 100644 --- a/idl/Accessibility_Accessible.idl +++ b/idl/Accessibility_Accessible.idl @@ -25,9 +25,9 @@ #include -#include "Relation.idl" -#include "State.idl" -#include "Role.idl" +#include "Accessibility_Relation.idl" +#include "Accessibility_State.idl" +#include "Accessibility_Role.idl" module Accessibility { diff --git a/idl/Accessibility_Application.idl b/idl/Accessibility_Application.idl index b921af6..50482eb 100644 --- a/idl/Accessibility_Application.idl +++ b/idl/Accessibility_Application.idl @@ -24,7 +24,7 @@ #define __ACCESSIBILITY_APPLICATION_DEFINED__ #include -#include +#include module Accessibility { interface Application : Accessible { diff --git a/idl/Accessibility_Component.idl b/idl/Accessibility_Component.idl index 8044557..c453cc3 100644 --- a/idl/Accessibility_Component.idl +++ b/idl/Accessibility_Component.idl @@ -20,7 +20,7 @@ * Boston, MA 02111-1307, USA. */ -#include +#include module Accessibility { diff --git a/idl/Accessibility_Desktop.idl b/idl/Accessibility_Desktop.idl index 5702fb3..315efa1 100644 --- a/idl/Accessibility_Desktop.idl +++ b/idl/Accessibility_Desktop.idl @@ -24,7 +24,7 @@ #define __ACCESSIBILITY_DESKTOP_DEFINED__ #include -#include +#include module Accessibility { interface Desktop : Accessible { diff --git a/idl/Accessibility_Hyperlink.idl b/idl/Accessibility_Hyperlink.idl index f62a760..6d21519 100644 --- a/idl/Accessibility_Hyperlink.idl +++ b/idl/Accessibility_Hyperlink.idl @@ -20,7 +20,7 @@ * Boston, MA 02111-1307, USA. */ -#include +#include module Accessibility { diff --git a/idl/Accessibility_Registry.idl b/idl/Accessibility_Registry.idl index 52d3c2a..10e45dd 100644 --- a/idl/Accessibility_Registry.idl +++ b/idl/Accessibility_Registry.idl @@ -21,9 +21,9 @@ */ #include -#include -#include -#include +#include +#include +#include #ifndef _ACCESSIBILITY_REGISTRY_IDL_ #define _ACCESSIBILITY_REGISTRY_IDL_ diff --git a/idl/Accessibility_Selection.idl b/idl/Accessibility_Selection.idl index 42a2dfb..42cadf5 100644 --- a/idl/Accessibility_Selection.idl +++ b/idl/Accessibility_Selection.idl @@ -20,7 +20,7 @@ * Boston, MA 02111-1307, USA. */ -#include +#include module Accessibility { diff --git a/idl/Accessibility_Table.idl b/idl/Accessibility_Table.idl index f964957..acda3c3 100644 --- a/idl/Accessibility_Table.idl +++ b/idl/Accessibility_Table.idl @@ -20,7 +20,7 @@ * Boston, MA 02111-1307, USA. */ -#include +#include module Accessibility { diff --git a/idl/Accessible.idl b/idl/Accessible.idl deleted file mode 100644 index cfebaa9..0000000 --- a/idl/Accessible.idl +++ /dev/null @@ -1,123 +0,0 @@ -/* - * AT-SPI - Assistive Technology Service Provider Interface - * (Gnome Accessibility Project; http://developer.gnome.org/projects/gap) - * - * Copyright 2001 Sun Microsystems Inc. - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Library General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Library General Public License for more details. - * - * You should have received a copy of the GNU Library General Public - * License along with this library; if not, write to the - * Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. - */ - -#ifndef _ACCESSIBILITY_ACCESSIBLE_IDL -#define _ACCESSIBILITY_ACCESSIBLE_IDL - -#include - -#include "Relation.idl" -#include "State.idl" -#include "Role.idl" - -module Accessibility { - - typedef sequence RelationSet; - - struct BoundingBox { - long x; - long y; - long width; - long height; - }; - - interface Accessible : Bonobo::Unknown { - - /** - * @name: a (short) #string representing the object's name. - **/ - attribute string name; - - /** - * @description: a #string describing the object in more detail than @name. - **/ - attribute string description; - - /** - * @parent: an #Accessible object which is this object's containing object. - **/ - readonly attribute Accessible parent; - - /** - * @childCount: the number of children contained by this object. - **/ - readonly attribute long childCount; - - /** - * isEqual: - * @obj: an #Accessible object reference to compare to - * - * Determine whether an #Accessible refers to the same object as another - * - * Returns: a #boolean indicating whether the two object references - * point to the same object. - **/ - boolean isEqual (in Accessible obj); - - /** - * getChildAtIndex: - * @index: an in parameter indicating which child is requested (zero-indexed). - * - * Get the accessible child of this object at index @index. - * - * Returns: the 'nth' @Accessible child of this object. - **/ - Accessible getChildAtIndex (in long index); - - /** - * getIndexInParent: - * - * Get the index of this object in its parent's child list. - * - * Returns: a long integer indicating this object's index in the parent's list. - **/ - long getIndexInParent (); - - /** - * getRelationSet: - * - * Get a set defining this object's relationship to other accessible objects. - * - * Returns: a @RelationSet defining this object's relationships. - **/ - RelationSet getRelationSet (); - - /** - * getRole: - * Get the @Role indicating the type of UI role played by this object. - * - * Returns: a @Role indicating the type of UI role played by this object. - **/ - Role getRole (); - - /** - * getState: - * - * Get the current state of the object as a @StateSet. - * Returns: a @StateSet encapsulating the currently true states of the object. - **/ - StateSet getState (); - }; -}; - -#endif - diff --git a/idl/Action.idl b/idl/Action.idl deleted file mode 100644 index 7a458c7..0000000 --- a/idl/Action.idl +++ /dev/null @@ -1,81 +0,0 @@ -/* - * AT-SPI - Assistive Technology Service Provider Interface - * (Gnome Accessibility Project; http://developer.gnome.org/projects/gap) - * - * Copyright 2001 Sun Microsystems, Inc. - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Library General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Library General Public License for more details. - * - * You should have received a copy of the GNU Library General Public - * License along with this library; if not, write to the - * Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. - */ - -module Accessibility { - - interface Action : Bonobo::Unknown { - - /** - * nActions: a @long containing the number of actions this object supports. - * - **/ - readonly attribute long nActions; - - /** - * getDescription: - * @index: an %in parameter specifying the index of the action - * for which a description is desired. - * - * Gets the description of the specified action. - * - * Returns: a @wstring containing the description of the specified action. - * - **/ - string getDescription (in long index); - - /** - * getName: - * @index: an %in parameter specifying the index of the action - * whose name is requested. - * - * Gets the name of the specified action. - * - * Returns: a @string containing the name of the specified action. - * - **/ - string getName (in long index); - - /** - * doAction: - * @index: an %in parameter specifying the 0-based index of the action to perform. - * - * Causes the object to perform the specified action. - * - * Returns: a @boolean indicating success or failure. - * - **/ - boolean doAction (in long index); - - /** - * getKeyBinding: - * @index: an %in parameter specifying the 0-based index of the action - * for which a key binding is requested. - * - * Gets the key binding associated with a specific action. - * - * Returns: a @string containing the key binding for the specified action, - * "" if none exists. - **/ - string getKeyBinding (in long index); - }; -}; - diff --git a/idl/Application.idl b/idl/Application.idl deleted file mode 100644 index b921af6..0000000 --- a/idl/Application.idl +++ /dev/null @@ -1,105 +0,0 @@ -/* - * AT-SPI - Assistive Technology Service Provider Interface - * (Gnome Accessibility Project; http://developer.gnome.org/projects/gap) - * - * Copyright 2001 Sun Microsystems Inc. - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Library General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Library General Public License for more details. - * - * You should have received a copy of the GNU Library General Public - * License along with this library; if not, write to the - * Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. - */ - -#ifndef __ACCESSIBILITY_APPLICATION_DEFINED__ -#define __ACCESSIBILITY_APPLICATION_DEFINED__ - -#include -#include - -module Accessibility { - interface Application : Accessible { - - /** - * @toolkitName: - * A string indicating the type of user interface toolkit - * which is used by the application. - * Ordinarily clients of @AccessibleApplication should be - * toolkit-agnostic, dependencies on this method probably - * should be reconsidered! - **/ - readonly attribute string toolkitName; - - /** - * @version: - * A string indicating the version number of the application's - * accessibility bridge implementation. - **/ - readonly attribute string version; - - /** - * @id: - * The application instance's unique ID as assigned by the registry. - **/ - attribute long id; - - /** - * registerToolkitEventListener: - * @listener: an #EventListener object which will receive the requested - * events from the application's toolkits via toolit 'bridges' - * @eventName: a UTF-8 string indicating the type of (toolkit-specific) event - * being requested. Not all applications can generate toolkit events of - * a given type. - * - * Register with this application's toolkit for "toolkit-specific" event notifications. - * For most event support, clients should use non-toolkit-specific events - * whenever possible, via #Registry::registerGlobalEventListener - this method - * is provided as a 'back door' when generic names do not exist for the events in question. - * SUBJECT TO DEPRECATION in favor of Registry::registerGlobalEventListener forms. - * - **/ - void registerToolkitEventListener (in EventListener listener, in string eventName); - - /** - * registerObjectEventListener: - * @listener: an #EventListener object which will receive the requested - * events - * @eventName: a UTF-8 string indicating the type of (toolkit-specific) event - * being requested. - * Register with this application toolkit for "Accessibility::Accessible" - * event notifications. SUBJECT TO DEPRECATION - * - **/ - void registerObjectEventListener (in EventListener listener, in string eventName); - - /** - * pause: - * - * Request that the application temporarily stop sending events. - * In most cases this should pause the application's main event loop. - * - * Returns: %true if the request succeeded, %false otherwise. - **/ - boolean pause (); - - /** - * resume: - * - * Request that the application resume sending events. - * - * Returns: %true if the request succeeded, %false otherwise. - **/ - boolean resume (); - }; -}; - -#endif diff --git a/idl/Component.idl b/idl/Component.idl deleted file mode 100644 index 8044557..0000000 --- a/idl/Component.idl +++ /dev/null @@ -1,51 +0,0 @@ -/* - * AT-SPI - Assistive Technology Service Provider Interface - * (Gnome Accessibility Project; http://developer.gnome.org/projects/gap) - * - * Copyright 2001 Sun Microsystems, Inc. - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Library General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Library General Public License for more details. - * - * You should have received a copy of the GNU Library General Public - * License along with this library; if not, write to the - * Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. - */ - -#include - -module Accessibility { - - enum ComponentLayer { - LAYER_INVALID, - LAYER_BACKGROUND, - LAYER_CANVAS, - LAYER_WIDGET, - LAYER_MDI, - LAYER_POPUP, - LAYER_OVERLAY, - LAYER_LAST_DEFINED - }; - - interface Component : Bonobo::Unknown { - - boolean contains (in long x, in long y, in short coord_type); - Accessible getAccessibleAtPoint (in long x, in long y, in short coord_type); - BoundingBox getExtents (in short coord_type); - void getPosition (out long x, out long y, in short coord_type); - void getSize (out long width, out long height); - ComponentLayer getLayer (); - short getMDIZOrder (); - void grabFocus (); - void registerFocusHandler (in EventListener handler); - void deregisterFocusHandler (in EventListener handler); - }; -}; diff --git a/idl/Desktop.idl b/idl/Desktop.idl deleted file mode 100644 index 5702fb3..0000000 --- a/idl/Desktop.idl +++ /dev/null @@ -1,38 +0,0 @@ -/* - * AT-SPI - Assistive Technology Service Provider Interface - * (Gnome Accessibility Project; http://developer.gnome.org/projects/gap) - * - * Copyright 2001 Sun Microsystems Inc. - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Library General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Library General Public License for more details. - * - * You should have received a copy of the GNU Library General Public - * License along with this library; if not, write to the - * Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. - */ - -#ifndef __ACCESSIBILITY_DESKTOP_DEFINED__ -#define __ACCESSIBILITY_DESKTOP_DEFINED__ - -#include -#include - -module Accessibility { - interface Desktop : Accessible { - /** - * At the moment this is only a marker interface, it acts just like - * any other Accessible. - **/ - }; -}; - -#endif diff --git a/idl/EditableText.idl b/idl/EditableText.idl deleted file mode 100644 index dc8218f..0000000 --- a/idl/EditableText.idl +++ /dev/null @@ -1,37 +0,0 @@ -/* - * AT-SPI - Assistive Technology Service Provider Interface - * (Gnome Accessibility Project; http://developer.gnome.org/projects/gap) - * - * Copyright 2001 Sun Microsystems, Inc. - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Library General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Library General Public License for more details. - * - * You should have received a copy of the GNU Library General Public - * License along with this library; if not, write to the - * Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. - */ - -#include - -module Accessibility { - - interface EditableText : Text { - - void setTextContents (in string newContents); - void insertText (in long position, in string text, in long length); - boolean setAttributes (in string attributes, in long startPos, in long endPos); - void copyText (in long startPos, in long endPos); - void cutText (in long startPos, in long endPos); - void deleteText (in long startPos, in long endPos); - void pasteText (in long position); - }; -}; diff --git a/idl/Event.idl b/idl/Event.idl deleted file mode 100644 index 6372c47..0000000 --- a/idl/Event.idl +++ /dev/null @@ -1,45 +0,0 @@ -/* - * AT-SPI - Assistive Technology Service Provider Interface - * (Gnome Accessibility Project; http://developer.gnome.org/projects/gap) - * - * Copyright 2001 Sun Microsystems Inc. - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Library General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Library General Public License for more details. - * - * You should have received a copy of the GNU Library General Public - * License along with this library; if not, write to the - * Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. - */ - -#ifndef __ACCESSIBILITY_EVENT_DEFINED__ -#define __ACCESSIBILITY_EVENT_DEFINED__ - -#include - -module Accessibility -{ - interface Accessible; - - struct Event { - string type; - Accessible source; - long detail1; - long detail2; - }; - - interface EventListener : Bonobo::Unknown { - oneway void notifyEvent (in Event e); - }; - -}; - -#endif diff --git a/idl/Hyperlink.idl b/idl/Hyperlink.idl deleted file mode 100644 index f62a760..0000000 --- a/idl/Hyperlink.idl +++ /dev/null @@ -1,35 +0,0 @@ -/* - * AT-SPI - Assistive Technology Service Provider Interface - * (Gnome Accessibility Project; http://developer.gnome.org/projects/gap) - * - * Copyright 2001 Sun Microsystems, Inc. - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Library General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Library General Public License for more details. - * - * You should have received a copy of the GNU Library General Public - * License along with this library; if not, write to the - * Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. - */ - -#include - -module Accessibility { - - interface Hyperlink : Bonobo::Unknown { - readonly attribute short nAnchors; - readonly attribute long startIndex; - readonly attribute long endIndex; - Accessible getObject (in long i); - string getURI (in long i); - boolean isValid (); - }; -}; diff --git a/idl/Hypertext.idl b/idl/Hypertext.idl deleted file mode 100644 index 383400b..0000000 --- a/idl/Hypertext.idl +++ /dev/null @@ -1,32 +0,0 @@ -/* - * AT-SPI - Assistive Technology Service Provider Interface - * (Gnome Accessibility Project; http://developer.gnome.org/projects/gap) - * - * Copyright 2001 Sun Microsystems, Inc. - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Library General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Library General Public License for more details. - * - * You should have received a copy of the GNU Library General Public - * License along with this library; if not, write to the - * Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. - */ - -#include - -module Accessibility { - - interface Hypertext : Text { - long getNLinks (); - Hyperlink getLink (in long linkIndex); - long getLinkIndex (in long characterIndex); - }; -}; diff --git a/idl/Image.idl b/idl/Image.idl deleted file mode 100644 index d819172..0000000 --- a/idl/Image.idl +++ /dev/null @@ -1,31 +0,0 @@ -/* - * AT-SPI - Assistive Technology Service Provider Interface - * (Gnome Accessibility Project; http://developer.gnome.org/projects/gap) - * - * Copyright 2001 Sun Microsystems, Inc. - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Library General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Library General Public License for more details. - * - * You should have received a copy of the GNU Library General Public - * License along with this library; if not, write to the - * Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. - */ - -module Accessibility { - - interface Image : Bonobo::Unknown { - readonly attribute string imageDescription; - BoundingBox getImageExtents (in short coordType); - void getImagePosition (out long x, out long y, in short coordType); - void getImageSize (out long width, out long height); - }; -}; diff --git a/idl/Makefile.am b/idl/Makefile.am index 01e2cc6..9940931 100644 --- a/idl/Makefile.am +++ b/idl/Makefile.am @@ -1,24 +1,25 @@ idldir = $(datadir)/idl/at-spi-1.0 -idl_DATA = Accessibility.idl \ - Accessible.idl \ - Action.idl \ - Application.idl \ - Component.idl \ - Desktop.idl \ - EditableText.idl \ - Event.idl \ - Hyperlink.idl \ - Hypertext.idl \ - Image.idl \ - Registry.idl \ - Relation.idl \ - Role.idl \ - Selection.idl \ - State.idl \ - StreamableContent.idl \ - Table.idl \ - Text.idl \ - Value.idl +idl_DATA = \ + Accessibility.idl \ + Accessibility_Accessible.idl \ + Accessibility_Action.idl \ + Accessibility_Application.idl \ + Accessibility_Component.idl \ + Accessibility_Desktop.idl \ + Accessibility_EditableText.idl \ + Accessibility_Event.idl \ + Accessibility_Hyperlink.idl \ + Accessibility_Hypertext.idl \ + Accessibility_Image.idl \ + Accessibility_Registry.idl \ + Accessibility_Relation.idl \ + Accessibility_Role.idl \ + Accessibility_Selection.idl \ + Accessibility_State.idl \ + Accessibility_StreamableContent.idl \ + Accessibility_Table.idl \ + Accessibility_Text.idl \ + Accessibility_Value.idl EXTRA_DIST=$(idl_DATA) diff --git a/idl/Registry.idl b/idl/Registry.idl deleted file mode 100644 index 52d3c2a..0000000 --- a/idl/Registry.idl +++ /dev/null @@ -1,289 +0,0 @@ -/* - * AT-SPI - Assistive Technology Service Provider Interface - * (Gnome Accessibility Project; http://developer.gnome.org/projects/gap) - * - * Copyright 2001 Sun Microsystems Inc. - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Library General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Library General Public License for more details. - * - * You should have received a copy of the GNU Library General Public - * License along with this library; if not, write to the - * Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. - */ - -#include -#include -#include -#include - -#ifndef _ACCESSIBILITY_REGISTRY_IDL_ -#define _ACCESSIBILITY_REGISTRY_IDL_ - -module Accessibility { - - typedef sequence DesktopSeq; - - interface DeviceEventController; - - interface Registry : EventListener { - - /** - * registerApplication: - * @application: a reference to the requesting @Application - * - * Register a new application with the accessibility broker. - * - **/ - oneway void registerApplication (in Application application); - - /** - * deregisterApplication: - * @application: a reference to the @Application - * to be deregistered. - * - * De-register an application previously registered with the broker. - * - **/ - void deregisterApplication (in Application application); - - /** - * registerGlobalEventListener: - * @listener: a reference to the requesting @EventListener. - * @eventName: a string which indicates the type of events about - * which the client desires notification. - * - * Register a client's interest in (all) application events of - * a certain type. - * - **/ - void registerGlobalEventListener (in EventListener listener, - in string eventName); - - /** - * deregisterGlobalEventListener: - * @listener: the requesting @EventListener - * @eventName: a string indicating the type of events - * - * Request that a previously registered client stop receiving - * global notifications for events of a certain type. - * - **/ - - void deregisterGlobalEventListenerAll (in EventListener listener); - /** - * deregisterGlobalEventListener: - * @listener: the requesting @EventListener - * @eventName: a string indicating the type of events - * - * Request that a previously registered client stop receiving - * global notifications for events of a certain type. - * - **/ - - void deregisterGlobalEventListener (in EventListener listener, - in string event_name); - /** - * event types: "Window" "Desktop" - * "Window:Create" "Window:Destroy" - * "Window:Iconify" "Window:Restore" - * "Window:Fullscreen" "Window:Resize" - * "Desktop:Create" "Desktop:Destroy" - * "Desktop:Focus" "Desktop:Defocus" - * "Desktop:Reorder" - * "Focus" - * "GtkWidget:show" - * "GObject:notify:" - * - * ( not sure we should allow these last 2 forms, - * since they are toolkit-specific, but they're powerful ) - * - **/ - - /** - * getDesktopCount: - * - * Get the current number of desktops. - * Returns: a short integer indicating the current number of - * @Desktops. - **/ - short getDesktopCount (); - - /** - * getDesktop: - * @n: the index of the requested @Desktop. - * - * Get the nth accessible desktop. - * - * Returns: a reference to the requested @Desktop. - **/ - Desktop getDesktop (in short n); - - /** - * getDesktopList: - * - * Get a list of accessible desktops. - * - * Returns: a sequence containing references to - * the @Desktops. - **/ - DesktopSeq getDesktopList (); - - /** - * getDeviceEventController: - * - * Returns: an object implementing DeviceEventController - **/ - DeviceEventController getDeviceEventController (); - - }; - - enum KeyEventType { - KEY_PRESSED, - KEY_RELEASED - }; - - enum EventType { - KEY_PRESSED_EVENT, - KEY_RELEASED_EVENT - }; - - enum KeySynthType { - KEY_PRESS, - KEY_RELEASE, - KEY_PRESSRELEASE, - KEY_SYM - }; - - enum ModifierType { - MODIFIER_SHIFT, - MODIFIER_ALT, - MODIFIER_CONTROL, - MODIFIER_META, - MODIFIER_META2, - MODIFIER_META3, - MODIFIER_SHIFTLOCK, - MODIFIER_NUMLOCK - }; - - struct ControllerEventMask { - unsigned long value; - unsigned short refcount; - }; - - struct KeyStroke { - long keyID; - short keycode; - unsigned long timestamp; - KeyEventType type; - unsigned short modifiers; - }; - - struct DeviceEvent { - long eventID; - short hw_code; - unsigned long timestamp; - EventType type; - unsigned short modifiers; - }; - - typedef sequence< long > KeySet; - typedef sequence< KeyEventType > KeyEventTypeSeq; - - interface KeystrokeListener : Bonobo::Unknown { - boolean keyEvent (in KeyStroke key); - }; - - interface DeviceEventListener : Bonobo::Unknown { - boolean notifyEvent (in DeviceEvent event); - }; - - interface DeviceEventController : Bonobo::Unknown { - - /** - * 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 KeySet keys, - in ControllerEventMask mask, - in KeyEventTypeSeq type, - in boolean is_synchronous); - - /** - * deregisterKeystrokeListener: - * @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 - * - * De-register a previously registered keyboard eventlistener. - * - **/ - void deregisterKeystrokeListener (in KeystrokeListener listener, - in KeySet keys, - in ControllerEventMask mask, - in KeyEventTypeSeq type, - in boolean is_synchronous); - - boolean notifyListenersSync (in DeviceEvent event); - - oneway void notifyListenersAsync (in DeviceEvent event); - - /** - * generateKeyEvent: - * @keycode: a long integer indicating the keycode of - * the keypress to be synthesized. - * - * Note that this long may be truncated before being - * processed, as keycode length may be platform-dependent - * and keycode ranges are generally much smaller than - * CORBA_long. - * - * Returns: void - * - * Synthesize a keypress event. - * - **/ - void generateKeyEvent (in long keycode, in KeySynthType type); - - /** - * generateMouseEvent: - * @x: a long integer indicating the screen x coord for the mouse event. - * @y: a long integer indicating the screen y coord for the mouse event. - * @eventName: a string indicating the type of mouse event, e.g. "button1up" - * Returns: void - * - * Synthesize a mouse event. - * - **/ - void generateMouseEvent (in long x, in long y, in string eventName); - }; -}; - -#endif diff --git a/idl/Relation.idl b/idl/Relation.idl deleted file mode 100644 index b562ffc..0000000 --- a/idl/Relation.idl +++ /dev/null @@ -1,49 +0,0 @@ -/* - * AT-SPI - Assistive Technology Service Provider Interface - * (Gnome Accessibility Project; http://developer.gnome.org/projects/gap) - * - * Copyright 2001 Sun Microsystems Inc. - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Library General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Library General Public License for more details. - * - * You should have received a copy of the GNU Library General Public - * License along with this library; if not, write to the - * Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. - */ - -#ifndef _ACCESSIBILITY_RELATION_IDL -#define _ACCESSIBILITY_RELATION_IDL - -module Accessibility { - - enum RelationType { - RELATION_LABEL_FOR, - RELATION_LABELLED_BY, - RELATION_CONTROLLER_FOR, - RELATION_CONTROLLED_BY, - RELATION_MEMBER_OF, - RELATION_TOOLTIP_FOR, - RELATION_LEAFNODE_OF - }; - - /* - * This interface inherits from a base class implementing ref counts. - */ - - interface Relation : Bonobo::Unknown { - RelationType getRelationType (); - short getNTargets (); - Object getTarget (in short index); - }; -}; - -#endif diff --git a/idl/Role.idl b/idl/Role.idl deleted file mode 100644 index 8977c2c..0000000 --- a/idl/Role.idl +++ /dev/null @@ -1,208 +0,0 @@ -/* - * AT-SPI - Assistive Technology Service Provider Interface - * (Gnome Accessibility Project; http://developer.gnome.org/projects/gap) - * - * Copyright 2001 Sun Microsystems Inc. - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Library General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Library General Public License for more details. - * - * You should have received a copy of the GNU Library General Public - * License along with this library; if not, write to the - * Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. - */ - -#ifndef _ACCESSIBILITY_ROLE_IDL -#define _ACCESSIBILITY_ROLE_IDL - -module Accessibility { - - enum Role { - ROLE_INVALID, - /* Object is used to alert the user about something */ - ROLE_ALERT, - /* Object that can be drawn into and is used to trap events */ - ROLE_CANVAS, - /* - * A choice that can be checked or unchecked and provides a separate - * indicator for the current state. - */ - ROLE_CHECK_BOX, - /* A specialized dialog that lets the user choose a color. */ - ROLE_COLOR_CHOOSER, - /* The header for a column of data */ - ROLE_COLUMN_HEADER, - /* A list of choices the user can select from */ - ROLE_COMBO_BOX, - /* An inconifed internal frame within a DESKTOP_PANE */ - ROLE_DESKTOP_ICON, - /* - * A pane that supports internal frames and iconified versions of those - * internal frames. - */ - ROLE_DESKTOP_FRAME, - /* A top level window with title bar and a border */ - ROLE_DIALOG, - /* - * A pane that allows the user to navigate through and select the contents - * of a directory - */ - ROLE_DIRECTORY_PANE, - /* - * A specialized dialog that displays the files in the directory and lets - * the user select a file, browse a different directory, or specify a - * filename. - */ - ROLE_FILE_CHOOSER, - /* - * A object that fills up space in a user interface - */ - ROLE_FILLER, - /* XXX Don't know sure about this. */ - ROLE_FOCUS_TRAVERSABLE, - /* A top level window with a title bar, border, menubar, etc. */ - ROLE_FRAME, - /* A pane that is guaranteed to be painted on top of all panes beneath it */ - ROLE_GLASS_PANE, - /* - * A document container for HTML, whose children - * represent the document content. - */ - ROLE_HTML_CONTAINER, - /* A small fixed size picture, typically used to decorate components */ - ROLE_ICON, - /* A frame-like object that is clipped by a desktop pane. */ - ROLE_INTERNAL_FRAME, - /* An object used to present an icon or short string in an interface */ - ROLE_LABEL, - /* - * A specialized pane that allows its children to be drawn in layers, - * providing a form of stacking order. - */ - ROLE_LAYERED_PANE, - /* - * An object that presents a list of objects to the user and allows the - * user to select one or more of them. - */ - ROLE_LIST, - /* An object that represents an element of a list. */ - ROLE_LIST_ITEM, - /* - * An object usually found inside a menu bar that contains a list of - * actions the user can choose from. - */ - ROLE_MENU, - /* - * An object usually drawn at the top of the primary dialog box of an - * application that contains a list of menus the user can choose from. - */ - ROLE_MENU_BAR, - /* - * An object usually contained in a menu that presents an action the - * user can choose. - */ - ROLE_MENU_ITEM, - /* A specialized pane whose primary use is inside a DIALOG */ - ROLE_OPTION_PANE, - /* An object that is a child of a page tab list */ - ROLE_PAGE_TAB, - /* - * An object that presents a series of panels (or page tabs), one at a time, - * through some mechanism provided by the object. - */ - ROLE_PAGE_TAB_LIST, - /* A generic container that is often used to group objects. */ - ROLE_PANEL, - /* - * A text object uses for passwords, or other places where the text - * content is not shown visibly to the user. - */ - ROLE_PASSWORD_TEXT, - /* - * A temporary window that is usually used to offer the user a list of - * choices, and then hides when the user selects one of those choices. - */ - ROLE_POPUP_MENU, - /* An object used to indicate how much of a task has been completed. */ - ROLE_PROGRESS_BAR, - /* - * An object the user can manipulate to tell the application to do - * something. - */ - ROLE_PUSH_BUTTON, - /* - * A specialized check box that will cause other radio buttons in the - * same group to become uncghecked when this one is checked. - */ - ROLE_RADIO_BUTTON, - /* - * A specialized pane that has a glass pane and a layered pane as its - * children. - */ - ROLE_ROOT_PANE, - /* The header for a row of data */ - ROLE_ROW_HEADER, - /* - * An object usually used to allow a user to incrementally view a large - * amount of data. - */ - ROLE_SCROLL_BAR, - /* - * An object that allows a user to incrementally view a large amount - * of information. - */ - ROLE_SCROLL_PANE, - /* - * An object usually contained in a menu to provide a visible and - * logical separation of the contents in a menu. - */ - ROLE_SEPARATOR, - /* An object that allows the user to select from a bounded range */ - ROLE_SLIDER, - /* A specialized panel that presents two other panels at the same time. */ - ROLE_SPLIT_PANE, - /* An object used to rpesent information in terms of rows and columns. */ - ROLE_TABLE, - ROLE_TABLE_CELL, - ROLE_TABLE_COLUMN_HEADER, - ROLE_TABLE_ROW_HEADER, - /* An object that presents text to the user */ - ROLE_TEXT, - /* - * A specialized push button that can be checked or unchecked, but does - * not procide a separate indicator for the current state. - */ - ROLE_TOGGLE_BUTTON, - /* - * A bar or palette usually composed of push buttons or toggle buttons - */ - ROLE_TOOL_BAR, - /* - * An object that provides information about another object - */ - ROLE_TOOL_TIP, - /* An object used to repsent hierarchical information to the user. */ - ROLE_TREE, - /* - * The object contains some Accessible information, but its role is - * not known. - */ - ROLE_UNKNOWN, - /* An object usually used in a scroll pane. */ - ROLE_VIEWPORT, - /* A top level window with no title or border */ - ROLE_WINDOW, - /* not a valid role, used for finding end of enumeration. */ - ROLE_LAST_DEFINED - }; -}; - -#endif diff --git a/idl/Selection.idl b/idl/Selection.idl deleted file mode 100644 index 42a2dfb..0000000 --- a/idl/Selection.idl +++ /dev/null @@ -1,36 +0,0 @@ -/* - * AT-SPI - Assistive Technology Service Provider Interface - * (Gnome Accessibility Project; http://developer.gnome.org/projects/gap) - * - * Copyright 2001 Sun Microsystems, Inc. - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Library General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Library General Public License for more details. - * - * You should have received a copy of the GNU Library General Public - * License along with this library; if not, write to the - * Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. - */ - -#include - -module Accessibility { - - interface Selection : Bonobo::Unknown { - readonly attribute long nSelectedChildren; - Accessible getSelectedChild (in long selectedChildIndex); - boolean selectChild (in long childIndex); - boolean deselectSelectedChild (in long selectedChildIndex); - boolean isChildSelected (in long childIndex); - void selectAll (); - void clearSelection (); - }; -}; diff --git a/idl/State.idl b/idl/State.idl deleted file mode 100644 index 7e37256..0000000 --- a/idl/State.idl +++ /dev/null @@ -1,119 +0,0 @@ -/* - * AT-SPI - Assistive Technology Service Provider Interface - * (Gnome Accessibility Project; http://developer.gnome.org/projects/gap) - * - * Copyright 2001 Sun Microsystems Inc. - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Library General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Library General Public License for more details. - * - * You should have received a copy of the GNU Library General Public - * License along with this library; if not, write to the - * Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. - */ - -#ifndef _ACCESSIBILITY_STATE_IDL -#define _ACCESSIBILITY_STATE_IDL - -module Accessibility { - - enum StateType { - STATE_INVALID, - /* Indicates a window is currently the active window */ - STATE_ACTIVE, - /* Indicates that the object is armed */ - STATE_ARMED, - /* Indicates the current object is busy */ - STATE_BUSY, - /* Indicates this object is currently checked */ - STATE_CHECKED, - /* Indicates this object is collapsed */ - STATE_COLLAPSED, - /* Indicates the user can change the contents of this object */ - STATE_EDITABLE, - /* Indicates this object allows progressive disclosure of its children */ - STATE_EXPANDABLE, - /* Indicates this object its expanded */ - STATE_EXPANDED, - /* - * Indicates this object can accept keyboard focus, which means all - * events resulting from typing on the keyboard will normally be passed - * to it when it has focus - */ - 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 */ - STATE_ICONIFIED, - /* - * Indicates something must be done with this object before the user can - * interact with an object in a different window. - */ - STATE_MODAL, - /* Indicates this (text) object can contain multiple lines of text */ - STATE_MULTI_LINE, - /* - * Indicates this object allows more than one of its children to be - * selected at the same time - */ - STATE_MULTISELECTABLE, - /* Indicates this object paints every pixel within its rectangular region. */ - STATE_OPAQUE, - /* Indicates this object is currently pressed */ - STATE_PRESSED, - /* Indicates the size of this object is not fixed */ - STATE_RESIZABLE, - /* - * Indicates this object is the child of an object that allows its - * children to be selected and that this child is one of those children - * that can be selected. - */ - STATE_SELECTABLE, - /* - * Indicates this object is the child of an object that allows its - * children to be selected and that this child is one of those children - * that has been selected. - */ - STATE_SELECTED, - /* Indicates this object is sensitive */ - STATE_SENSITIVE, - /* - * Indicates this object, the object's parent, the object's parent's - * parent, and so on, are all visible - */ - STATE_SHOWING, - /* Indicates this (text) object can contain only a single line of text */ - STATE_SINGLE_LINE, - /* Indicates this object is transient */ - STATE_TRANSIENT, - /* Indicates the orientation of this object is vertical */ - STATE_VERTICAL, - /* Indicates this object is visible */ - STATE_VISIBLE, - STATE_LAST_DEFINED - }; - - interface StateSet { - boolean contains (in StateType state); - void add (in StateType state); - void remove (in StateType state); - boolean equals (in StateSet stateSet); - /* returns a 'difference set' */ - StateSet compare (in StateSet compareState); - boolean isEmpty (); - }; -}; - -#endif diff --git a/idl/StreamableContent.idl b/idl/StreamableContent.idl deleted file mode 100644 index 13f3805..0000000 --- a/idl/StreamableContent.idl +++ /dev/null @@ -1,42 +0,0 @@ -/* - * AT-SPI - Assistive Technology Service Provider Interface - * (Gnome Accessibility Project; http://developer.gnome.org/projects/gap) - * - * Copyright 2001 Sun Microsystems, Inc. - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Library General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Library General Public License for more details. - * - * You should have received a copy of the GNU Library General Public - * License along with this library; if not, write to the - * Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. - */ - -#include - -module Accessibility { - - typedef sequence StringSeq; - - typedef sequence OctetSeq; - - enum SeekType { - SEEK_START, - SEEK_END, - SEEK_CURRENT - }; - - interface StreamableContent { - StringSeq getContentTypes (); - Bonobo::Stream getContent (in string contentType); - /* methods used from Bonobo::Stream : seek, read. Others unsupported. */ - }; -}; diff --git a/idl/Table.idl b/idl/Table.idl deleted file mode 100644 index f964957..0000000 --- a/idl/Table.idl +++ /dev/null @@ -1,53 +0,0 @@ -/* - * AT-SPI - Assistive Technology Service Provider Interface - * (Gnome Accessibility Project; http://developer.gnome.org/projects/gap) - * - * Copyright 2001 Sun Microsystems, Inc. - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Library General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Library General Public License for more details. - * - * You should have received a copy of the GNU Library General Public - * License along with this library; if not, write to the - * Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. - */ - -#include - -module Accessibility { - -typedef sequence LongSeq; - - interface Table : Bonobo::Unknown { - readonly attribute long nRows; - readonly attribute long nColumns; - readonly attribute Accessible caption; - readonly attribute Accessible summary; - readonly attribute long nSelectedRows; - readonly attribute long nSelectedColumns; - - Accessible getAccessibleAt (in long row, in long column); - long getIndexAt (in long row, in long column); - long getRowAtIndex (in long index); - long getColumnAtIndex (in long index); - string getRowDescription (in long row); - string getColumnDescription (in long column); - long getRowExtentAt (in long row, in long column); - long getColumnExtentAt (in long row, in long column); - Accessible getRowHeader (in long row); - Accessible getColumnHeader (in long column); - LongSeq getSelectedRows (); - LongSeq getSelectedColumns (); - boolean isRowSelected (in long row); - boolean isColumnSelected (in long column); - boolean isSelected (in long row, in long column); - }; -}; diff --git a/idl/Text.idl b/idl/Text.idl deleted file mode 100644 index 2833a21..0000000 --- a/idl/Text.idl +++ /dev/null @@ -1,60 +0,0 @@ -/* - * AT-SPI - Assistive Technology Service Provider Interface - * (Gnome Accessibility Project; http://developer.gnome.org/projects/gap) - * - * Copyright 2001 Sun Microsystems, Inc. - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Library General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Library General Public License for more details. - * - * You should have received a copy of the GNU Library General Public - * License along with this library; if not, write to the - * Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. - */ - -module Accessibility { - - enum TEXT_BOUNDARY_TYPE { - TEXT_BOUNDARY_CHAR, - TEXT_BOUNDARY_WORD_START, - TEXT_BOUNDARY_WORD_END, - TEXT_BOUNDARY_SENTENCE_START, - TEXT_BOUNDARY_SENTENCE_END, - TEXT_BOUNDARY_LINE_START, - TEXT_BOUNDARY_LINE_END - }; - - interface Text : Bonobo::Unknown { - readonly attribute long characterCount; - readonly attribute long caretOffset; - string getText (in long startOffset, in long endOffset); - boolean setCaretOffset (in long offset); - string getTextBeforeOffset (in long offset, in TEXT_BOUNDARY_TYPE type, - out long startOffset, out long endOffset); - string getTextAtOffset (in long offset, in TEXT_BOUNDARY_TYPE type, - out long startOffset, out long endOffset); - string getTextAfterOffset (in long offset, in TEXT_BOUNDARY_TYPE type, - out long startOffset, out long endOffset); - unsigned long getCharacterAtOffset (in long offset); /* long instead of wchar, - * to allow unicode chars > 16 bits - */ - /* void getRowColAtOffset (in long offset, out long row, out long column); */ - string getAttributes (in long offset, - out long startOffset, out long endOffset); - void getCharacterExtents (in long offset, out long x, out long y, out long length, out long width, in short coordType); - long getOffsetAtPoint (in long x, in long y, in short coordType); - long getNSelections (); - void getSelection (in long selectionNum, out long startOffset, out long endOffset); - boolean addSelection (in long startOffset, in long endOffset); - boolean removeSelection (in long selectionNum); - boolean setSelection (in long selectionNum, in long startOffset, in long endOffset); - }; -}; diff --git a/idl/Value.idl b/idl/Value.idl deleted file mode 100644 index aa18fce..0000000 --- a/idl/Value.idl +++ /dev/null @@ -1,49 +0,0 @@ -/* - * AT-SPI - Assistive Technology Service Provider Interface - * (Gnome Accessibility Project; http://developer.gnome.org/projects/gap) - * - * Copyright 2001 Sun Microsystems, Inc. - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Library General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Library General Public License for more details. - * - * You should have received a copy of the GNU Library General Public - * License along with this library; if not, write to the - * Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. - */ - -module Accessibility { - - enum ValueType { - SHORTVAL, - USHORTVAL, - LONGVAL, - ULONGVAL, - FLOATVAL, - DOUBLEVAL - }; - - union SValue switch (ValueType) { - case Accessibility::SHORTVAL: short val_short; - case Accessibility::USHORTVAL: unsigned short val_ushort; - case Accessibility::LONGVAL: long val_long; - case Accessibility::ULONGVAL: unsigned long val_ulong; - case Accessibility::FLOATVAL: float val_float; - case Accessibility::DOUBLEVAL: double val_double; - }; - - interface Value : Bonobo::Unknown { - readonly attribute SValue minimumValue; - readonly attribute SValue maximumValue; - readonly attribute SValue minimumIncrement; - attribute SValue currentValue; - }; -}; diff --git a/libspi/Makefile.am b/libspi/Makefile.am index b71fb1c..c2342d0 100644 --- a/libspi/Makefile.am +++ b/libspi/Makefile.am @@ -36,16 +36,29 @@ libspiinclude_HEADERS = Accessibility.h \ IDL_OUT = Accessibility.h Accessibility-stubs.c Accessibility-skels.c Accessibility-common.c -IDL = \ - $(top_srcdir)/idl/Accessibility.idl \ - $(top_srcdir)/idl/Accessible.idl \ - $(top_srcdir)/idl/Application.idl \ - $(top_srcdir)/idl/Desktop.idl \ - $(top_srcdir)/idl/Event.idl \ - $(top_srcdir)/idl/Registry.idl \ - $(top_srcdir)/idl/Relation.idl \ - $(top_srcdir)/idl/Role.idl \ - $(top_srcdir)/idl/State.idl +IDL_DEPS = \ + $(top_srcdir)/idl/Accessibility.idl \ + $(top_srcdir)/idl/Accessibility_Accessible.idl \ + $(top_srcdir)/idl/Accessibility_Action.idl \ + $(top_srcdir)/idl/Accessibility_Application.idl \ + $(top_srcdir)/idl/Accessibility_Component.idl \ + $(top_srcdir)/idl/Accessibility_Desktop.idl \ + $(top_srcdir)/idl/Accessibility_EditableText.idl \ + $(top_srcdir)/idl/Accessibility_Event.idl \ + $(top_srcdir)/idl/Accessibility_Hyperlink.idl \ + $(top_srcdir)/idl/Accessibility_Hypertext.idl \ + $(top_srcdir)/idl/Accessibility_Image.idl \ + $(top_srcdir)/idl/Accessibility_Registry.idl \ + $(top_srcdir)/idl/Accessibility_Relation.idl \ + $(top_srcdir)/idl/Accessibility_Role.idl \ + $(top_srcdir)/idl/Accessibility_Selection.idl \ + $(top_srcdir)/idl/Accessibility_State.idl \ + $(top_srcdir)/idl/Accessibility_StreamableContent.idl \ + $(top_srcdir)/idl/Accessibility_Table.idl \ + $(top_srcdir)/idl/Accessibility_Text.idl \ + $(top_srcdir)/idl/Accessibility_Value.idl + + BUILT_SOURCES = $(IDL_OUT) Accessibility-imodule.c CLEANFILES+=$(IDL_OUT) Accessibility-imodule.c @@ -96,7 +109,7 @@ IDLFLAGS = -I$(BONOBO_ACTIVATION_IDL_DIR) \ -I$(top_srcdir)/idl \ --add-imodule -$(IDL_OUT) Accessibility-imodule.c : $(IDL) $(ORBIT_IDL) +$(IDL_OUT) Accessibility-imodule.c : $(IDL_DEPS) $(ORBIT_IDL) $(ORBIT_IDL) -D__ACCESSIBILITY_COMPILATION__ $(IDLFLAGS) $(top_srcdir)/idl/Accessibility.idl orbittypelibdir = $(libdir)/orbit-2.0 diff --git a/libspi/image.c b/libspi/image.c index 5598ae6..889722a 100644 --- a/libspi/image.c +++ b/libspi/image.c @@ -37,7 +37,6 @@ spi_image_interface_new (AtkObject *obj) return new_image; } - static AtkImage * get_image_from_servant (PortableServer_Servant servant) { @@ -51,7 +50,6 @@ get_image_from_servant (PortableServer_Servant servant) return ATK_IMAGE (object->atko); } - static void impl_getImagePosition (PortableServer_Servant servant, CORBA_long * x, CORBA_long * y, @@ -67,7 +65,6 @@ impl_getImagePosition (PortableServer_Servant servant, (AtkCoordType) coordType); } - static void impl_getImageSize (PortableServer_Servant servant, CORBA_long * width, CORBA_long * height, @@ -81,6 +78,27 @@ impl_getImageSize (PortableServer_Servant servant, (gint *) width, (gint *) height); } +static Accessibility_BoundingBox +impl_getImageExtents (PortableServer_Servant servant, + const CORBA_short coordType, + CORBA_Environment *ev) +{ + AtkImage *image; + gint x, y, width, height; + Accessibility_BoundingBox bbox; + + image = get_image_from_servant (servant); + + atk_image_get_image_size (image, &width, &height); + atk_image_get_image_position (image, &x, &y, coordType); + + bbox.x = x; + bbox.y = y; + bbox.width = width; + bbox.height = height; + + return bbox; +} static CORBA_string impl__get_imageDescription (PortableServer_Servant servant, @@ -103,16 +121,15 @@ impl__get_imageDescription (PortableServer_Servant servant, } } - static void spi_image_class_init (SpiImageClass *klass) { POA_Accessibility_Image__epv *epv = &klass->epv; /* Initialize epv table */ - - epv->getImagePosition = impl_getImagePosition; - epv->getImageSize = impl_getImageSize; + epv->getImagePosition = impl_getImagePosition; + epv->getImageSize = impl_getImageSize; + epv->getImageExtents = impl_getImageExtents; epv->_get_imageDescription = impl__get_imageDescription; } diff --git a/test/test-simple.c b/test/test-simple.c index 6337646..b64ee96 100644 --- a/test/test-simple.c +++ b/test/test-simple.c @@ -41,6 +41,7 @@ static void validate_accessible (Accessible *accessible, static int print_tree_depth = 0; static gboolean print_tree = FALSE; +static gboolean do_poke = FALSE; typedef struct { gulong magic; @@ -73,14 +74,31 @@ test_window_add_and_show (GtkContainer *container, GtkWidget *widget) gtk_widget_show (widget); } +static GtkWidget * +create_tree (void) +{ + GtkWidget *widget; + GtkTreeIter iter; + GtkListStore *store; + GtkTreeViewColumn *column; + + store = gtk_list_store_new (1, G_TYPE_STRING); + gtk_list_store_append (store, &iter); + gtk_list_store_set (store, &iter, 0, TEST_STRING_A, -1); + column = gtk_tree_view_column_new_with_attributes ("String", + gtk_cell_renderer_text_new (), "text", 0, NULL); + widget = gtk_tree_view_new_with_model (GTK_TREE_MODEL (store)); + g_object_unref (G_OBJECT (store)); + gtk_tree_view_append_column (GTK_TREE_VIEW (widget), column); + + return widget; +} + static TestWindow * create_test_window (void) { TestWindow *win = g_new0 (TestWindow, 1); GtkWidget *widget, *vbox; - GtkListStore *store; - GtkTreeViewColumn *column; - GtkTreeIter iter; win->magic = WINDOW_MAGIC; win->window = gtk_window_new (GTK_WINDOW_TOPLEVEL); @@ -95,18 +113,21 @@ create_test_window (void) gtk_entry_set_text (GTK_ENTRY (widget), TEST_STRING_A); test_window_add_and_show (GTK_CONTAINER (vbox), widget); + widget = gtk_button_new_with_label ("_Foobar"); + test_window_add_and_show (GTK_CONTAINER (vbox), widget); + + widget = gtk_hseparator_new (); + test_window_add_and_show (GTK_CONTAINER (vbox), widget); + + widget = gtk_image_new_from_stock (GTK_STOCK_DIALOG_QUESTION, + GTK_ICON_SIZE_LARGE_TOOLBAR); + test_window_add_and_show (GTK_CONTAINER (vbox), widget); + widget = g_object_new (GTK_TYPE_RANGE, NULL); gtk_range_set_range (GTK_RANGE (widget), 0.0, 100.0); test_window_add_and_show (GTK_CONTAINER (vbox), widget); - store = gtk_list_store_new (1, G_TYPE_STRING); - gtk_list_store_append (store, &iter); - gtk_list_store_set (store, &iter, 0, TEST_STRING_A, -1); - column = gtk_tree_view_column_new_with_attributes ("String", - gtk_cell_renderer_text_new (), "text", 0, NULL); - widget = gtk_tree_view_new_with_model (GTK_TREE_MODEL (store)); - g_object_unref (G_OBJECT (store)); - gtk_tree_view_append_column (GTK_TREE_VIEW (widget), column); + widget = create_tree (); test_window_add_and_show (GTK_CONTAINER (vbox), widget); g_idle_add ((GSourceFunc) focus_me, win->window); @@ -343,6 +364,23 @@ test_component (AccessibleComponent *component) } static void +test_image (AccessibleImage *image) +{ + char *desc; + long int x = -1, y = -1, width = -1, height = -1; + + desc = AccessibleImage_getImageDescription (image); + g_assert (desc != NULL); + SPI_freeString (desc); + + AccessibleImage_getImagePosition (image, &x, &y, + SPI_COORD_TYPE_SCREEN); + AccessibleImage_getImageSize (image, &width, &height); + AccessibleImage_getImageExtents (image, &x, &y, &width, &height, + SPI_COORD_TYPE_WINDOW); +} + +static void validate_tree (Accessible *accessible, gboolean has_parent, gboolean recurse_down) @@ -398,6 +436,7 @@ validate_accessible (Accessible *accessible, Accessible *tmp; char *name, *descr; const char *role; + GString *item_str = g_string_new (""); name = Accessible_getName (accessible); g_assert (name != NULL); @@ -464,9 +503,19 @@ validate_accessible (Accessible *accessible, if (Accessible_isImage (accessible)) { tmp = Accessible_getImage (accessible); g_assert (tmp != NULL); - if (print_tree) + if (print_tree) { + char *desc; + fprintf (stderr, "Im"); - AccessibleImage_unref (accessible); + + desc = AccessibleImage_getImageDescription (tmp); + g_string_append_printf ( + item_str, " image descr: '%s'", desc); + SPI_freeString (desc); + } else + test_image (tmp); + + AccessibleImage_unref (tmp); } if (Accessible_isSelection (accessible)) { @@ -508,10 +557,12 @@ validate_accessible (Accessible *accessible, } if (print_tree) - fprintf (stderr, " ] '%s' (%s) - %s:\n", name, descr, role); + fprintf (stderr, " ] '%s' (%s) - %s: %s\n", + name, descr, role, item_str->str); SPI_freeString (name); SPI_freeString (descr); + g_string_free (item_str, TRUE); validate_tree (accessible, has_parent, recurse_down); } @@ -539,27 +590,30 @@ global_listener_cb (AccessibleEvent *event, fprintf (stderr, "Fielded focus event ...\n"); - desktop = getDesktop (0); - application = Accessible_getChildAtIndex (desktop, 0); - g_assert (application != NULL); - Accessible_unref (desktop); - - test_application (application); - - AccessibleApplication_unref (application); + if (!do_poke) { + desktop = getDesktop (0); + application = Accessible_getChildAtIndex (desktop, 0); + g_assert (application != NULL); + Accessible_unref (desktop); + + test_application (application); + + AccessibleApplication_unref (application); + + print_tree = FALSE; + validate_accessible (event->source, TRUE, TRUE); + + gtk_main_quit (); + } print_tree = TRUE; validate_accessible (event->source, TRUE, TRUE); - print_tree = FALSE; - validate_accessible (event->source, TRUE, TRUE); - - gtk_main_quit (); } int main (int argc, char **argv) { - int leaked; + int leaked, i; TestWindow *win; const char *modules; AccessibleEventListener *global_listener; @@ -569,6 +623,11 @@ main (int argc, char **argv) putenv ("GTK_MODULES=gail:at-bridge"); modules = NULL; + for (i = 1; i < argc; i++) { + if (!g_strcasecmp (argv [i], "--poke")) + do_poke = TRUE; + } + gtk_init (&argc, &argv); g_assert (!SPI_init ());