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