2001-12-11 Michael Meeks <michael@ximian.com>
+ * 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 <michael@ximian.com>
+
* cspi/bonobo/cspi-bonobo-listener.c:
(cspi_kestroke_listener_unref),
(cspi_event_listener_unref): impl. undoing previous
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]
cspi_return_val_if_ev ("getImageDescription", NULL);
- return NULL;
+ return retval;
}
/**
/*
* Accessibility interfaces and subinterfaces
*/
-#include <Accessible.idl>
-#include <Action.idl>
-#include <Component.idl>
-#include <Hyperlink.idl>
-#include <Image.idl>
-#include <Selection.idl>
-#include <StreamableContent.idl>
-#include <Table.idl>
-#include <Text.idl>
-#include <Value.idl>
+#include <Accessibility_Accessible.idl>
+#include <Accessibility_Action.idl>
+#include <Accessibility_Component.idl>
+#include <Accessibility_Hyperlink.idl>
+#include <Accessibility_Image.idl>
+#include <Accessibility_Selection.idl>
+#include <Accessibility_StreamableContent.idl>
+#include <Accessibility_Table.idl>
+#include <Accessibility_Text.idl>
+#include <Accessibility_Value.idl>
/*
* Interfaces derived from Accessibility::Text
*/
-#include <EditableText.idl>
-#include <Hypertext.idl>
+#include <Accessibility_EditableText.idl>
+#include <Accessibility_Hypertext.idl>
/*
* Utility interfaces and interfaces derived from Accessibility::Accessible
*/
-#include <Relation.idl>
-#include <State.idl>
-#include <Application.idl>
-#include <Desktop.idl>
-#include <Event.idl>
-#include <Registry.idl>
-#include <Role.idl>
+#include <Accessibility_Relation.idl>
+#include <Accessibility_State.idl>
+#include <Accessibility_Application.idl>
+#include <Accessibility_Desktop.idl>
+#include <Accessibility_Event.idl>
+#include <Accessibility_Registry.idl>
+#include <Accessibility_Role.idl>
#ifndef __ACCESSIBILITY_COMPILATION__
#ifdef __ORBIT_IDL__
#include <Bonobo_Unknown.idl>
-#include "Relation.idl"
-#include "State.idl"
-#include "Role.idl"
+#include "Accessibility_Relation.idl"
+#include "Accessibility_State.idl"
+#include "Accessibility_Role.idl"
module Accessibility {
#define __ACCESSIBILITY_APPLICATION_DEFINED__
#include <Bonobo_Unknown.idl>
-#include <Accessible.idl>
+#include <Accessibility_Accessible.idl>
module Accessibility {
interface Application : Accessible {
* Boston, MA 02111-1307, USA.
*/
-#include <Event.idl>
+#include <Accessibility_Event.idl>
module Accessibility {
#define __ACCESSIBILITY_DESKTOP_DEFINED__
#include <Bonobo_Unknown.idl>
-#include <Accessible.idl>
+#include <Accessibility_Accessible.idl>
module Accessibility {
interface Desktop : Accessible {
* Boston, MA 02111-1307, USA.
*/
-#include <Accessible.idl>
+#include <Accessibility_Accessible.idl>
module Accessibility {
*/
#include <Bonobo_Unknown.idl>
-#include <Event.idl>
-#include <Application.idl>
-#include <Desktop.idl>
+#include <Accessibility_Event.idl>
+#include <Accessibility_Application.idl>
+#include <Accessibility_Desktop.idl>
#ifndef _ACCESSIBILITY_REGISTRY_IDL_
#define _ACCESSIBILITY_REGISTRY_IDL_
* Boston, MA 02111-1307, USA.
*/
-#include <Accessible.idl>
+#include <Accessibility_Accessible.idl>
module Accessibility {
* Boston, MA 02111-1307, USA.
*/
-#include <Accessible.idl>
+#include <Accessibility_Accessible.idl>
module Accessibility {
+++ /dev/null
-/*
- * 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 <Bonobo_Unknown.idl>
-
-#include "Relation.idl"
-#include "State.idl"
-#include "Role.idl"
-
-module Accessibility {
-
- typedef sequence<Relation> 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
-
+++ /dev/null
-/*
- * 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);
- };
-};
-
+++ /dev/null
-/*
- * 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 <Bonobo_Unknown.idl>
-#include <Accessible.idl>
-
-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
+++ /dev/null
-/*
- * 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 <Event.idl>
-
-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);
- };
-};
+++ /dev/null
-/*
- * 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 <Bonobo_Unknown.idl>
-#include <Accessible.idl>
-
-module Accessibility {
- interface Desktop : Accessible {
- /**
- * At the moment this is only a marker interface, it acts just like
- * any other Accessible.
- **/
- };
-};
-
-#endif
+++ /dev/null
-/*
- * 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 <Accessibility.idl>
-
-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);
- };
-};
+++ /dev/null
-/*
- * 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 <Bonobo_Unknown.idl>
-
-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
+++ /dev/null
-/*
- * 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 <Accessible.idl>
-
-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 ();
- };
-};
+++ /dev/null
-/*
- * 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 <Accessibility.idl>
-
-module Accessibility {
-
- interface Hypertext : Text {
- long getNLinks ();
- Hyperlink getLink (in long linkIndex);
- long getLinkIndex (in long characterIndex);
- };
-};
+++ /dev/null
-/*
- * 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);
- };
-};
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)
+++ /dev/null
-/*
- * 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 <Bonobo_Unknown.idl>
-#include <Event.idl>
-#include <Application.idl>
-#include <Desktop.idl>
-
-#ifndef _ACCESSIBILITY_REGISTRY_IDL_
-#define _ACCESSIBILITY_REGISTRY_IDL_
-
-module Accessibility {
-
- typedef sequence<Desktop> 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:<propertyname>"
- *
- * ( 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
+++ /dev/null
-/*
- * 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
+++ /dev/null
-/*
- * 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
+++ /dev/null
-/*
- * 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 <Accessible.idl>
-
-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 ();
- };
-};
+++ /dev/null
-/*
- * 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
+++ /dev/null
-/*
- * 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 <Bonobo_Storage.idl>
-
-module Accessibility {
-
- typedef sequence<string> StringSeq;
-
- typedef sequence<octet> 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. */
- };
-};
+++ /dev/null
-/*
- * 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 <Accessible.idl>
-
-module Accessibility {
-
-typedef sequence<long> 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);
- };
-};
+++ /dev/null
-/*
- * 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);
- };
-};
+++ /dev/null
-/*
- * 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;
- };
-};
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
-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
return new_image;
}
-
static AtkImage *
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,
(AtkCoordType) coordType);
}
-
static void
impl_getImageSize (PortableServer_Servant servant,
CORBA_long * width, CORBA_long * height,
(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,
}
}
-
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;
}
static int print_tree_depth = 0;
static gboolean print_tree = FALSE;
+static gboolean do_poke = FALSE;
typedef struct {
gulong magic;
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);
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);
}
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)
Accessible *tmp;
char *name, *descr;
const char *role;
+ GString *item_str = g_string_new ("");
name = Accessible_getName (accessible);
g_assert (name != NULL);
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)) {
}
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);
}
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;
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 ());