1*d1766043SAndrew Rist/**************************************************************
2cdf0e10cSrcweir *
3*d1766043SAndrew Rist * Licensed to the Apache Software Foundation (ASF) under one
4*d1766043SAndrew Rist * or more contributor license agreements.  See the NOTICE file
5*d1766043SAndrew Rist * distributed with this work for additional information
6*d1766043SAndrew Rist * regarding copyright ownership.  The ASF licenses this file
7*d1766043SAndrew Rist * to you under the Apache License, Version 2.0 (the
8*d1766043SAndrew Rist * "License"); you may not use this file except in compliance
9*d1766043SAndrew Rist * with the License.  You may obtain a copy of the License at
10*d1766043SAndrew Rist *
11*d1766043SAndrew Rist *   http://www.apache.org/licenses/LICENSE-2.0
12*d1766043SAndrew Rist *
13*d1766043SAndrew Rist * Unless required by applicable law or agreed to in writing,
14*d1766043SAndrew Rist * software distributed under the License is distributed on an
15*d1766043SAndrew Rist * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16*d1766043SAndrew Rist * KIND, either express or implied.  See the License for the
17*d1766043SAndrew Rist * specific language governing permissions and limitations
18*d1766043SAndrew Rist * under the License.
19*d1766043SAndrew Rist *
20*d1766043SAndrew Rist *************************************************************/
21*d1766043SAndrew Rist
22*d1766043SAndrew Rist
23cdf0e10cSrcweir
24cdf0e10cSrcweir#ifndef __com_sun_star_accessibility_XAccessibleHyperlink_idl__
25cdf0e10cSrcweir#define __com_sun_star_accessibility_XAccessibleHyperlink_idl__
26cdf0e10cSrcweir
27cdf0e10cSrcweir#ifndef __com_sun_star_accessibility_XAccessibleAction_idl__
28cdf0e10cSrcweir#include <com/sun/star/accessibility/XAccessibleAction.idl>
29cdf0e10cSrcweir#endif
30cdf0e10cSrcweir#ifndef __com_sun_star_lang_IndexOutOfBoundsException_idl__
31cdf0e10cSrcweir#include <com/sun/star/lang/IndexOutOfBoundsException.idl>
32cdf0e10cSrcweir#endif
33cdf0e10cSrcweir
34cdf0e10cSrcweirmodule com { module sun { module star { module accessibility {
35cdf0e10cSrcweir
36cdf0e10cSrcweir/** Implement this interface to represent a hyperlink or a group of
37cdf0e10cSrcweir    hyperlinks.
38cdf0e10cSrcweir
39cdf0e10cSrcweir    <p>Single hyperlinks correspond to simple &lt;a href&gt; tags.  Groups
40cdf0e10cSrcweir    of hyperlinks are contained in client side image maps.  Linked objects
41cdf0e10cSrcweir    and anchors are implementation dependent.  This interface inherits the
42cdf0e10cSrcweir    <type>XAccessibleAction</type> interface.  Especially that interface's
43cdf0e10cSrcweir    <member>XAccessibleAction::getActionCount</member> method is needed to
44cdf0e10cSrcweir    obtain a maximum value for the indices passed to the
45cdf0e10cSrcweir    <member>XAccessibleHyperlink::getAccessibleActionAnchor</member> and
46cdf0e10cSrcweir    <member>XAccessibleHyperlink::getAccessibleActionObject</member>
47cdf0e10cSrcweir    methods.</p>
48cdf0e10cSrcweir
49cdf0e10cSrcweir    <p>Furhtermore, the object that implements this interface has to be
50cdf0e10cSrcweir    connected implicitely or explicitely with an object that implements the
51cdf0e10cSrcweir    the <type>XAccessibleText</type> interface.  The
52cdf0e10cSrcweir    <member>XAccessibleHyperlink::getStartIndex</member> and
53cdf0e10cSrcweir    <member>XAccessibleHyperlink::getEndIndex</member> methods return
54cdf0e10cSrcweir    indices with respect to the text exposed by that interface.</p>
55cdf0e10cSrcweir
56cdf0e10cSrcweir    @since OOo 1.1.2
57cdf0e10cSrcweir*/
58cdf0e10cSrcweirpublished interface XAccessibleHyperlink :
59cdf0e10cSrcweir    ::com::sun::star::accessibility::XAccessibleAction
60cdf0e10cSrcweir{
61cdf0e10cSrcweir    /** Returns an object that represents the link anchor, as appropriate
62cdf0e10cSrcweir        for that link.
63cdf0e10cSrcweir
64cdf0e10cSrcweir        <p>For an HTML link for example, this method would return the string
65cdf0e10cSrcweir        enclosed by the &lt&a href&gt; tag.</p>
66cdf0e10cSrcweir
67cdf0e10cSrcweir        @param nIndex
68cdf0e10cSrcweir            This index identifies the anchor when, as in the case of an
69cdf0e10cSrcweir            image map, there is more than one link represented by this
70cdf0e10cSrcweir            object.  The valid maximal index can be determinded by calling
71cdf0e10cSrcweir            the <member>XAccessibleAction::getActionCount</member> method.
72cdf0e10cSrcweir
73cdf0e10cSrcweir        @return
74cdf0e10cSrcweir            If the index is not valid then an exception is thrown.
75cdf0e10cSrcweir            Otherwise it returns an implementation dependent value.
76cdf0e10cSrcweir    */
77cdf0e10cSrcweir    any getAccessibleActionAnchor ([in] long nIndex)
78cdf0e10cSrcweir        raises (::com::sun::star::lang::IndexOutOfBoundsException);
79cdf0e10cSrcweir
80cdf0e10cSrcweir    /** Returns an object that represents the link anchor, as appropriate
81cdf0e10cSrcweir        for that link.
82cdf0e10cSrcweir
83cdf0e10cSrcweir        <p>For an HTML link for example, this method would return the URL of
84cdf0e10cSrcweir        the &lt&a href&gt; tag.</p>
85cdf0e10cSrcweir
86cdf0e10cSrcweir        @param nIndex
87cdf0e10cSrcweir            This index identifies the action object when, as in the case of
88cdf0e10cSrcweir            an image map, there is more than one link represented by this
89cdf0e10cSrcweir            object.  The valid maximal index can be determinded by calling
90cdf0e10cSrcweir            the <member>XAccessibleAction::getActionCount</member> method.
91cdf0e10cSrcweir
92cdf0e10cSrcweir        @return
93cdf0e10cSrcweir            If the index is not valid then an exception is thrown.
94cdf0e10cSrcweir            Otherwise it returns an implementation dependent value.
95cdf0e10cSrcweir    */
96cdf0e10cSrcweir    any getAccessibleActionObject ([in] long nIndex)
97cdf0e10cSrcweir        raises (::com::sun::star::lang::IndexOutOfBoundsException);
98cdf0e10cSrcweir
99cdf0e10cSrcweir    /** Returns the index at which the textual representation of the
100cdf0e10cSrcweir        hyperlink (group) starts.
101cdf0e10cSrcweir
102cdf0e10cSrcweir        <p>The returned value relates to the <type>XAccessibleText</type>
103cdf0e10cSrcweir        interface that ownes this hyperlink.</p>
104cdf0e10cSrcweir
105cdf0e10cSrcweir        @return
106cdf0e10cSrcweir            The index relates to the text exposed by the
107cdf0e10cSrcweir            <type>XAccessibleHypertext</type> interface.
108cdf0e10cSrcweir    */
109cdf0e10cSrcweir    long getStartIndex ();
110cdf0e10cSrcweir
111cdf0e10cSrcweir    /** Returns the index at which the textual rerpesentation of the
112cdf0e10cSrcweir        hyperlink (group) ends.
113cdf0e10cSrcweir
114cdf0e10cSrcweir        <p>The returned value relates to the <type>XAccessibleText</type>
115cdf0e10cSrcweir        interface that ownes this hyperlink.</p>
116cdf0e10cSrcweir
117cdf0e10cSrcweir        @return
118cdf0e10cSrcweir            The index relates to the text exposed by the
119cdf0e10cSrcweir            <type>XAccessibleText</type> interface.
120cdf0e10cSrcweir    */
121cdf0e10cSrcweir    long getEndIndex ();
122cdf0e10cSrcweir
123cdf0e10cSrcweir    /** Returns whether the document referenced by this links is
124cdf0e10cSrcweir        still valid.
125cdf0e10cSrcweir
126cdf0e10cSrcweir        <p>This is a volatile state that may change without further warning
127cdf0e10cSrcweir        like e.g. sending an appropriate event.</p>
128cdf0e10cSrcweir
129cdf0e10cSrcweir        @return
130cdf0e10cSrcweir            Returns <TRUE/> if the referenced document is still valid and
131cdf0e10cSrcweir            <FALSE/> otherwise.
132cdf0e10cSrcweir    */
133cdf0e10cSrcweir    boolean isValid ();
134cdf0e10cSrcweir};
135cdf0e10cSrcweir
136cdf0e10cSrcweir}; }; }; };
137cdf0e10cSrcweir
138cdf0e10cSrcweir#endif
139