1d1766043SAndrew Rist/************************************************************** 2cdf0e10cSrcweir * 3d1766043SAndrew Rist * Licensed to the Apache Software Foundation (ASF) under one 4d1766043SAndrew Rist * or more contributor license agreements. See the NOTICE file 5d1766043SAndrew Rist * distributed with this work for additional information 6d1766043SAndrew Rist * regarding copyright ownership. The ASF licenses this file 7d1766043SAndrew Rist * to you under the Apache License, Version 2.0 (the 8d1766043SAndrew Rist * "License"); you may not use this file except in compliance 9d1766043SAndrew Rist * with the License. You may obtain a copy of the License at 10d1766043SAndrew Rist * 11d1766043SAndrew Rist * http://www.apache.org/licenses/LICENSE-2.0 12d1766043SAndrew Rist * 13d1766043SAndrew Rist * Unless required by applicable law or agreed to in writing, 14d1766043SAndrew Rist * software distributed under the License is distributed on an 15d1766043SAndrew Rist * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 16d1766043SAndrew Rist * KIND, either express or implied. See the License for the 17d1766043SAndrew Rist * specific language governing permissions and limitations 18d1766043SAndrew Rist * under the License. 19d1766043SAndrew Rist * 20d1766043SAndrew Rist *************************************************************/ 21d1766043SAndrew Rist 22d1766043SAndrew Rist 23cdf0e10cSrcweir 24cdf0e10cSrcweir#ifndef __com_sun_star_accessibility_XAccessibleRelationSet_idl__ 25cdf0e10cSrcweir#define __com_sun_star_accessibility_XAccessibleRelationSet_idl__ 26cdf0e10cSrcweir 27cdf0e10cSrcweir#ifndef __com_sun_star_accessibility_AccessibleRelation_idl__ 28cdf0e10cSrcweir#include <com/sun/star/accessibility/AccessibleRelation.idl> 29cdf0e10cSrcweir#endif 30cdf0e10cSrcweir 31cdf0e10cSrcweir#ifndef __com_sun_star_uno_XInterface_idl__ 32cdf0e10cSrcweir#include <com/sun/star/uno/XInterface.idl> 33cdf0e10cSrcweir#endif 34cdf0e10cSrcweir#ifndef __com_sun_star_lang_IndexOutOfBoundsException_idl__ 35cdf0e10cSrcweir#include <com/sun/star/lang/IndexOutOfBoundsException.idl> 36cdf0e10cSrcweir#endif 37cdf0e10cSrcweir 38cdf0e10cSrcweirmodule com { module sun { module star { module accessibility { 39cdf0e10cSrcweir 40cdf0e10cSrcweir/** Implement this interface to give access to an object's set of relations. 41cdf0e10cSrcweir 42*a893be29SPedro Giffuni <p>Such relations are modelled with the <type>AccessibleRelation</type> 43cdf0e10cSrcweir structure. This interface is used for representing sets of relations 44cdf0e10cSrcweir between <type>Accessible</type> objects. Most of the convenience 45cdf0e10cSrcweir methods of the corresponding AccessibleRelationSet interface of the Java 46cdf0e10cSrcweir Accessibility API have been removed from this interface in order to 47cdf0e10cSrcweir clean it up. These methods are <member>add</member>, 48cdf0e10cSrcweir <member>addAll</member>, <member>clear</member>, and 49cdf0e10cSrcweir <member>remove</member>. The other methods have been renamed to achieve 50cdf0e10cSrcweir a geater conformance with the other accessibility interfaces.</p> 51cdf0e10cSrcweir 520d3a54ffSJürgen Schmidt @since OpenOffice 1.1.2 53cdf0e10cSrcweir*/ 54cdf0e10cSrcweirpublished interface XAccessibleRelationSet : ::com::sun::star::uno::XInterface 55cdf0e10cSrcweir{ 56cdf0e10cSrcweir /** Returns the number of relations in this relation set. 57cdf0e10cSrcweir 58cdf0e10cSrcweir @return 59cdf0e10cSrcweir Returns the number of relations or zero if there are none. 60cdf0e10cSrcweir */ 61cdf0e10cSrcweir long getRelationCount (); 62cdf0e10cSrcweir 63cdf0e10cSrcweir /** Returns the relation of this relation set that is specified by 64cdf0e10cSrcweir the given index. 65cdf0e10cSrcweir 66cdf0e10cSrcweir @param nIndex 67cdf0e10cSrcweir This index specifies the relatio to return. 68cdf0e10cSrcweir 69cdf0e10cSrcweir @return 70cdf0e10cSrcweir For a valid index, i.e. inside the range 0 to the number of 71cdf0e10cSrcweir relations minus one, the returned value is the requested 72cdf0e10cSrcweir relation. If the index is invalid then the returned relation 73cdf0e10cSrcweir has the type INVALID. 74cdf0e10cSrcweir 75cdf0e10cSrcweir */ 76cdf0e10cSrcweir AccessibleRelation getRelation ([in] long nIndex) 77cdf0e10cSrcweir raises (::com::sun::star::lang::IndexOutOfBoundsException); 78cdf0e10cSrcweir 79cdf0e10cSrcweir /** Tests whether the relation set contains a relation matching the 80cdf0e10cSrcweir specified key. 81cdf0e10cSrcweir 82cdf0e10cSrcweir @param aRelationType 83cdf0e10cSrcweir The type of relation to look for in this set of relations. This 84cdf0e10cSrcweir has to be one of the constants of 85cdf0e10cSrcweir <type>AccessibleRelationType</type>. 86cdf0e10cSrcweir 87cdf0e10cSrcweir @return 88cdf0e10cSrcweir Returns <TRUE/> if there is a (at least one) relation of the 89cdf0e10cSrcweir given type and <FALSE/> if there is no such relation in the set. 90cdf0e10cSrcweir */ 91cdf0e10cSrcweir boolean containsRelation ([in] short aRelationType); 92cdf0e10cSrcweir 93cdf0e10cSrcweir /** Retrieve and return the relation with the given relation type. 94cdf0e10cSrcweir 95cdf0e10cSrcweir @param aRelationType 96cdf0e10cSrcweir The type of the relation to return. This has to be one of the 97cdf0e10cSrcweir constants of <type>AccessibleRelationType</type>. 98cdf0e10cSrcweir 99cdf0e10cSrcweir @return 100cdf0e10cSrcweir If a relation with the given type could be found than (a copy 101cdf0e10cSrcweir of) this relation is returned. Otherwise a relation with the 102cdf0e10cSrcweir type INVALID is returned. 103cdf0e10cSrcweir */ 104cdf0e10cSrcweir AccessibleRelation getRelationByType ([in] short aRelationType); 105cdf0e10cSrcweir}; 106cdf0e10cSrcweir 107cdf0e10cSrcweir}; }; }; }; 108cdf0e10cSrcweir 109cdf0e10cSrcweir#endif 110