2001-12-10 Michael Meeks <michael@ximian.com>
[platform/core/uifw/at-spi2-atk.git] / cspi / spi_hypertext.c
1 #include <cspi/spi-private.h>
2
3 /**
4  * AccessibleHypertext_ref:
5  * @obj: a pointer to the #AccessibleHypertext object on which to operate.
6  *
7  * Increment the reference count for an #AccessibleHypertext object.
8  *       Since AccessibleHypertext is derived from AccessibleText,
9  *       this is the same as AccessibleText_unref().
10  *
11  * Returns: (no return code implemented yet).
12  *
13  **/
14 void
15 AccessibleHypertext_ref (AccessibleHypertext *obj)
16 {
17   cspi_object_ref (obj);
18 }
19
20 /**
21  * AccessibleHypertext_unref:
22  * @obj: a pointer to the #AccessibleHypertext object on which to operate.
23  *
24  * Decrement the reference count for an #AccessibleHypertext object.
25  *       Since AccessibleHypertext is derived from AccessibleText,
26  *       this is the same as AccessibleText_unref().
27  *
28  * Returns: (no return code implemented yet).
29  *
30  **/
31 void
32 AccessibleHypertext_unref (AccessibleHypertext *obj)
33 {
34   cspi_object_unref (obj);
35 }
36
37 /**
38  * AccessibleHypertext_getNLinks:
39  * @obj: a pointer to the #AccessibleHypertext implementor on which to operate.
40  *
41  * Get the total number of #AccessibleHyperlinks which an
42  *        #AccessibleHypertext implementor has.
43  *
44  * Returns: a #long indicating the number of #AccessibleHyperlinks
45  *        of the #AccessibleHypertext implementor, or -1 if
46  *        the number cannot be determined (for example, if the
47  *        #AccessibleHypertext object is so large that it is not
48  *        all currently in the memory cache).
49  *
50  **/
51 long
52 AccessibleHypertext_getNLinks (AccessibleHypertext *obj)
53 {
54   return (long)
55     Accessibility_Hypertext_getNLinks (CSPI_OBJREF (obj), cspi_ev ());
56 }
57
58
59 /**
60  * AccessibleHypertext_getLink:
61  * @obj: a pointer to the #AccessibleHypertext implementor on which to operate.
62  * @linkIndex: a (zero-index) long integer indicating which hyperlink to query.
63  *
64  * Get the #AccessibleHyperlink object at a specified index.
65  *
66  * Returns: the #AccessibleHyperlink object specified by #linkIndex.
67  *
68  **/
69 AccessibleHyperlink *
70 AccessibleHypertext_getLink (AccessibleHypertext *obj,
71                              long int linkIndex)
72 {
73   return (AccessibleHyperlink *)
74     Accessibility_Hypertext_getLink (CSPI_OBJREF (obj),
75                                      (CORBA_long) linkIndex, cspi_ev ());
76 }
77
78
79 /**
80  * AccessibleHypertext_getLinkIndex:
81  * @obj: a pointer to the #AccessibleHypertext implementor on which to operate.
82  * @characterOffset: an integer specifying the character offset to query.
83  *
84  * Get the index of the #AccessibleHyperlink object at a specified
85  *        character offset.
86  *
87  * Returns: the linkIndex of the #AccessibleHyperlink active at
88  *        character offset @characterOffset, or -1 if there is
89  *        no hyperlink at the specified character offset.
90  *
91  **/
92 long
93 AccessibleHypertext_getLinkIndex (AccessibleHypertext *obj,
94                                   long int characterOffset)
95 {
96   return (long)
97     Accessibility_Hypertext_getLinkIndex (CSPI_OBJREF (obj),
98                                           (CORBA_long) characterOffset, cspi_ev ());
99 }
100
101