334dafdd74615396a986296e83160eda49277acb
[platform/upstream/at-spi2-core.git] / idl / hypertext.didl
1
2 namespace org.freestandards.atspi {
3         /*
4           Instances of Hyperlink are returned by Hypertext object and
5           are the means by which end users and clients interact with linked
6           content.
7
8           Hyperlink instances DO NOT neccessarily implement the Accessible interface.
9          */
10         interface HyperLink {
11                 /* The number of separate anchors associated with this Hyperlink. */
12                 read property int32 NAnchors;
13
14                 /* 
15                   The starting offset within the contianing Hypertext,
16                   with which this Hyperlink is associated.      
17                  */
18                 read property int32 StartIndex;
19
20                 /*
21                   The ending offset within the containing Hypertext with which
22                   this Hyperlink is associated.
23                  */
24                 read property int32 EndIndex;
25
26                 /*
27                   Gets the i'th object associated with a Hyperlink.
28                   Objects returned should implement the Action interface.
29                  */ 
30                 method GetObject {
31                         int32 index;
32                 } reply {
33                         Reference anchor;
34                 }
35
36                 /*
37                   Obtain a resource locator, URI, which can be used to access the content
38                   which this link points to.
39                  */
40                 method GetUri {
41                         int32 index;
42                 } reply {
43                         string uri;
44                 }
45
46                 /*
47                   Check the hyperlink to see if a connection to its backing content can be
48                   established or if its URI is valid.
49                  */
50                 method IsValid reply {
51                         boolean valid;
52                 }
53         }
54
55         /*
56           An interface used for objects which implement linking between multiple resource locations.
57           A hypertext instance is associated with one or more hyperlinks which are associated with
58           particular offests within the text.
59          */
60         interface Hypertext {
61
62                 method GetNLinks reply {
63                         int32 n_links;
64                 }
65
66                 method GetLink {
67                         int32 index;
68                 } reply {
69                         Reference hyperlink;
70                 }
71
72                 /*
73                   Get the hyperlink index, if any, associated with a particular text offset.
74                  */
75                 method GetLinkIndex {
76                         int32 offset;
77                 } reply {
78                         /* -1 if no hyperlink is associated. */
79                         int32 index;
80                 }       
81         }
82 }