2008-08-27 Mark Doffman <mark.doffman@codethink.co.uk>
[platform/core/uifw/at-spi2-atk.git] / xml / org.freedesktop.atspi.Hyperlink.xml
1 <?xml version="1.0" encoding="UTF-8"?>
2 <node xmlns:tp="http://telepathy.freedesktop.org/wiki/DbusSpec#extensions-v0" name="/node">
3 <interface name="org.freedesktop.atspi.Hyperlink">
4   <tp:docstring xmlns="http://www.w3.org/1999/xhtml">
5     <p>Instances of Hyperlink are returned by Hypertext objects, and are
6       the means by which end users and clients interact with linked, and in
7       some cases embedded, content.  Hyperlinks may have multiple "anchors",
8       where an anchor corresponds to a reference to a particular resource with
9       a corresponding resource identified (URI).  Hyperlinks may be 
10       queried for their URIs, or queried for the objects corresponding to their
11       anchors.  The objects thus obtained are instances of Accessible,
12       and may be queried, and manipulated via the Action interface.   </p>
13
14     <p>A Hyperlink implementor is normally NOT an Accessible; 
15       the preferred usage is for a Hyperlink's associated 'objects'
16       (accessed via the getObject method) are Accessibles.  This means
17       that Actions such as 'open link' are normally invoked on
18       the result of Hyperlink.getObject rather than directly on the 
19       Hyperlink instance. For historical reasons some implementors of Hyperlink
20       implement Action as well.  This usage on the part of implementing
21       applications and toolkits is discouraged, but clients of Hyperlink
22       should be aware of it and prepared to handle such usage.</p>
23   </tp:docstring>
24   <tp:property name="nAnchors" type="n" access="read">
25   <tp:docstring>
26     The number of separate anchors associated with this Hyperlink 
27   </tp:docstring>
28   </tp:property>
29   <tp:property name="startIndex" type="i" access="read">
30   <tp:docstring xmlns="http://www.w3.org/1999/xhtml">
31     <p>The starting offset within the containing Hypertext content 
32       with which this Hyperlink is associated </p>
33   </tp:docstring>
34   </tp:property>
35   <tp:property name="endIndex" type="i" access="read">
36   <tp:docstring xmlns="http://www.w3.org/1999/xhtml">
37     <p>The ending offset within the containing Hypertext content 
38       with which this Hyperlink is associated; that is, the offset of the
39       first element past the range within the Hypertext associated with
40       this Hyperlink. </p>
41   </tp:docstring>
42   </tp:property>
43   <method name="getObject">
44     <tp:docstring xmlns="http://www.w3.org/1999/xhtml">
45       <p>Gets the i'th object, (where i is an integer between 0 and
46         Hyperlink.numAnchors - 1, inclusive) associated with a Hyperlink.
47         The objects returned are usually actionable (i.e. they should implement
48         Accessibility.Action), and the available actions often include
49         'open', 'bookmark', 'save link as', etc.  They may also implement
50         Accessibility.StreamableContent, although clients can normally use 
51         getURI to obtain a resource locator via which the object's
52         data may be accessed.    </p>
53
54       <p>The most common application for 'multi anchor'
55         hyperlinks in HTML is probably 'client side imagemaps'.
56         A clickable image which uses the HTML 'usemap' attribute
57         should have one anchor for every area; element that
58         includes an HREF.  The objects corresponding to these map
59         areas may implement Accessibility.Component, to represent
60         their onscreen bounding box, and may expose their 'shape' as
61         as name-value pair via Accessible.getAttributeSet.</p>
62     </tp:docstring>
63     <arg direction="in" name="i" type="i"/>
64     <arg direction="out" type="o" tp:type="Accessible">
65     <tp:docstring>
66       An Accessible object instance representing theHyperlink's ith anchor, or through which the content associated with the ith anchor can beaccessed.
67     </tp:docstring>
68     </arg>
69   </method>
70   <method name="getURI">
71     <tp:docstring xmlns="http://www.w3.org/1999/xhtml">
72       <p>Obtain a resource locator ('URI') which can be used to 
73         access the content to which this link "points" or is connected.</p>
74     </tp:docstring>
75     <arg direction="in" name="i" type="i"/>
76     <arg direction="out" type="s">
77     <tp:docstring>
78       A string corresponding to the URI of the Hyperlink's'ith' anchor, if one exists, or a NIL string otherwise.
79     </tp:docstring>
80     </arg>
81   </method>
82   <method name="isValid">
83     <tp:docstring xmlns="http://www.w3.org/1999/xhtml">
84       <p>Check the hyperlink to see if a connection to its backing
85          content can be established, or if its URI is valid. </p>
86       <p>Instances of invalid hyperlinks include links with malformed
87         URIs, or for which a contact to the service provider
88         specified in the URI cannot be established.</p>
89     </tp:docstring>
90     <arg direction="out" type="b" tp:type="boolean">
91     <tp:docstring>
92             <code>True</code> if the object's content is available, or\c False if the hyperlink's URI is invalid, or a connection to the resource can not be established.
93     </tp:docstring>
94     </arg>
95   </method>
96 </interface>
97 </node>