Fixed macro-name typos.
[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 void
12 AccessibleHypertext_ref (AccessibleHypertext *obj)
13 {
14   cspi_object_ref (obj);
15 }
16
17 /**
18  * AccessibleHypertext_unref:
19  * @obj: a pointer to the #AccessibleHypertext object on which to operate.
20  *
21  * Decrement the reference count for an #AccessibleHypertext object.
22  *       Since AccessibleHypertext is derived from AccessibleText,
23  *       this is the same as AccessibleText_unref().
24  **/
25 void
26 AccessibleHypertext_unref (AccessibleHypertext *obj)
27 {
28   cspi_object_unref (obj);
29 }
30
31 /**
32  * AccessibleHypertext_getNLinks:
33  * @obj: a pointer to the #AccessibleHypertext implementor on which to operate.
34  *
35  * Get the total number of #AccessibleHyperlinks which an
36  *        #AccessibleHypertext implementor has.
37  *
38  * Returns: a #long indicating the number of #AccessibleHyperlinks
39  *        of the #AccessibleHypertext implementor, or -1 if
40  *        the number cannot be determined (for example, if the
41  *        #AccessibleHypertext object is so large that it is not
42  *        all currently in the memory cache).
43  **/
44 long
45 AccessibleHypertext_getNLinks (AccessibleHypertext *obj)
46 {
47   long retval;
48
49   cspi_return_val_if_fail (obj != NULL, FALSE);
50
51   retval =
52     Accessibility_Hypertext_getNLinks (CSPI_OBJREF (obj), cspi_ev ());
53
54   cspi_return_val_if_ev ("getNLinks", -1);
55
56   return retval;
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 AccessibleHyperlink *
69 AccessibleHypertext_getLink (AccessibleHypertext *obj,
70                              long int             linkIndex)
71 {
72   AccessibleHyperlink *retval;
73         
74   cspi_return_val_if_fail (obj != NULL, FALSE);
75
76   retval = cspi_object_add (
77     Accessibility_Hypertext_getLink (CSPI_OBJREF (obj),
78                                      (CORBA_long) linkIndex,
79                                      cspi_ev ()));
80   
81   cspi_return_val_if_ev ("getLink", NULL); 
82
83   return retval;
84 }
85
86 /**
87  * AccessibleHypertext_getLinkIndex:
88  * @obj: a pointer to the #AccessibleHypertext implementor on which to operate.
89  * @characterOffset: an integer specifying the character offset to query.
90  *
91  * Get the index of the #AccessibleHyperlink object at a specified
92  *        character offset.
93  *
94  * Returns: the linkIndex of the #AccessibleHyperlink active at
95  *        character offset @characterOffset, or -1 if there is
96  *        no hyperlink at the specified character offset.
97  **/
98 long
99 AccessibleHypertext_getLinkIndex (AccessibleHypertext *obj,
100                                   long int             characterOffset)
101 {
102   long retval;
103
104   cspi_return_val_if_fail (obj != NULL, -1);
105
106   retval = 
107     Accessibility_Hypertext_getLinkIndex (CSPI_OBJREF (obj),
108                                           (CORBA_long) characterOffset,
109                                           cspi_ev ());
110
111   cspi_return_val_if_ev ("getLinkIndex", -1);
112
113   return retval;
114 }
115
116