1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: XAccessibleContext.idl,v $
12 * This file is part of OpenOffice.org.
14 * OpenOffice.org is free software: you can redistribute it and/or modify
15 * it under the terms of the GNU Lesser General Public License version 3
16 * only, as published by the Free Software Foundation.
18 * OpenOffice.org is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU Lesser General Public License version 3 for more details
22 * (a copy is included in the LICENSE file that accompanied this code).
24 * You should have received a copy of the GNU Lesser General Public License
25 * version 3 along with OpenOffice.org. If not, see
26 * <http://www.openoffice.org/license.html>
27 * for a copy of the LGPLv3 License.
29 ************************************************************************/
31 #ifndef __com_sun_star_accessibility_XAccessibleContext_idl__
32 #define __com_sun_star_accessibility_XAccessibleContext_idl__
34 #ifndef __com_sun_star_accessibility_IllegalAccessibleComponentStateException_idl__
35 #include
<com
/sun
/star
/accessibility
/IllegalAccessibleComponentStateException.idl
>
38 #ifndef __com_sun_star_lang_IndexOutOfBoundsException_idl__
39 #include
<com
/sun
/star
/lang
/IndexOutOfBoundsException.idl
>
42 #ifndef __com_sun_star_beans_XPropertyChangeListener_idl__
43 #include
<com
/sun
/star
/beans
/XPropertyChangeListener.idl
>
46 #ifndef __com_sun_star_lang_Locale_idl__
47 #include
<com
/sun
/star
/lang
/Locale.idl
>
50 module com
{ module sun
{ module star
{ module accessibility
{
52 published
interface XAccessible
;
53 published
interface XAccessibleRelationSet
;
54 published
interface XAccessibleSelection
;
55 published
interface XAccessibleStateSet
;
57 /** Implement this interface for exposing various aspects of a class'
60 <p>This interface serves two purposes: On the one hand it gives access
61 to the tree structure in which all accessible objects are
62 organized. Each node in this tree supports this interface. On the other
63 hand it gives access to objects that expose the represented content.
64 That are role, state, name, description, and relations to other objects.
65 Take an OK button of a dialog as an example. Its role is
66 <const>AccessibleRole::BUTTON</const>, its name is 'OK', and its description
67 is something like 'Accepts all changes made in the dialog'.</p>
71 published
interface XAccessibleContext
: ::com
::sun
::star
::uno
::XInterface
73 /** Return the number of children.
75 <p>Returns the number of accessible children of the object.</p>
78 The returned value is non-negative.
80 long getAccessibleChildCount
();
82 /** Returns the i-th child of this object.
84 <p>The order in which the children are enumerated is implementation
88 The index may have any value. If it is outside the range from 0
89 to n-1, with n being the number of children as returned by
90 <member>XAccessibleContext::getAccessibleChild</member> an empty
91 reference is returned.
93 If the object has an i-th child the returned value is a
94 reference to that child. Otherwise an empty reference is
96 @throws ::com::sun::star::lang::IndexOutOfBoundsException
97 If no child with the given index exists then an
98 <type scope="::com::sun::star::lang">IndexOutOfBoundsException</type>
101 XAccessible getAccessibleChild
([in] long i
)
102 raises
(::com
::sun
::star
::lang
::IndexOutOfBoundsException
);
104 /** Returns the parent of this object.
106 <p>This function may be called for every node, including the root
107 node, of the accessible tree.</p>
110 The returned reference points to a valid object for all but the
111 root node. If called for the root node an empty reference is
114 XAccessible getAccessibleParent
();
116 /** Returns the index of this object in its accessible parent.
118 <p>If you call getAccessibeChild on the object's parent with the
119 index returned by this function you get a reference to this
123 The returned index is zero based.
125 long getAccessibleIndexInParent
();
127 /** Returns the role of this object.
129 <p>The role is a generic description of an objects function. The
130 relation between role and name is similar to the relation between
131 class and object.</p>
134 The returned value is a role defined in the enumeration
138 for a list of the available roles.
140 short getAccessibleRole
();
142 /** Returns the object's description.
144 <p>Returns the object's localized description. The description should
145 complement the more generic descriptions given by an object's role
149 The returned string is the object's localized description.
151 string getAccessibleDescription
();
153 /** Return the object's localized name.
155 <p>See <member>XAccessibleContext::getAccessibleRole</member>'s
156 documentation for the relation between an object's name and role.
157 Names should be unique, at least between children of the same
158 parent, although the uniqueness is neither enforced nor used inside
162 The returned string is the object's localized name.
164 string getAccessibleName
();
166 /** Returns the set of relations defined for this object.
168 <p>The returned set of relations is a copy of this objects relation
169 set: changing the returned object does not change this objects
172 <p>aThere are two ways to represent an empty list of relations:
173 Return an empty reference or return a valid object that contains an
177 The returned value is either an empty referece or a reference to
178 a valid object that represents a copy of the objects list of
181 XAccessibleRelationSet getAccessibleRelationSet
();
183 /** Returns the set of states that are currently active for this
186 <p>The returned state set is a copy: Changing the returned state set
187 will not be refelected by changing the object's set of states. See
188 the documentation of <type>XAccessibleStateSet</type> for a
189 description of the individual states.</p>
192 A reference to this object's state set or an empty reference if
193 states are not supported.
195 @see XAccessibleStateSet
197 XAccessibleStateSet getAccessibleStateSet
();
199 /** Returns the locale of the component.
201 <p>This locale is used for example to determine the language to use
202 for the name and description texts.</p>
205 If this object does not have a locale, the locale of its parent
206 is returned. If it does not have (yet) a parent it throws the
207 exception <type>IllegalAccessibleComponentStateException</type>.
209 @throws IllegalAccessibleComponentStateException
210 when this object does not (yet) have a parent.
212 ::com
::sun
::star
::lang
::Locale getLocale
()
213 raises
(IllegalAccessibleComponentStateException
);